1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- #if !defined(AFX_SKINBUTTON_H__2A579B8E_CF46_4C1D_BCE3_DCBD018233AB__INCLUDED_)
- #define AFX_SKINBUTTON_H__2A579B8E_CF46_4C1D_BCE3_DCBD018233AB__INCLUDED_
- #include "EnBitmap.h"
- #if _MSC_VER > 1000
- #pragma once
- #endif
- #define STYLE_TOOLBAR 0x0001
- #define STYLE_BITMAP 0x0002
- class CSkinButton : public CButton
- {
- public:
- CSkinButton();
- public:
- public:
- public:
- COLORREF m_crText;
- void SetTextColor(COLORREF cr);
- void SetStyle(int nStyle){m_nStyle=nStyle;}
- HBITMAP SetBitmap(HBITMAP hBitmap );
- CEnBitmap m_bmpButton;
- void LoadBitmap(LPCTSTR szImagePath);
- BOOL LoadBitmap(UINT uIDRes,COLORREF crBack);
- BOOL DrawText(CDC *pDC ,CRect rc,COLORREF crText);
- virtual ~CSkinButton();
- BOOL m_bMouseIn;
- BOOL m_bDown;
- BOOL m_bFocus;
- BOOL m_bEnable;
- int m_nStyle;
-
- protected:
- afx_msg void OnPaint();
- afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
- afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
- afx_msg BOOL OnEraseBkgnd(CDC* pDC);
- afx_msg void OnMouseMove(UINT nFlags, CPoint point);
- afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
- afx_msg void OnSetFocus(CWnd* pOldWnd);
- afx_msg void OnKillFocus(CWnd* pNewWnd);
- DECLARE_MESSAGE_MAP()
- };
- #endif
|