sizecbar.h
上传用户:netltd
上传日期:2013-02-12
资源大小:7234k
文件大小:3k
- /////////////////////////////////////////////////////////////////////////
- // Copyright (C) 1998 by Cristi Posea
- // All rights reserved
- /////////////////////////////////////////////////////////////////////////
- #if !defined(SIZECBAR_H_INCLUDED)
- #define SIZECBAR_H_INCLUDED
- #if _MSC_VER >= 1000
- #pragma once
- #endif // _MSC_VER >= 1000
- // sizecbar.h : header file
- //
- /////////////////////////////////////////////////////////////////////////
- // CSizingControlBar control bar
- class CSizingControlBar : public CControlBar
- {
- public:
- CSizingControlBar();
- // Attributes
- public:
- CSize m_sizeHorz;
- CSize m_sizeVert;
- CSize m_sizeFloat;
- BOOL IsHorzDocked() const;
- BOOL IsVertDocked() const;
- // Operations
- public:
- // Overrides
- public:
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CSizingControlBar)
- public:
- virtual BOOL Create(LPCTSTR lpszWindowName, CWnd* pParentWnd, CSize sizeDefault, BOOL bHasGripper, UINT nID, DWORD dwStyle = WS_CHILD | WS_VISIBLE | CBRS_TOP);
- virtual CSize CalcFixedLayout(BOOL bStretch, BOOL bHorz);
- virtual CSize CalcDynamicLayout(int nLength, DWORD dwMode);
- //}}AFX_VIRTUAL
- // Implementation
- public:
- virtual ~CSizingControlBar();
-
- protected:
- // implementation helpers
- void StartTracking();
- void StopTracking(BOOL bAccept);
- void OnTrackUpdateSize(CPoint& point);
- void OnTrackInvertTracker();
- virtual CSize CalcMaxSize();
- virtual BOOL QueryDragFullWindows() const;
- protected:
- // used for resizing
- CSize m_sizeMin;
- CSize m_sizeMax;
- CPoint m_ptOld;
- CRect m_rectBorder;
- BOOL m_bTracking;
- BOOL m_bDragShowContent;
- CSize m_sizeOld;
- BOOL m_bInRecalcNC;
- UINT m_nDockBarID;
- int m_cxEdge;
- BOOL m_bHasGripper;
- int m_cyGripper;
- CRect m_rectGripper;
- // Generated message map functions
- protected:
- //{{AFX_MSG(CSizingControlBar)
- afx_msg void OnPaint();
- afx_msg void OnNcPaint();
- afx_msg void OnWindowPosChanged(WINDOWPOS FAR* lpwndpos);
- afx_msg void OnNcCalcSize(BOOL bCalcValidRects, NCCALCSIZE_PARAMS FAR* lpncsp);
- afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
- afx_msg void OnMouseMove(UINT nFlags, CPoint point);
- afx_msg void OnNcLButtonDown(UINT nHitTest, CPoint point);
- afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
- afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
- afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
- afx_msg void OnCaptureChanged(CWnd *pWnd);
- afx_msg UINT OnNcHitTest(CPoint point);
- afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- };
- /////////////////////////////////////////////////////////////////////////
- //{{AFX_INSERT_LOCATION}}
- // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
- #endif // !defined(SIZECBAR_H_INCLUDED)