// splitter.h // // Revision Log // // Date Who SAR Notes // ========== === ======= ===================================== // (c) Reliable Software, 1997, 98 // Bartosz Milewski, www.relisoft.com // 2001-11-06 mph Nomenclature // #ifndef SPLITTER_H__ #define SPLITTER_H__ #include "WindowHandle.h" #include "Tools.h" namespace rfc { namespace SplitterClassDefinition { void RegisterClass(HINSTANCE hInst); } // SplitterClassDefinition namespace SplitterMaker { void MakeWindow(WindowHandle & hwndSplitter /* out */, WindowHandle hwndParent, int childId); } // SplitterMaker class CPens3d { public: CPens3d(); Pen & Hilight() { return _penHilight; } Pen & Light() { return _penLight; } Pen & Shadow() { return _penShadow; } Pen & DkShadow() { return _penDkShadow; } private: Pen _penHilight; Pen _penLight; Pen _penShadow; Pen _penDkShadow; }; class CSplitController { public: CSplitController(HWND hwnd, CREATESTRUCT * pCreat); HWND Hwnd() const { return _hwnd; } void Size(int cx, int cy) { _cx = cx; _cy = cy; } void Paint(); void LButtonDown(POINTS pt); void LButtonUp(POINTS pt); void LButtonDrag(POINTS pt); void CaptureChanged(); static LRESULT CALLBACK WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); private: WindowHandle _hwnd; WindowHandle _hwndParent; int _cx; int _cy; int _dragStart; int _dragX; CPens3d _pens; }; } // namespace rfc #endif // SPLITTER_H__