-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathscbarg.h
97 lines (77 loc) · 2.42 KB
/
scbarg.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
97
#if !defined(__SCBARG_H__)
#define __SCBARG_H__
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
/////////////////////////////////////////////////////////////////////////
// CSCBButton (button info) helper class
class CSCBButton
{
public:
CSCBButton();
void Move(CPoint ptTo) {ptOrg = ptTo; };
CRect GetRect() { return CRect(ptOrg, CSize(13, 13)); };
void Paint(CDC* pDC);
BOOL bPushed;
BOOL bRaised;
protected:
CPoint ptOrg;
};
/////////////////////////////////////////////////////////////////////////
// CSizingControlBar control bar
#ifndef baseCCoolBar
#define baseCCoolBar CSizingControlBar
#endif
class CCoolBar : public baseCCoolBar
{
DECLARE_DYNAMIC(CCoolBar);
// Construction
public:
CCoolBar();
//void AddLine(PCSTR str);
char buf[1024];
CEdit *pOut;
// Attributes
public:
virtual BOOL HasGripper() const;
// Operations
public:
// Overridables
virtual void OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler);
virtual BOOL Create(LPCTSTR lpszWindowName, CWnd* pParentWnd,
CSize sizeDefault, BOOL bHasGripper,
UINT nID, DWORD dwStyle = WS_CHILD | WS_VISIBLE | CBRS_TOP);
virtual BOOL Create(LPCTSTR lpszWindowName, CWnd* pParentWnd,
UINT nID, DWORD dwStyle = WS_CHILD | WS_VISIBLE | CBRS_TOP);
// Overrides
public:
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CCoolBar)
//}}AFX_VIRTUAL
// Implementation
public:
void SetNotifyWindow(HWND hNotifyWnd);
HWND GetNotifyWindow() { return m_hNotifyWnd; };
virtual ~CCoolBar();
protected:
// implementation helpers
virtual void NcPaintGripper(CDC* pDC, CRect rcClient);
virtual void NcCalcClient(LPRECT pRc, UINT nDockBarID);
protected:
int m_cyGripper;
CSCBButton m_biHide;
BOOL m_bActive; // a child has focus
CString m_sFontFace;
HWND m_hNotifyWnd; // 消息通知窗口,默认为父窗口
// Generated message map functions
protected:
//{{AFX_MSG(CCoolBar)
afx_msg UINT OnNcHitTest(CPoint point);
afx_msg void OnNcLButtonUp(UINT nHitTest, CPoint point);
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg LRESULT OnSetText(WPARAM wParam, LPARAM lParam);
afx_msg BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#endif // !defined(__SCBARG_H__)