📄 settingdlg.cpp
字号:
// SettingDlg.cpp : implementation file
//
#include "stdafx.h"
#include "BitmapBrowser.h"
#include "SettingDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CSettingDlg dialog
CSettingDlg::CSettingDlg(CWnd* pParent /*=NULL*/)
: CDialog(CSettingDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CSettingDlg)
m_col = 0;
m_row = 0;
m_velocity = 0;
m_cheat = 1;
//}}AFX_DATA_INIT
m_brush.CreateSolidBrush(RGB(0,0,0));
}
void CSettingDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CSettingDlg)
DDX_Text(pDX, IDC_EDIT_COL, m_col);
DDV_MinMaxInt(pDX, m_col, 1, 20);
DDX_Text(pDX, IDC_EDIT_ROW, m_row);
DDV_MinMaxInt(pDX, m_row, 1, 28);
DDX_Text(pDX, IDC_EDIT_VEL, m_velocity);
DDV_MinMaxInt(pDX, m_velocity, 1, 10);
DDX_Radio(pDX, IDC_RADIO1, m_cheat);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CSettingDlg, CDialog)
//{{AFX_MSG_MAP(CSettingDlg)
ON_BN_CLICKED(IDC_BTN_OK, OnBtnOk)
ON_BN_CLICKED(IDC_BTN_CANCEL, OnBtnCancel)
ON_WM_CTLCOLOR()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CSettingDlg message handlers
void CSettingDlg::OnBtnOk()
{
// TODO: Add your control notification handler code here
CDialog::OnOK();
}
void CSettingDlg::OnBtnCancel()
{
// TODO: Add your control notification handler code here
CDialog::OnCancel();
}
HBRUSH CSettingDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
// TODO: Change any attributes of the DC here
if (pWnd->GetDlgCtrlID() == IDC_EDIT_ROW || pWnd->GetDlgCtrlID() == IDC_EDIT_COL\
|| pWnd->GetDlgCtrlID() == IDC_EDIT_VEL)
{
pDC->SetTextColor(RGB(255, 0, 0));
// pDC->SetBkMode(TRANSPARENT);
pDC->SetBkColor(RGB(0,0,0));
return m_brush;
}
// TODO: Return a different brush if the default is not desired
return hbr;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -