penwidthsdlg.cpp

来自「一个跟Cppunit一样好用的单元测试工具」· C++ 代码 · 共 52 行

CPP
52
字号
// PenWidthsDlg.cpp : implementation file
//

#include "stdafx.h"
#include "image.h"
#include "PenWidthsDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CPenWidthsDlg dialog


CPenWidthsDlg::CPenWidthsDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CPenWidthsDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CPenWidthsDlg)
	m_nCurrentWidth = 0;
	//}}AFX_DATA_INIT
}


void CPenWidthsDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CPenWidthsDlg)
	DDX_Text(pDX, IDC_PEN_WIDTH, m_nCurrentWidth);
	DDV_MinMaxInt(pDX, m_nCurrentWidth, 1, 20);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CPenWidthsDlg, CDialog)
	//{{AFX_MSG_MAP(CPenWidthsDlg)
	ON_BN_CLICKED(IDDEFAULT, OnDefault)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CPenWidthsDlg message handlers

void CPenWidthsDlg::OnDefault() 
{
	// TODO: Add your control notification handler code here
	m_nCurrentWidth = 2;
	UpdateData(FALSE);
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?