home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 21 / IOPROG_21.ISO / SOFT / DEMOT.ZIP / Src / Include / FlatButton.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-08-23  |  2.1 KB  |  83 lines

  1. // FlatButton.h : header file
  2. // Copyright ⌐1998 - Kirk Stowell
  3. // All Rights Reserved.
  4. //
  5. // Email: kstowel@sprynet.com
  6. // URL:   www.geocities.com/SiliconValley/Haven/8230
  7. //
  8. // You are free to use, modify and distribute this source, as long as
  9. // it is not sold for profit, and this HEADER stays intact. This source is
  10. // supplied "AS-IS", and without WARRANTY OF ANY KIND. The user
  11. // agrees to hold the author(s) blameless from any or all problems that
  12. // may arise from the use or distribution of this code.
  13. //
  14. /////////////////////////////////////////////////////////////////////////////
  15.  
  16. #if !defined(FLATBUTTON_H_INCLUDED)
  17. #define FLATBUTTON_H_INCLUDED
  18.  
  19. #if _MSC_VER >= 1000
  20. #pragma once
  21. #endif // _MSC_VER >= 1000
  22.  
  23. /////////////////////////////////////////////////////////////////////////////
  24. // CFlatButton class
  25.  
  26. class CLASS_EXPORT CFlatButton : public CButton
  27. {
  28.     DECLARE_DYNAMIC(CFlatButton)
  29.  
  30. // Construction
  31. public:
  32.     CFlatButton();
  33.  
  34. // Attributes
  35. public:
  36.  
  37. // Operations
  38. public:
  39.  
  40. // Overrides
  41.     // ClassWizard generated virtual function overrides
  42.     //{{AFX_VIRTUAL(CFlatButton)
  43.     public:
  44.     virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
  45.     virtual void SetIcon(HICON hIcon,CSize cSize);
  46.     //}}AFX_VIRTUAL
  47.  
  48. // Implementation
  49. public:
  50.     void DisableFlatLook();
  51.     virtual ~CFlatButton();
  52.  
  53. // Generated message map functions
  54. protected:
  55.     //{{AFX_MSG(CFlatButton)
  56.     afx_msg void OnMouseMove(UINT nFlags, CPoint point);
  57.     afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  58.     afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
  59.     afx_msg void OnTimer(UINT nIDEvent);
  60.     //}}AFX_MSG
  61.     DECLARE_MESSAGE_MAP()
  62.  
  63. protected:
  64.     COLORREF    m_clrHilite;
  65.     COLORREF    m_clrShadow;
  66.     COLORREF    m_clrDkShad;
  67.     COLORREF    m_clrButton;
  68.     COLORREF    m_clrMask;
  69.     CSize       m_cSize;
  70.     CRect        m_rcItem;
  71.     UINT        m_nState;
  72.     bool        m_bLBtnDown;
  73.     bool        m_bFlatLook;
  74. };
  75.  
  76. /////////////////////////////////////////////////////////////////////////////
  77.  
  78. //{{AFX_INSERT_LOCATION}}
  79. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  80.  
  81. #endif // !defined(FLATBUTTON_H_INCLUDED)
  82.  
  83.