SkinButton.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #if !defined(AFX_SKINBUTTON_H__2A579B8E_CF46_4C1D_BCE3_DCBD018233AB__INCLUDED_)
  2. #define AFX_SKINBUTTON_H__2A579B8E_CF46_4C1D_BCE3_DCBD018233AB__INCLUDED_
  3. #include "EnBitmap.h" // Added by ClassView
  4. #if _MSC_VER > 1000
  5. #pragma once
  6. #endif // _MSC_VER > 1000
  7. // SkinButton.h : header file
  8. //
  9. #define STYLE_TOOLBAR 0x0001
  10. #define STYLE_BITMAP 0x0002
  11. /////////////////////////////////////////////////////////////////////////////
  12. // CSkinButton window
  13. class CSkinButton : public CButton
  14. {
  15. public:
  16. CSkinButton();
  17. // Attributes
  18. public:
  19. // Operations
  20. public:
  21. // Overrides
  22. // Implementation
  23. public:
  24. COLORREF m_crText;
  25. void SetTextColor(COLORREF cr);
  26. void SetStyle(int nStyle){m_nStyle=nStyle;}
  27. HBITMAP SetBitmap(HBITMAP hBitmap );
  28. CEnBitmap m_bmpButton;
  29. void LoadBitmap(LPCTSTR szImagePath);
  30. BOOL LoadBitmap(UINT uIDRes,COLORREF crBack);
  31. BOOL DrawText(CDC *pDC ,CRect rc,COLORREF crText);
  32. virtual ~CSkinButton();
  33. BOOL m_bMouseIn;
  34. BOOL m_bDown;
  35. BOOL m_bFocus;
  36. BOOL m_bEnable;
  37. int m_nStyle;
  38. // Generated message map functions
  39. protected:
  40. afx_msg void OnPaint();
  41. afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  42. afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
  43. afx_msg BOOL OnEraseBkgnd(CDC* pDC);
  44. afx_msg void OnMouseMove(UINT nFlags, CPoint point);
  45. afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
  46. afx_msg void OnSetFocus(CWnd* pOldWnd);
  47. afx_msg void OnKillFocus(CWnd* pNewWnd);
  48. DECLARE_MESSAGE_MAP()
  49. };
  50. #endif // !defined(AFX_SKINBUTTON_H__2A579B8E_CF46_4C1D_BCE3_DCBD018233AB__INCLUDED_)