📄 brushstyle.cpp
字号:
// BrushStyle.cpp : implementation file
//
#include "stdafx.h"
#include "Draw.h"
#include "BrushStyle.h"
#include "DrawDoc.h"
#include "DrawView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CBrushStyle
IMPLEMENT_DYNCREATE(CBrushStyle, CFormView)
CBrushStyle::CBrushStyle()
: CFormView(CBrushStyle::IDD)
{
//{{AFX_DATA_INIT(CBrushStyle)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
CBrushStyle::~CBrushStyle()
{
}
void CBrushStyle::DoDataExchange(CDataExchange* pDX)
{
CFormView::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CBrushStyle)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CBrushStyle, CFormView)
//{{AFX_MSG_MAP(CBrushStyle)
ON_BN_CLICKED(IDC_RADIO1, OnRadio1)
ON_BN_CLICKED(IDC_RADIO2, OnRadio2)
ON_BN_CLICKED(IDC_RADIO3, OnRadio3)
ON_BN_CLICKED(IDC_RADIO4, OnRadio4)
ON_BN_CLICKED(IDC_RADIO5, OnRadio5)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CBrushStyle diagnostics
#ifdef _DEBUG
void CBrushStyle::AssertValid() const
{
CFormView::AssertValid();
}
void CBrushStyle::Dump(CDumpContext& dc) const
{
CFormView::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CBrushStyle message handlers
void CBrushStyle::OnRadio1()
{
// TODO: Add your control notification handler code here
brushstyle=0;
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CDrawDoc)));
CDrawDoc *pDoc=(CDrawDoc*)m_pDocument;
pDoc->brushstyle=brushstyle;
pDoc->UpdateAllViews(NULL,0,NULL);
}
void CBrushStyle::OnRadio2()
{
// TODO: Add your control notification handler code here
brushstyle=1;
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CDrawDoc)));
CDrawDoc *pDoc=(CDrawDoc*)m_pDocument;
pDoc->brushstyle=brushstyle;
pDoc->UpdateAllViews(NULL,0,NULL);
}
void CBrushStyle::OnRadio3()
{
// TODO: Add your control notification handler code here
brushstyle=2;
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CDrawDoc)));
CDrawDoc *pDoc=(CDrawDoc*)m_pDocument;
pDoc->brushstyle=brushstyle;
pDoc->UpdateAllViews(NULL,0,NULL);
}
void CBrushStyle::OnRadio4()
{
// TODO: Add your control notification handler code here
brushstyle=3;
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CDrawDoc)));
CDrawDoc *pDoc=(CDrawDoc*)m_pDocument;
pDoc->brushstyle=brushstyle;
pDoc->UpdateAllViews(NULL,0,NULL);
}
void CBrushStyle::OnRadio5()
{
// TODO: Add your control notification handler code here
brushstyle=4;
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CDrawDoc)));
CDrawDoc *pDoc=(CDrawDoc*)m_pDocument;
pDoc->brushstyle=brushstyle;
pDoc->UpdateAllViews(NULL,0,NULL);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -