MFC重绘控件

举个按钮简单重绘的例子。

头文件:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
class CMyButton : public CButton
{
public:
	virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
};
 
class CMFCApplication1Dlg : public CDialogEx
{
	...
protected:
	virtual void DoDataExchange(CDataExchange* pDX);
	CMyButton m_myButton;
	...
};

阅读更多MFC重绘控件