1 /* 2 * PROJECT: PAINT for ReactOS 3 * LICENSE: LGPL-2.0-or-later (https://spdx.org/licenses/LGPL-2.0-or-later) 4 * PURPOSE: Window procedure of the tool settings window 5 * COPYRIGHT: Copyright 2015 Benedikt Freisen <b.freisen@gmx.net> 6 */ 7 8 #pragma once 9 10 class CToolSettingsWindow : public CWindowImpl<CToolSettingsWindow> 11 { 12 public: 13 DECLARE_WND_CLASS_EX(L"ToolSettings", CS_DBLCLKS, COLOR_BTNFACE) 14 15 BEGIN_MSG_MAP(CToolSettingsWindow) 16 MESSAGE_HANDLER(WM_CREATE, OnCreate) 17 MESSAGE_HANDLER(WM_VSCROLL, OnVScroll) 18 MESSAGE_HANDLER(WM_PAINT, OnPaint) 19 MESSAGE_HANDLER(WM_LBUTTONDOWN, OnLButtonDown) 20 MESSAGE_HANDLER(WM_NOTIFY, OnNotify) 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(CRect& rect1, CRect& 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 OnNotify(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); 48 LRESULT OnToolsModelToolChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); 49 LRESULT OnToolsModelSettingsChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); 50 LRESULT OnToolsModelZoomChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); 51 }; 52