00001
00002
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00016
00017 #if !defined(AFX_RESIZABLEGRIP_H__INCLUDED_)
00018 #define AFX_RESIZABLEGRIP_H__INCLUDED_
00019
00020 #if _MSC_VER > 1000
00021 #pragma once
00022 #endif // _MSC_VER > 1000
00023
00024 class CResizableGrip
00025 {
00026 private:
00027 class CSizeGrip : public CScrollBar
00028 {
00029 public:
00030 CSizeGrip()
00031 {
00032 m_bTransparent = FALSE;
00033 m_bTriangular = FALSE;
00034 m_size.cx = 0;
00035 m_size.cy = 0;
00036 }
00037
00038 void SetTriangularShape(BOOL bEnable);
00039 void SetTransparency(BOOL bActivate);
00040
00041 BOOL IsRTL();
00042
00043 virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
00044
00045 SIZE m_size;
00046
00047 protected:
00048 virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00049
00050 BOOL m_bTriangular;
00051 BOOL m_bTransparent;
00052
00053
00054 CDC m_dcGrip, m_dcMask;
00055 CBitmap m_bmGrip, m_bmMask;
00056 };
00057
00058 CSizeGrip m_wndGrip;
00059 int m_nShowCount;
00060
00061 protected:
00062
00063 BOOL CreateSizeGrip(BOOL bVisible = TRUE,
00064 BOOL bTriangular = TRUE, BOOL bTransparent = FALSE);
00065
00066 BOOL IsSizeGripVisible();
00067 void SetSizeGripVisibility(BOOL bVisible);
00068 void UpdateSizeGrip();
00069 void ShowSizeGrip(DWORD* pStatus, DWORD dwMask = 1);
00070 void HideSizeGrip(DWORD* pStatus, DWORD dwMask = 1);
00071 BOOL SetSizeGripBkMode(int nBkMode);
00072 void SetSizeGripShape(BOOL bTriangular);
00073
00074 virtual CWnd* GetResizableWnd() = 0;
00075
00076 public:
00077 CResizableGrip();
00078 virtual ~CResizableGrip();
00079 };
00080
00081 #endif // !defined(AFX_RESIZABLEGRIP_H__INCLUDED_)