FileNameInputDlg.cpp
上传用户:maryhy001
上传日期:2007-05-02
资源大小:2317k
文件大小:1k
- #include "stdafx.h"
- #include "trfAgent.h"
- #include "FileNameInputDlg.h"
- CFileNameInputDlg::CFileNameInputDlg(CWnd* pParent /*=NULL*/)
- : CDialog(CFileNameInputDlg::IDD, pParent)
- {
- //{{AFX_DATA_INIT(CFileNameInputDlg)
- m_bdontask = FALSE;
- m_sfilename = _T("");
- //}}AFX_DATA_INIT
- }
- void CFileNameInputDlg::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CFileNameInputDlg)
- DDX_Check(pDX, IDC_CHKOVERWRITE, m_bdontask);
- DDX_Text(pDX, IDC_EDTFILENAME, m_sfilename);
- DDV_MaxChars(pDX, m_sfilename, 128);
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(CFileNameInputDlg, CDialog)
- //{{AFX_MSG_MAP(CFileNameInputDlg)
- ON_BN_CLICKED(IDC_CHKOVERWRITE, OnChkoverwrite)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- BOOL CFileNameInputDlg::OnInitDialog()
- {
- CDialog::OnInitDialog();
-
- this->CenterWindow(NULL);
- return TRUE;
- }
- void CFileNameInputDlg::OnChkoverwrite()
- {
- this->UpdateData(TRUE);
- CWnd *pwnd = this->GetDlgItem(IDC_EDTFILENAME);
- pwnd->EnableWindow(!this->m_bdontask);
- }