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

  1. // ControlBarEx.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(CONTROLBAREX_H_INCLUDED)
  17. #define CONTROLBAREX_H_INCLUDED
  18.  
  19. #if _MSC_VER >= 1000
  20. #pragma once
  21. #endif // _MSC_VER >= 1000
  22.  
  23. #include "Sizecbar.h"
  24. #include "FlatButton.h"
  25.  
  26. /////////////////////////////////////////////////////////////////////////////
  27. // CControlBarEx class
  28.  
  29. class CLASS_EXPORT CControlBarEx : public CSizingControlBar
  30. {
  31.     DECLARE_DYNAMIC(CControlBarEx)
  32.  
  33. // Construction
  34. public:
  35.     CControlBarEx();
  36.  
  37. // Attributes
  38. public:
  39.     CFlatButton  m_btnClose;
  40.     CFlatButton  m_btnMinim;
  41.     CImageList   m_imageList;
  42.  
  43. // Operations
  44. public:
  45.  
  46. // Overrides
  47.     // ClassWizard generated virtual function overrides
  48.     //{{AFX_VIRTUAL(CControlBarEx)
  49.     public:
  50.     virtual BOOL PreTranslateMessage(MSG* pMsg);
  51.     //}}AFX_VIRTUAL
  52.  
  53. // Implementation
  54. public:
  55.     void SetMenuID(UINT nID) { m_menuID = nID; }
  56.     UINT GetMenuID() { return m_menuID; }
  57.     virtual ~CControlBarEx();
  58.  
  59. protected:
  60.     COLORREF     m_clrHilite;
  61.     COLORREF     m_clrShadow;
  62.     COLORREF     m_clrButton;
  63.     CToolTipCtrl m_tooltip;
  64.     UINT         m_menuID;
  65.  
  66.     CRect GetButtonRect();
  67.     CRect GetGripperRect();
  68.     void DrawGripper();
  69.     bool IsOrientHorz() { return(m_dwStyle & CBRS_ORIENT_HORZ) ? true:false; }
  70.     void OnButtonClose();
  71.     void OnUpdateButtonClose(CCmdUI* pCmdUI);
  72.     void OnButtonMinimize();
  73.     void OnUpdateButtonMinimize(CCmdUI* pCmdUI);
  74.  
  75. // Generated message map functions
  76. protected:
  77.     //{{AFX_MSG(CControlBarEx)
  78.     afx_msg void OnWindowPosChanged(WINDOWPOS FAR* lpwndpos);
  79.     afx_msg void OnPaint();
  80.     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  81.     afx_msg void OnNcPaint();
  82.     afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
  83.     //}}AFX_MSG
  84.     DECLARE_MESSAGE_MAP()
  85. };
  86.  
  87. /////////////////////////////////////////////////////////////////////////////
  88.  
  89. //{{AFX_INSERT_LOCATION}}
  90. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  91.  
  92. #endif // !defined(CONTROLBAREX_H_INCLUDED)
  93.  
  94.