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