OAMCONTROLBAR.H
上传用户:lvjun8202
上传日期:2013-04-30
资源大小:797k
文件大小:4k
- #if !defined(AFX_OAMCONTROLBAR_H__112ECEE2_0C04_11D3_BAAE_12345600558E__INCLUDED_)
- #define AFX_OAMCONTROLBAR_H__112ECEE2_0C04_11D3_BAAE_12345600558E__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- // OAMControlBar.h : header file
- //
- /////////////////////////////////////////////////////////////////////////////
- // COAMControlBar window
- #include "OAMFlatButton.h"
- class COAMControlBar : public CControlBar
- {
- DECLARE_DYNAMIC(COAMControlBar)
- // Construction
- public:
- COAMControlBar();
- // Attributes
- public:
- BOOL m_bUnique;
- BOOL m_bToFit;
- protected:
- int m_iTrackBorderSize;
- int m_cxOffset;
- int m_cyOffset;
- UINT m_iAuxImage;
- UINT m_menuID;
- BOOL m_bOkToDrag;
- BOOL m_bMaximized;
- BOOL m_bDragging;
- BOOL m_bGripper;
- BOOL m_bButtons;
- CRect m_rcTrack;
- CSize m_sizeNormal;
- CSize m_sizeDesired;
- CPoint m_ptCurDrag;
- CPoint m_ptStartDrag;
- HCURSOR m_curHSplitBar;
- HCURSOR m_curVSplitBar;
- CWnd* m_pChildWnd;
- CImageList m_ImageList;
- COAMFlatButton m_btnClose;
- COAMFlatButton m_btnMinim;
- CToolTipCtrl m_ToolTip;
- COLORREF m_clrBtnHilite;
- COLORREF m_clrBtnShadow;
- COLORREF m_clrBtnFace;
- // Operations
- public:
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(COAMControlBar)
- public:
- virtual BOOL Create(CWnd* pParentWnd, UINT nID, LPCTSTR lpszWindowName = NULL, CSize sizeDefault = CSize(200,100), DWORD dwStyle = CBRS_LEFT);
- virtual BOOL PreTranslateMessage(MSG* pMsg);
- virtual void OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler);
- virtual CSize CalcDynamicLayout(int nLength, DWORD nMode);
- //}}AFX_VIRTUAL
- // Implementation
- public:
- virtual ~COAMControlBar();
- // Generated message map functions
- protected:
- //{{AFX_MSG(COAMControlBar)
- afx_msg void OnNcPaint();
- afx_msg void OnPaint();
- afx_msg void OnMouseMove(UINT nFlags, CPoint point);
- afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
- afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
- afx_msg UINT OnNcHitTest(CPoint point);
- afx_msg BOOL OnEraseBkgnd(CDC* pDC);
- afx_msg void OnSysColorChange();
- afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
- afx_msg void OnWindowPosChanged(WINDOWPOS FAR* lpwndpos);
- afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
- afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
- afx_msg void OnButtonClose();
- afx_msg void OnUpdateButtonClose(CCmdUI* pCmdUI);
- afx_msg void OnButtonMinimize();
- afx_msg void OnUpdateButtonMinimize(CCmdUI* pCmdUI);
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- public:
- virtual void GetChildRect(CRect &rect);
- int GetMinExt();
- BOOL IsLeftDocked();
- BOOL IsRightDocked();
- BOOL IsTopDocked();
- BOOL IsBottomDocked();
- BOOL IsHorzDocked();
- BOOL IsVertDocked();
- void SetNormalSize(const CSize &cs);
- void Normalize();
- void Minimize();
- void Maximize(int size);
- void EnableDockingOnSizeBar(DWORD dwDockStyle);
- void ShowFrameControls(BOOL bGripper = TRUE, BOOL bButtons = TRUE);
- void SetMenuID(UINT nID);
- UINT GetMenuID();
- protected:
- CRect GetGripperRect();
- CRect GetButtonRect();
- void DrawGripper(CDC* pDC);
- public:
- void SetChild(CWnd* pWnd);
- void OnInvertTracker(const CRect& rect);
- virtual void HitTest(CPoint &point);
- virtual void DrawBorders(CDC *pDC, CRect &rect);
- void EraseNonClient();
- };
- /////////////////////////////////////////////////////////////////////////////
- //{{AFX_INSERT_LOCATION}}
- // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
- #endif // !defined(AFX_OAMCONTROLBAR_H__112ECEE2_0C04_11D3_BAAE_12345600558E__INCLUDED_)