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
46 m_bTransparent
= FALSE
;
47 m_bTriangular
= FALSE
;
50 void SetTriangularShape(BOOL bEnable
);
51 void SetTransparency(BOOL bActivate
);
53 BOOL
IsRTL(); // right-to-left layout support
55 virtual LRESULT
WindowProc(UINT message
, WPARAM wParam
, LPARAM lParam
);
57 SIZE m_size
; // holds grip size
60 virtual BOOL
PreCreateWindow(CREATESTRUCT
& cs
);
62 BOOL m_bTriangular
; // triangular shape active
63 BOOL m_bTransparent
; // transparency active
65 // memory DCs and bitmaps for transparent grip
66 CDC m_dcGrip
, m_dcMask
;
67 CBitmap m_bmGrip
, m_bmMask
;
70 CSizeGrip m_wndGrip
; // grip control
71 int m_nShowCount
; // support for hiding the grip
74 // create a size grip, with options
75 BOOL
CreateSizeGrip(BOOL bVisible
= TRUE
,
76 BOOL bTriangular
= TRUE
, BOOL bTransparent
= FALSE
);
78 BOOL
IsSizeGripVisible(); // TRUE if grip is set to be visible
79 void SetSizeGripVisibility(BOOL bVisible
); // set default visibility
80 void UpdateSizeGrip(); // update the grip's visibility and position
81 void ShowSizeGrip(DWORD
* pStatus
, DWORD dwMask
= 1); // temp show the size grip
82 void HideSizeGrip(DWORD
* pStatus
, DWORD dwMask
= 1); // temp hide the size grip
83 BOOL
SetSizeGripBkMode(int nBkMode
); // like CDC::SetBkMode
84 void SetSizeGripShape(BOOL bTriangular
);
86 virtual CWnd
* GetResizableWnd() const = 0;
90 virtual ~CResizableGrip();
94 #endif // !defined(AFX_RESIZABLEGRIP_H__INCLUDED_)