📄 wakeupdlg.cpp
字号:
// WakeUpDlg.cpp : implementation file
//
#include "stdafx.h"
#include "process.h"
#include "WakeUpDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CWakeUpDlg dialog
CWakeUpDlg::CWakeUpDlg(CWnd* pParent /*=NULL*/)
: CDialog(CWakeUpDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CWakeUpDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
radio1 = false;
radio2 = false;
radio3 = false;
}
void CWakeUpDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CWakeUpDlg)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CWakeUpDlg, CDialog)
//{{AFX_MSG_MAP(CWakeUpDlg)
ON_BN_CLICKED(IDC_RADIO1, OnRadio1)
ON_BN_CLICKED(IDC_RADIO2, OnRadio2)
ON_BN_CLICKED(IDC_RADIO3, OnRadio3)
ON_WM_ERASEBKGND()
ON_WM_CTLCOLOR()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CWakeUpDlg message handlers
void CWakeUpDlg::OnRadio1()
{
// TODO: Add your control notification handler code here
radio1 = true;
radio2 = false;
radio3 = false;
}
void CWakeUpDlg::OnRadio2()
{
// TODO: Add your control notification handler code here
radio1 = false;
radio2 = true;
radio3 = false;
}
void CWakeUpDlg::OnRadio3()
{
// TODO: Add your control notification handler code here
radio1 = false;
radio2 = false;
radio3 = true;
}
BOOL CWakeUpDlg::OnEraseBkgnd(CDC* pDC)
{
// TODO: Add your message handler code here and/or call default
CRect rcClient;
CBrush m_brBkgnd;
m_brBkgnd.CreateSolidBrush(RGB(66,96,76));//设置对话框背景颜色
GetClientRect(&rcClient);
pDC->FillRect(&rcClient,&m_brBkgnd);
return TRUE;
return CDialog::OnEraseBkgnd(pDC);
}
HBRUSH CWakeUpDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
// TODO: Change any attributes of the DC here
COLORREF clr = RGB(55,30,60);
pDC->SetTextColor(clr); //设置红色的文本
clr = RGB(66,96,76);
pDC->SetBkColor(clr); //设置背景
HBRUSH m_brMine = ::CreateSolidBrush(clr);
return m_brMine;
// TODO: Return a different brush if the default is not desired
//return hbr;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -