?? 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 + -