📄 msgsetdlg.cpp
字号:
// MsgSetDlg.cpp : implementation file
//
#include "stdafx.h"
#include "mdf.h"
#include "MsgSetDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CMsgSetDlg dialog
//##ModelId=4652869F010B
CMsgSetDlg::CMsgSetDlg(CWnd* pParent /*=NULL*/)
: CDialog(CMsgSetDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CMsgSetDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
//##ModelId=4652869F0129
void CMsgSetDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CMsgSetDlg)
DDX_Control(pDX, IDC_CHECK, m_ctrlLock);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CMsgSetDlg, CDialog)
//{{AFX_MSG_MAP(CMsgSetDlg)
ON_BN_CLICKED(IDC_CHECK, OnCheck)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CMsgSetDlg message handlers
//##ModelId=4652869F012C
BOOL CMsgSetDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
SetDlgItemText(IDC_ECMSG,m_strMsgCenter) ;//实际设置应在数据库中
m_ctrlLock.SetCheck(1) ;
GetDlgItem(IDC_ECMSG)->EnableWindow(FALSE) ;
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
//##ModelId=4652869F0139
void CMsgSetDlg::OnCheck()
{
// TODO: Add your control notification handler code here
if(m_ctrlLock.GetCheck())
{
GetDlgItem(IDC_ECMSG)->EnableWindow(FALSE) ;
GetDlgItemText(IDC_ECMSG,m_strMsgCenter) ;
}
else
GetDlgItem(IDC_ECMSG)->EnableWindow(TRUE) ;
}
//##ModelId=4652869F011E
BOOL CMsgSetDlg::PreTranslateMessage(MSG* pMsg)
{
// TODO: Add your specialized code here and/or call the base class
if( pMsg->message == WM_KEYDOWN && pMsg->wParam == VK_RETURN )
{
((CButton*)GetDlgItem(IDC_CHECK))->SetCheck(1) ;
OnCheck() ;
return TRUE ;
}
return CDialog::PreTranslateMessage(pMsg);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -