📄 mybutton.cpp
字号:
// MyButton.cpp : implementation file
//
#include "stdafx.h"
#include "homework2.h"
#include "MyButton.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CMyButton
CMyButton::CMyButton()
{
m_clrText = RGB( 255, 0, 255 );
m_clrBkgnd = RGB( 164,255,164);
m_brBkgnd.CreateSolidBrush( m_clrBkgnd );
}
CMyButton::~CMyButton()
{
}
BEGIN_MESSAGE_MAP(CMyButton, CButton)
//{{AFX_MSG_MAP(CMyButton)
// NOTE - the ClassWizard will add and remove mapping macros here.
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CMyButton message handlers
void CMyButton::SetBkColor(COLORREF m_clrBk)
{
m_clrBkgnd=m_clrBk;
m_brBkgnd.DeleteObject();
m_brBkgnd.CreateSolidBrush(m_clrBkgnd);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -