OAMCONTROLBAR.H
上传用户:lvjun8202
上传日期:2013-04-30
资源大小:797k
文件大小:4k
源码类别:

SNMP编程

开发平台:

C/C++

  1. #if !defined(AFX_OAMCONTROLBAR_H__112ECEE2_0C04_11D3_BAAE_12345600558E__INCLUDED_)
  2. #define AFX_OAMCONTROLBAR_H__112ECEE2_0C04_11D3_BAAE_12345600558E__INCLUDED_
  3. #if _MSC_VER > 1000
  4. #pragma once
  5. #endif // _MSC_VER > 1000
  6. // OAMControlBar.h : header file
  7. //
  8. /////////////////////////////////////////////////////////////////////////////
  9. // COAMControlBar window
  10. #include "OAMFlatButton.h"
  11. class COAMControlBar : public CControlBar
  12. {
  13. DECLARE_DYNAMIC(COAMControlBar)
  14. // Construction
  15. public:
  16. COAMControlBar();
  17. // Attributes
  18. public:
  19. BOOL m_bUnique;
  20. BOOL m_bToFit;
  21. protected:
  22. int m_iTrackBorderSize;
  23. int m_cxOffset;
  24. int m_cyOffset;
  25. UINT m_iAuxImage;
  26. UINT m_menuID;
  27. BOOL m_bOkToDrag;
  28. BOOL m_bMaximized;
  29. BOOL m_bDragging;
  30. BOOL m_bGripper;
  31. BOOL m_bButtons;
  32. CRect m_rcTrack;
  33. CSize m_sizeNormal;
  34. CSize m_sizeDesired;
  35. CPoint m_ptCurDrag;
  36. CPoint m_ptStartDrag;
  37. HCURSOR m_curHSplitBar;
  38. HCURSOR m_curVSplitBar;
  39. CWnd* m_pChildWnd;
  40. CImageList m_ImageList;
  41. COAMFlatButton m_btnClose;
  42. COAMFlatButton m_btnMinim;
  43. CToolTipCtrl m_ToolTip;
  44. COLORREF m_clrBtnHilite;
  45. COLORREF m_clrBtnShadow;
  46. COLORREF m_clrBtnFace;
  47. // Operations
  48. public:
  49. // Overrides
  50. // ClassWizard generated virtual function overrides
  51. //{{AFX_VIRTUAL(COAMControlBar)
  52. public:
  53. virtual BOOL Create(CWnd* pParentWnd, UINT nID, LPCTSTR lpszWindowName = NULL, CSize sizeDefault = CSize(200,100), DWORD dwStyle = CBRS_LEFT);
  54. virtual BOOL PreTranslateMessage(MSG* pMsg);
  55. virtual void OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler);
  56. virtual CSize CalcDynamicLayout(int nLength, DWORD nMode);
  57.   //}}AFX_VIRTUAL
  58. // Implementation
  59. public:
  60. virtual ~COAMControlBar();
  61. // Generated message map functions
  62. protected:
  63. //{{AFX_MSG(COAMControlBar)
  64. afx_msg void OnNcPaint();
  65. afx_msg void OnPaint();
  66. afx_msg void OnMouseMove(UINT nFlags, CPoint point);
  67. afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
  68. afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
  69. afx_msg UINT OnNcHitTest(CPoint point);
  70. afx_msg BOOL OnEraseBkgnd(CDC* pDC);
  71. afx_msg void OnSysColorChange();
  72. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  73. afx_msg void OnWindowPosChanged(WINDOWPOS FAR* lpwndpos);
  74. afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
  75. afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  76. afx_msg void OnButtonClose();
  77. afx_msg void OnUpdateButtonClose(CCmdUI* pCmdUI);
  78. afx_msg void OnButtonMinimize();
  79. afx_msg void OnUpdateButtonMinimize(CCmdUI* pCmdUI);
  80. //}}AFX_MSG
  81. DECLARE_MESSAGE_MAP()
  82. public:
  83. virtual void GetChildRect(CRect &rect);
  84. int GetMinExt();
  85. BOOL IsLeftDocked();
  86. BOOL IsRightDocked();
  87. BOOL IsTopDocked();
  88. BOOL IsBottomDocked();
  89. BOOL IsHorzDocked();
  90. BOOL IsVertDocked();
  91. void SetNormalSize(const CSize &cs);
  92. void Normalize();
  93. void Minimize();
  94. void Maximize(int size);
  95. void EnableDockingOnSizeBar(DWORD dwDockStyle);
  96. void ShowFrameControls(BOOL bGripper = TRUE, BOOL bButtons = TRUE);
  97. void SetMenuID(UINT nID);
  98. UINT GetMenuID();
  99. protected:
  100. CRect GetGripperRect();
  101. CRect GetButtonRect();
  102. void DrawGripper(CDC* pDC);
  103. public:
  104. void SetChild(CWnd* pWnd);
  105. void OnInvertTracker(const CRect& rect);
  106. virtual void HitTest(CPoint &point);
  107. virtual void DrawBorders(CDC *pDC, CRect &rect);
  108. void EraseNonClient();
  109. };
  110. /////////////////////////////////////////////////////////////////////////////
  111. //{{AFX_INSERT_LOCATION}}
  112. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  113. #endif // !defined(AFX_OAMCONTROLBAR_H__112ECEE2_0C04_11D3_BAAE_12345600558E__INCLUDED_)