blob: 3672918bbf1ffe5c4673eaf9bb1282c6cb633ca6 (
plain)
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
|
#if !defined(AFX_CDXCSIZEICONCTRL_H__9B4AD1C3_8AA5_11D2_BE9C_000000000000__INCLUDED_)
#define AFX_CDXCSIZEICONCTRL_H__9B4AD1C3_8AA5_11D2_BE9C_000000000000__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
// cdxCSizeIconCtrl.h : header file
//
//
// cdxCSizeIconCtrl.h : header file
// -----------------------------------------------------------------------
// Author: Hans Bühler (hb@codex-design.de)
// codex design (http://www.codex-design.de)
// Version: 1.3
// -----------------------------------------------------------------------
// Changes for 1.1:
// - cdxCSizeIconCtrl catches left-mb-doubleclick what caused the window
// to get maximized for any reason.
// Changes for 1.2:
// - Ability to check parent's state: If it is zoomed, the control won't
// draw a sizing icon.
// Changes for 1.3:
// - Icon now has proper colors.
// -----------------------------------------------------------------------
// Comments welcome.
//
/*
* cdxCSizeIconCtrl
* ================
* A simple class that is a size-icon.
*
* (w)Nov.1998 mailto:hans.buehler@student.hu-berlin.de,
* codex design
*/
class cdxCSizeIconCtrl : public CScrollBar
{
DECLARE_DYNAMIC(cdxCSizeIconCtrl);
public:
class AutoOEMImageList : public CImageList
{
private:
CSize m_szImage;
public:
AutoOEMImageList(UINT nBitmapID, COLORREF crMask);
virtual ~AutoOEMImageList() {}
const CSize & Size() const { return m_szImage; }
};
private:
bool m_bCapture;
public:
bool m_bReflectParentState;
public:
cdxCSizeIconCtrl(bool bReflectParentState = true) : m_bCapture(false), m_bReflectParentState(bReflectParentState) {}
virtual ~cdxCSizeIconCtrl() {}
virtual BOOL Create(CWnd *pParent, UINT id = AFX_IDW_SIZE_BOX);
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(cdxCSizeIconCtrl)
//}}AFX_VIRTUAL
// Generated message map functions
protected:
//{{AFX_MSG(cdxCSizeIconCtrl)
afx_msg void OnPaint();
afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
//}}AFX_MSG
DECLARE_MESSAGE_MAP();
//
// static members
//
public:
static AutoOEMImageList M_ilImage;
static HCURSOR M_hcSize;
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_CDXCSIZEICONCTRL_H__9B4AD1C3_8AA5_11D2_BE9C_000000000000__INCLUDED_)
|