📄 penstyle.cpp
字号:
// PenStyle.cpp : implementation file
//
#include "stdafx.h"
#include "MyDrawBoard.h"
#include "PenStyle.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CPenStyle dialog
CPenStyle::CPenStyle(CWnd* pParent /*=NULL*/)
: CDialog(CPenStyle::IDD, pParent)
{
//{{AFX_DATA_INIT(CPenStyle)
m_PenWidth = 0;
//}}AFX_DATA_INIT
}
void CPenStyle::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CPenStyle)
DDX_Slider(pDX, IDC_SLIDER_PenWidth, m_PenWidth);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CPenStyle, CDialog)
//{{AFX_MSG_MAP(CPenStyle)
ON_BN_CLICKED(IDC_BUTTON_PenColor, OnBUTTONPenColor)
ON_NOTIFY(NM_OUTOFMEMORY, IDC_SLIDER_PenWidth, OnOutofmemorySLIDERPenWidth)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CPenStyle message handlers
void CPenStyle::OnBUTTONPenColor()
{
// TODO: Add your control notification handler code here
CColorDialog cdlg;
cdlg.DoModal();
m_PenColor=cdlg.GetColor();
}
void CPenStyle::OnOutofmemorySLIDERPenWidth(NMHDR* pNMHDR, LRESULT* pResult)
{
// TODO: Add your control notification handler code here
*pResult = 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -