cmybutton.h
来自「初学者可以了解VC++界面参考代码 掌握别人的方法」· C头文件 代码 · 共 67 行
H
67 行
// CMYButton.h : header file
/////////////////////////////////////////////////////////////////////////////
#if !defined(CMYBUTTON_H_INCLUDED)
#define CMYBUTTON_H_INCLUDED
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
/////////////////////////////////////////////////////////////////////////////
// CMyButton class
class CMyButton : public CButton
{
DECLARE_DYNAMIC(CMyButton)
// Construction
public:
CMyButton();
// Attributes
protected:
CSize m_cSize;
CRect m_rcItem;
CRect m_rcIcon;
UINT m_nState;
bool m_bLBtnDown;
bool m_bFlatLook;
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMyButton)
public:
virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
virtual void SetIcon(HICON hIcon,CSize cSize);
//}}AFX_VIRTUAL
// Implementation
public:
void DisableFlatLook() { m_bFlatLook = false; }
void SetIconRect();
virtual ~CMyButton();
// Generated message map functions
protected:
//{{AFX_MSG(CMyButton)
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnTimer(UINT nIDEvent);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(CJBUTTON_H_INCLUDED)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?