3 /////////////////////////////////////////////////////////////////////////////
5 // Copyright (c) 2002-2006 Iain Murray, Inference Group, Cavendish, Cambridge.
7 /////////////////////////////////////////////////////////////////////////////
10 #define __Splitter_h__
12 /////////////////////////////////////////////////////////////////////////////
14 // Abstract interface - callback for resize of splitter
19 virtual void Layout() = 0;
22 /////////////////////////////////////////////////////////////////////////////
24 class CSplitter
:public ATL::CWindowImpl
<CSplitter
>
29 CSplitter(CSplitterOwner
* pOwner
,int Pos
);
31 HWND
Create(HWND Parent
);
33 void Move(int Pos
, int Width
);
37 return GetSystemMetrics(SM_CYSIZEFRAME
);
45 static ATL::CWndClassInfo
& GetWndClassInfo()
47 static ATL::CWndClassInfo wc
= \
49 { sizeof(WNDCLASSEX
), CS_HREDRAW
| CS_VREDRAW
, StartWindowProc
, \
50 0, 0, NULL
, NULL
, NULL
, (HBRUSH
)(COLOR_ACTIVEBORDER
+ 1), NULL
, _T("HSplitter"), NULL
}, \
51 NULL
, NULL
, MAKEINTRESOURCE(IDC_SIZENS
), TRUE
, 0, _T("") \
56 BEGIN_MSG_MAP( CSplitter
)
57 MESSAGE_HANDLER(WM_MOUSEMOVE
, OnMouseMove
)
58 MESSAGE_HANDLER(WM_LBUTTONDOWN
, OnLButtonDown
)
59 MESSAGE_HANDLER(WM_LBUTTONUP
, OnLButtonUp
)
70 LRESULT
OnLButtonDown(UINT message
, WPARAM wParam
, LPARAM lParam
, BOOL
& bHandled
);
71 LRESULT
OnLButtonUp(UINT message
, WPARAM wParam
, LPARAM lParam
, BOOL
& bHandled
);
72 LRESULT
OnMouseMove(UINT message
, WPARAM wParam
, LPARAM lParam
, BOOL
& bHandled
);
75 CSplitterOwner
* m_pOwner
;
77 SplitStatus m_SplitStatus
;
80 #endif /* #ifndef __Splitter_h__ */