📄 buttondialog.cpp
字号:
// ButtonDialog.cpp : implementation file
//
#include "stdafx.h"
#include "Exam7_2.h"
#include "ButtonDialog.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CButtonDialog dialog
CButtonDialog::CButtonDialog(CWnd* pParent /*=NULL*/)
: CDialog(CButtonDialog::IDD, pParent)
{
//{{AFX_DATA_INIT(CButtonDialog)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void CButtonDialog::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CButtonDialog)
DDX_Control(pDX, IDC_CHANGE, m_change);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CButtonDialog, CDialog)
//{{AFX_MSG_MAP(CButtonDialog)
ON_BN_CLICKED(IDC_CHANGE, OnChange)
ON_BN_CLICKED(IDC_MESSAGE, OnMessage)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CButtonDialog message handlers
void CButtonDialog::OnChange()
{
// TODO: Add your control notification handler code here
static BOOL bflag1=TRUE;
if(bflag1)
{
MessageBox("please watch the label of button");
m_change.SetWindowText("after change");
bflag1=FALSE;
}
else
{
MessageBox("please watch the label of button");
m_change.SetWindowText("change");
bflag1=TRUE;
}
}
void CButtonDialog::OnMessage()
{
// TODO: Add your control notification handler code here
MessageBox("Only display message");
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -