forked from WinMerge/winmerge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscbarg.h
109 lines (90 loc) · 2.88 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
98
99
100
101
102
103
104
105
106
107
108
109
/////////////////////////////////////////////////////////////////////////
//
// CSizingControlBarG Version 2.44
//
// Created: Jan 24, 1998 Last Modified: March 31, 2002
//
// See the official site at www.datamekanix.com for documentation and
// the latest news.
//
/////////////////////////////////////////////////////////////////////////
// Copyright (C) 1998-2002 by Cristi Posea. All rights reserved.
//
// This code is free for personal and commercial use, providing this
// notice remains intact in the source files and all eventual changes are
// clearly marked with comments.
//
// You must obtain the author's consent before you can include this code
// in a software library.
//
// No warrantee of any kind, express or implied, is included with this
// software; use at your own risk, responsibility for damages (if any) to
// anyone resulting from the use of this software rests entirely with the
// user.
//
// Send bug reports, bug fixes, enhancements, requests, flames, etc. to
// cristi@datamekanix.com or post them at the message board at the site.
/////////////////////////////////////////////////////////////////////////
#pragma once
// MFC 8/VS.NET 2005 has breaking change in OnNcHitTest return value
#ifndef NCHITTEST_RESULT
#if _MFC_VER >= 0x0800
#define NCHITTEST_RESULT LRESULT
#else
#define NCHITTEST_RESULT UINT
#endif
#endif
/////////////////////////////////////////////////////////////////////////
// CSCBButton (button info) helper class
class CSCBButton
{
public:
CSCBButton();
void Move(CPoint ptTo) {ptOrg = ptTo; };
void Paint(CDC* pDC);
bool bPushed;
bool bRaised;
const double dblBoxSize = 8.25;
CPoint ptOrg;
};
/////////////////////////////////////////////////////////////////////////
// CSizingControlBar control bar
#ifndef baseCSizingControlBarG
#define baseCSizingControlBarG CSizingControlBar
#endif
class CSizingControlBarG : public baseCSizingControlBarG
{
DECLARE_DYNAMIC(CSizingControlBarG);
// Construction
public:
CSizingControlBarG();
// Attributes
public:
virtual bool HasGripper() const;
// Operations
public:
// Overridables
virtual void OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler) override;
// Overrides
public:
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CSizingControlBarG)
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CSizingControlBarG();
protected:
// implementation helpers
virtual void NcPaintGripper(CDC* pDC, CRect rcClient) override;
virtual void NcCalcClient(LPRECT pRc, UINT nDockBarID) override;
protected:
const double m_dblGripper = 9.0;
CSCBButton m_biHide;
// Generated message map functions
protected:
//{{AFX_MSG(CSizingControlBarG)
afx_msg NCHITTEST_RESULT OnNcHitTest(CPoint point);
afx_msg void OnNcLButtonUp(UINT nHitTest, CPoint point);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};