1 // ResizableGrip.h: interface for the CResizableGrip class.
3 /////////////////////////////////////////////////////////////////////////////
5 // Copyright (C) 2000-2002 by Paolo Messina
6 // (http://www.geocities.com/ppescher - ppescher@yahoo.com)
8 // The contents of this file are subject to the Artistic License (the "License").
9 // You may not use this file except in compliance with the License.
10 // You may obtain a copy of the License at:
11 // http://www.opensource.org/licenses/artistic-license.html
13 // If you find this code useful, credits would be nice!
15 /////////////////////////////////////////////////////////////////////////////
17 #if !defined(AFX_RESIZABLEGRIP_H__INCLUDED_)
18 #define AFX_RESIZABLEGRIP_H__INCLUDED_
22 #endif // _MSC_VER > 1000
27 class CSizeGrip
: public CScrollBar
32 m_bTransparent
= FALSE
;
33 m_bTriangular
= FALSE
;
38 void SetTriangularShape(BOOL bEnable
);
39 void SetTransparency(BOOL bActivate
);
41 BOOL
IsRTL(); // right-to-left layout support
43 virtual LRESULT
WindowProc(UINT message
, WPARAM wParam
, LPARAM lParam
);
45 SIZE m_size
; // holds grip size
48 virtual BOOL
PreCreateWindow(CREATESTRUCT
& cs
);
50 BOOL m_bTriangular
; // triangular shape active
51 BOOL m_bTransparent
; // transparency active
53 // memory DCs and bitmaps for transparent grip
54 CDC m_dcGrip
, m_dcMask
;
55 CBitmap m_bmGrip
, m_bmMask
;
58 CSizeGrip m_wndGrip
; // grip control
59 int m_nShowCount
; // support for hiding the grip
62 // create a size grip, with options
63 BOOL
CreateSizeGrip(BOOL bVisible
= TRUE
,
64 BOOL bTriangular
= TRUE
, BOOL bTransparent
= FALSE
);
66 BOOL
IsSizeGripVisible(); // TRUE if grip is set to be visible
67 void SetSizeGripVisibility(BOOL bVisible
); // set default visibility
68 void UpdateSizeGrip(); // update the grip's visibility and position
69 void ShowSizeGrip(DWORD
* pStatus
, DWORD dwMask
= 1); // temp show the size grip
70 void HideSizeGrip(DWORD
* pStatus
, DWORD dwMask
= 1); // temp hide the size grip
71 BOOL
SetSizeGripBkMode(int nBkMode
); // like CDC::SetBkMode
72 void SetSizeGripShape(BOOL bTriangular
);
74 virtual CWnd
* GetResizableWnd() = 0;
78 virtual ~CResizableGrip();
81 #endif // !defined(AFX_RESIZABLEGRIP_H__INCLUDED_)