00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #if !defined(AFX_CTRLICONBUTTON_H__5E629D93_681A_4631_BD16_166C2E025871__INCLUDED_)
00023 #define AFX_CTRLICONBUTTON_H__5E629D93_681A_4631_BD16_166C2E025871__INCLUDED_
00024
00025 #pragma once
00026
00027
00028 class CIconButtonCtrl : public CWnd
00029 {
00030
00031 public:
00032 CIconButtonCtrl();
00033 virtual ~CIconButtonCtrl();
00034
00035
00036 protected:
00037 CImageList m_pImageList;
00038 BOOL m_bCapture;
00039 BOOL m_bDown;
00040 BOOL m_bCursor;
00041
00042
00043 public:
00044 void SetText(LPCTSTR pszText);
00045 void SetIcon(UINT nIconID);
00046 void SetIcon(HICON hIcon);
00047 void SetHandCursor(BOOL bCursor);
00048 protected:
00049 BOOL RemoveStyle();
00050
00051
00052 public:
00053
00054 virtual BOOL Create(const RECT& rect, CWnd* pParentWnd, UINT nControlID);
00055
00056
00057
00058 protected:
00059
00060 afx_msg void OnMouseMove(UINT nFlags, CPoint point);
00061 afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
00062 afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
00063 afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
00064 afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
00065 afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
00066 afx_msg void OnPaint();
00067 afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00068 afx_msg void OnEnable(BOOL bEnable);
00069
00070 DECLARE_MESSAGE_MAP()
00071
00072 };
00073
00074
00075
00076 #endif // !defined(AFX_CTRLICONBUTTON_H__5E629D93_681A_4631_BD16_166C2E025871__INCLUDED_)
00077