-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMWNCColor.h
63 lines (48 loc) · 2.37 KB
/
MWNCColor.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
#pragma once
#include <Windows.h>
#include "MWMenu.h"
#define ICON_NOT_SET 0xFFFF
//
/////////////////////////////////////////////////////////////////////////////
//
/////////////////////////////////////////////////////////////////////////////
class CMWNCColor
{
public:
CMWNCColor(void);
virtual ~CMWNCColor(void);
protected :
// Different Rect for handle mouse action
CRect m_IconRect;
CRect m_CloseRect;
CRect m_MaximizeRect;
CRect m_MinimizeRect;
//
CMWMenu *m_pContextMenu;
UINT m_iHover;
//
BOOL m_bLeftPressed;
CRect m_windowRECT;
CPoint m_LeftPressedPoint;
public :
void DrawResizedIcon ( CDC *pDC, HICON hIcon, const RECT *pRect );
BOOL ScreenPointOverRect ( CWnd *pWnd, CPoint pt, CRect cRect );
// To draw Background only set icon to zero
void DrawIconFrame ( CDC *pDC, const CRect rect, bool bFillRect = true, CBrush *pbr = NULL );
void DrawIcon ( CDC *pDC, UINT icon, const CRect rect, bool bFillRect = true, CBrush *pbr = NULL );
void DrawAllIcons ( CWnd *pWnd, UINT iconOnly = 0 );
// Return TRUE if treated, FALSE if default must be done
BOOL PaintCaption( CWnd *pWnd, BOOL bActive = FALSE, int darkIndicator = 2 );
BOOL PaintWindow( CWnd *pWnd, BOOL bActive = FALSE, int darkIndicator = 2 );
BOOL Activate( CWnd *pWnd, BOOL bActive = FALSE, int darkIndicator = 2 );
RECT GetMenuRect ( CWnd *pWnd, CDC *pDC );
// Return TRUE if treated, FALSE if default must be done
BOOL OnNcLButtonDown(CWnd *pWnd, UINT nHitTest, CPoint point, int darkIndicator = 2 );
BOOL OnNcLButtonUp(CWnd *pWnd, UINT nHitTest, CPoint point, int darkIndicator = 2);
BOOL OnNcRButtonDown(CWnd *pWnd, UINT nHitTest, CPoint point, int darkIndicator = 2);
BOOL OnNcMouseMove(CWnd *pWnd, UINT nHitTest, CPoint point, int darkIndicator = 2);
BOOL OnMouseMove(CWnd *pWnd, UINT nFlags, CPoint point, int darkIndicator = 2);
BOOL OnLButtonUp(CWnd *pWnd, UINT nFlags, CPoint point);
BOOL OnNcMouseHover(CWnd *pWnd, UINT nFlags, CPoint point );
BOOL OnNcMouseLeave(CWnd *pWnd );
};