-
Notifications
You must be signed in to change notification settings - Fork 1
/
SizeCBar.h
97 lines (79 loc) · 2.8 KB
/
SizeCBar.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#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
{
// Construction / destruction
public:
CSizingControlBar();
// Attributes
public:
BOOL IsHorz() const;
// Operations
public:
// Overridables
virtual void OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler);
// Overrides
public:
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CSizingControlBar)
public:
virtual BOOL Create(CWnd* pParentWnd, CSize sizeDefault, 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();
void StartTracking();
void StopTracking(BOOL bAccept);
void OnInvertTracker(const CRect& rect);
/* added by igkang */
CSize GetHorzSize() { return m_sizeHorz; }
CSize GetVertSize() { return m_sizeVert; }
CSize GetFloatSize() { return m_sizeFloat; }
void SetHorzSize(CSize size) { m_sizeHorz = size; }
void SetVertSize(CSize size) { m_sizeVert = size; }
void SetFloatSize(CSize size) { m_sizeFloat = size; }
/* until here */
// implementation helpers
CPoint& ClientToWnd(CPoint& point);
protected:
CSize m_sizeMin;
CSize m_sizeHorz;
CSize m_sizeVert;
CSize m_sizeFloat;
CRect m_rectBorder;
CRect m_rectTracker;
UINT m_nDockBarID;
CPoint m_ptOld;
BOOL m_bTracking;
BOOL m_bInRecalcNC;
int m_cxEdge;
// Generated message map functions
protected:
//{{AFX_MSG(CSizingControlBar)
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
afx_msg void OnWindowPosChanged(WINDOWPOS FAR* lpwndpos);
afx_msg void OnNcPaint();
afx_msg void OnNcLButtonDown(UINT nHitTest, CPoint point);
afx_msg UINT OnNcHitTest(CPoint point);
afx_msg void OnNcCalcSize(BOOL bCalcValidRects, NCCALCSIZE_PARAMS FAR* lpncsp);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnCaptureChanged(CWnd *pWnd);
afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
//}}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)