1 /////////////////////////////////////////////////////////////////////////////
3 // This file is part of ResizableLib
4 // http://sourceforge.net/projects/resizablelib
6 // Copyright (C) 2000-2004 by Paolo Messina
7 // http://www.geocities.com/ppescher - mailto:ppescher@hotmail.com
9 // The contents of this file are subject to the Artistic License (the "License").
10 // You may not use this file except in compliance with the License.
11 // You may obtain a copy of the License at:
12 // http://www.opensource.org/licenses/artistic-license.html
14 // If you find this code useful, credits would be nice!
16 /////////////////////////////////////////////////////////////////////////////
20 * @brief Interface for the CResizableGrip class.
23 #if !defined(AFX_RESIZABLEGRIP_H__INCLUDED_)
24 #define AFX_RESIZABLEGRIP_H__INCLUDED_
28 #endif // _MSC_VER > 1000
30 /*! @addtogroup CoreComponents
34 //! @brief brief_description
41 class CSizeGrip
: public CScrollBar
48 void SetTriangularShape(BOOL bEnable
);
49 void SetTransparency(BOOL bActivate
);
51 BOOL
IsRTL(); // right-to-left layout support
53 LRESULT
WindowProc(UINT message
, WPARAM wParam
, LPARAM lParam
) override
;
55 SIZE m_size
{}; // holds grip size
58 BOOL
PreCreateWindow(CREATESTRUCT
& cs
) override
;
60 BOOL m_bTriangular
= FALSE
; // triangular shape active
61 BOOL m_bTransparent
= FALSE
; // transparency active
63 // memory DCs and bitmaps for transparent grip
64 CDC m_dcGrip
, m_dcMask
;
65 CBitmap m_bmGrip
, m_bmMask
;
68 CSizeGrip m_wndGrip
; // grip control
69 int m_nShowCount
= 0; // support for hiding the grip
72 // create a size grip, with options
73 BOOL
CreateSizeGrip(BOOL bVisible
= TRUE
,
74 BOOL bTriangular
= TRUE
, BOOL bTransparent
= FALSE
);
76 BOOL
IsSizeGripVisible(); // TRUE if grip is set to be visible
77 void SetSizeGripVisibility(BOOL bVisible
); // set default visibility
78 void UpdateSizeGrip(); // update the grip's visibility and position
79 void ShowSizeGrip(DWORD
* pStatus
, DWORD dwMask
= 1); // temp show the size grip
80 void HideSizeGrip(DWORD
* pStatus
, DWORD dwMask
= 1); // temp hide the size grip
81 BOOL
SetSizeGripBkMode(int nBkMode
); // like CDC::SetBkMode
82 void SetSizeGripShape(BOOL bTriangular
);
84 virtual CWnd
* GetResizableWnd() const = 0;
88 virtual ~CResizableGrip();
92 #endif // !defined(AFX_RESIZABLEGRIP_H__INCLUDED_)