mybutton.h

来自「《windows程序设计》王艳平版的书籍源代码」· C头文件 代码 · 共 27 行

H
27
字号
///////////////////////////////////////////////
// MyButton.h文件

#ifndef __MYBUTTON_H__
#define __MYBUTTON_H__

#include "afxwin.h"

class CMyButton : public CWnd  
{
public:
	CMyButton(LPCTSTR lpszText, const RECT& rect, CWnd* pParentWnd, UINT nID);
protected:
	char m_szText[256];	// 按钮显示的文本
	BOOL m_bIsDown;		// 指示用户是否按下鼠标左键

	virtual void PostNcDestroy();
	afx_msg void OnPaint();
	afx_msg void OnLButtonDown(UINT nFlags, POINT point);
	afx_msg void OnLButtonUp(UINT nFlags, POINT point);
	afx_msg void OnMouseMove(UINT nFlags, POINT point);

	DECLARE_MESSAGE_MAP()
};


#endif // __MYBUTTON_H__

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?