1 /* 2 * PROJECT: PAINT for ReactOS 3 * LICENSE: LGPL 4 * FILE: base/applications/mspaint/toolsettings.h 5 * PURPOSE: Window procedure of the tool settings window 6 * PROGRAMMERS: Benedikt Freisen 7 */ 8 9 #pragma once 10 11 class CToolSettingsWindow : public CWindowImpl<CToolSettingsWindow> 12 { 13 public: 14 DECLARE_WND_CLASS_EX(_T("ToolSettings"), CS_DBLCLKS, COLOR_BTNFACE) 15 16 BEGIN_MSG_MAP(CToolSettingsWindow) 17 MESSAGE_HANDLER(WM_CREATE, OnCreate) 18 MESSAGE_HANDLER(WM_VSCROLL, OnVScroll) 19 MESSAGE_HANDLER(WM_PAINT, OnPaint) 20 MESSAGE_HANDLER(WM_LBUTTONDOWN, OnLButtonDown) 21 MESSAGE_HANDLER(WM_TOOLSMODELTOOLCHANGED, OnToolsModelToolChanged) 22 MESSAGE_HANDLER(WM_TOOLSMODELSETTINGSCHANGED, OnToolsModelSettingsChanged) 23 MESSAGE_HANDLER(WM_TOOLSMODELZOOMCHANGED, OnToolsModelZoomChanged) 24 MESSAGE_HANDLER(WM_DESTROY, OnDestroy) 25 END_MSG_MAP() 26 27 BOOL DoCreate(HWND hwndParent); 28 29 private: 30 CWindow trackbarZoom; 31 HICON m_hNontranspIcon; 32 HICON m_hTranspIcon; 33 34 VOID drawTrans(HDC hdc, LPCRECT prc); 35 VOID drawRubber(HDC hdc, LPCRECT prc); 36 VOID drawBrush(HDC hdc, LPCRECT prc); 37 VOID drawLine(HDC hdc, LPCRECT prc); 38 VOID drawBox(HDC hdc, LPCRECT prc); 39 VOID drawAirBrush(HDC hdc, LPCRECT prc); 40 VOID calculateTwoBoxes(RECT& rect1, RECT& rect2); 41 42 LRESULT OnCreate(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); 43 LRESULT OnDestroy(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); 44 LRESULT OnVScroll(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); 45 LRESULT OnPaint(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); 46 LRESULT OnLButtonDown(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); 47 LRESULT OnToolsModelToolChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); 48 LRESULT OnToolsModelSettingsChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); 49 LRESULT OnToolsModelZoomChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); 50 }; 51