2007-03-27 17:47:10 +00:00
|
|
|
/*
|
|
|
|
* CiderPress
|
|
|
|
* Copyright (C) 2007 by faddenSoft, LLC. All Rights Reserved.
|
|
|
|
* See the file LICENSE for distribution terms.
|
|
|
|
*/
|
|
|
|
/*
|
|
|
|
* Implementation of Disk Editor "open file" dialog.
|
|
|
|
*/
|
|
|
|
#include "stdafx.h"
|
|
|
|
#include "DEFileDialog.h"
|
|
|
|
|
|
|
|
|
|
|
|
BEGIN_MESSAGE_MAP(DEFileDialog, CDialog)
|
2014-11-04 00:26:53 +00:00
|
|
|
ON_EN_CHANGE(IDC_DEFILE_FILENAME, OnChange)
|
|
|
|
ON_WM_HELPINFO()
|
2007-03-27 17:47:10 +00:00
|
|
|
END_MESSAGE_MAP()
|
|
|
|
|
2014-11-21 21:18:20 +00:00
|
|
|
BOOL DEFileDialog::OnInitDialog(void)
|
2007-03-27 17:47:10 +00:00
|
|
|
{
|
2014-11-04 00:26:53 +00:00
|
|
|
CWnd* pWnd = GetDlgItem(IDOK);
|
2014-11-18 05:13:13 +00:00
|
|
|
ASSERT(pWnd != NULL);
|
2014-11-04 00:26:53 +00:00
|
|
|
pWnd->EnableWindow(FALSE);
|
2007-03-27 17:47:10 +00:00
|
|
|
|
2014-11-04 00:26:53 +00:00
|
|
|
return CDialog::OnInitDialog();
|
2007-03-27 17:47:10 +00:00
|
|
|
}
|
|
|
|
|
2014-11-21 21:18:20 +00:00
|
|
|
void DEFileDialog::DoDataExchange(CDataExchange* pDX)
|
2007-03-27 17:47:10 +00:00
|
|
|
{
|
2014-11-04 00:26:53 +00:00
|
|
|
DDX_Text(pDX, IDC_DEFILE_FILENAME, fName);
|
|
|
|
DDX_Check(pDX, IDC_DEFILE_RSRC, fOpenRsrcFork);
|
2007-03-27 17:47:10 +00:00
|
|
|
}
|
|
|
|
|
2014-11-21 21:18:20 +00:00
|
|
|
void DEFileDialog::OnChange(void)
|
2007-03-27 17:47:10 +00:00
|
|
|
{
|
2014-11-04 00:26:53 +00:00
|
|
|
CEdit* pEdit = (CEdit*) GetDlgItem(IDC_DEFILE_FILENAME);
|
2014-11-18 05:13:13 +00:00
|
|
|
ASSERT(pEdit != NULL);
|
2007-03-27 17:47:10 +00:00
|
|
|
|
2014-11-04 00:26:53 +00:00
|
|
|
CString str;
|
|
|
|
pEdit->GetWindowText(str);
|
2014-11-18 21:05:15 +00:00
|
|
|
//LOGI("STR is '%ls' (%d)", str, str.GetLength());
|
2007-03-27 17:47:10 +00:00
|
|
|
|
2014-11-04 00:26:53 +00:00
|
|
|
CWnd* pWnd = GetDlgItem(IDOK);
|
2014-11-18 05:13:13 +00:00
|
|
|
ASSERT(pWnd != NULL);
|
2014-11-04 00:26:53 +00:00
|
|
|
pWnd->EnableWindow(!str.IsEmpty());
|
2007-03-27 17:47:10 +00:00
|
|
|
}
|