ReactOS 0.4.15-dev-6068-g8061a6f
CToolSettingsWindow Class Reference

#include <toolsettings.h>

Inheritance diagram for CToolSettingsWindow:
Collaboration diagram for CToolSettingsWindow:

Public Member Functions

BOOL DoCreate (HWND hwndParent)
 

Private Member Functions

VOID drawTrans (HDC hdc, LPCRECT prc)
 
VOID drawRubber (HDC hdc, LPCRECT prc)
 
VOID drawBrush (HDC hdc, LPCRECT prc)
 
VOID drawLine (HDC hdc, LPCRECT prc)
 
VOID drawBox (HDC hdc, LPCRECT prc)
 
VOID drawAirBrush (HDC hdc, LPCRECT prc)
 
VOID calculateTwoBoxes (RECT &rect1, RECT &rect2)
 
LRESULT OnCreate (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnDestroy (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnVScroll (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnPaint (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnLButtonDown (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnToolsModelToolChanged (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnToolsModelSettingsChanged (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnToolsModelZoomChanged (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 

Private Attributes

CWindow trackbarZoom
 
HICON m_hNontranspIcon
 
HICON m_hTranspIcon
 

Detailed Description

Definition at line 11 of file toolsettings.h.

Member Function Documentation

◆ calculateTwoBoxes()

VOID CToolSettingsWindow::calculateTwoBoxes ( RECT rect1,
RECT rect2 
)
private

Definition at line 291 of file toolsettings.cpp.

292{
293 RECT rcClient;
294 GetClientRect(&rcClient);
295 ::InflateRect(&rcClient, -MARGIN1, -MARGIN1);
296
297 INT yCenter = (rcClient.top + rcClient.bottom) / 2;
298 ::SetRect(&rect1, rcClient.left, rcClient.top, rcClient.right, yCenter);
299 ::SetRect(&rect2, rcClient.left, yCenter, rcClient.right, rcClient.bottom);
300
301 ::InflateRect(&rect1, -MARGIN2, -MARGIN2);
303}
RECT rect2
Definition: edittest.c:51
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
#define MARGIN2
#define MARGIN1
int32_t INT
Definition: typedefs.h:58
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI InflateRect(_Inout_ LPRECT, _In_ int, _In_ int)
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)

Referenced by OnLButtonDown(), and OnPaint().

◆ DoCreate()

BOOL CToolSettingsWindow::DoCreate ( HWND  hwndParent)

Definition at line 31 of file toolsettings.cpp.

32{
33 RECT toolSettingsWindowPos =
34 {
37 };
38 return !!Create(toolBoxContainer, toolSettingsWindowPos, NULL, WS_CHILD | WS_VISIBLE);
39}
@ Create
Definition: registry.c:563
#define NULL
Definition: types.h:112
CToolBox toolBoxContainer
Definition: toolbox.cpp:12
#define WS_CHILD
Definition: pedump.c:617
#define WS_VISIBLE
Definition: pedump.c:620
#define Y_TOOLSETTINGS
#define CY_TOOLSETTINGS
#define CX_TOOLSETTINGS
#define X_TOOLSETTINGS

Referenced by CToolBox::OnCreate().

◆ drawAirBrush()

VOID CToolSettingsWindow::drawAirBrush ( HDC  hdc,
LPCRECT  prc 
)
private

Definition at line 190 of file toolsettings.cpp.

191{
192 RECT rects[4];
193 getAirBrushRects(rects, prc);
194
195 srand(0);
196 for (size_t i = 0; i < 4; ++i)
197 {
198 RECT& rc = rects[i];
199 INT x = (rc.left + rc.right) / 2;
200 INT y = (rc.top + rc.bottom) / 2;
202 if (bHigh)
203 {
206 }
207 else
208 {
210 }
211 }
212}
int GetAirBrushWidth() const
Definition: toolsmodel.cpp:113
void Airbrush(HDC hdc, LONG x, LONG y, COLORREF color, LONG r)
Definition: drawing.cpp:151
unsigned int BOOL
Definition: ntddk_ex.h:94
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
ToolsModel toolsModel
Definition: toolsmodel.cpp:11
void __cdecl srand(_In_ unsigned int _Seed)
HDC hdc
Definition: main.c:9
_Out_ LPRECT prc
Definition: ntgdi.h:1658
static const BYTE s_AirRadius[4]
static INT getAirBrushRects(RECT rects[4], LPCRECT prc, LPPOINT ppt=NULL)
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
DWORD WINAPI GetSysColor(_In_ int)
#define COLOR_WINDOWTEXT
Definition: winuser.h:915
#define COLOR_HIGHLIGHT
Definition: winuser.h:920
HBRUSH WINAPI GetSysColorBrush(_In_ int)
#define COLOR_HIGHLIGHTTEXT
Definition: winuser.h:921

Referenced by OnPaint().

◆ drawBox()

VOID CToolSettingsWindow::drawBox ( HDC  hdc,
LPCRECT  prc 
)
private

Definition at line 219 of file toolsettings.cpp.

220{
221 RECT rects[3];
222 getBoxRects(rects, prc);
223
224 for (INT iItem = 0; iItem < 3; ++iItem)
225 {
226 RECT& rcItem = rects[iItem];
227
228 if (toolsModel.GetShapeStyle() == iItem)
230
231 ::InflateRect(&rcItem, -5, -5);
232
233 if (iItem <= 1)
234 {
235 COLORREF rgbPen;
236 if (toolsModel.GetShapeStyle() == iItem)
238 else
240 HGDIOBJ hOldBrush;
241 if (iItem == 0)
243 else
245 HGDIOBJ hOldPen = ::SelectObject(hdc, ::CreatePen(PS_SOLID, 1, rgbPen));
246 ::Rectangle(hdc, rcItem.left, rcItem.top, rcItem.right, rcItem.bottom);
248 ::SelectObject(hdc, hOldBrush);
249 }
250 else
251 {
252 if (toolsModel.GetShapeStyle() == iItem)
254 else
255 ::FillRect(hdc, &rcItem, ::GetSysColorBrush(COLOR_WINDOWTEXT));
256 }
257 }
258}
int GetShapeStyle() const
Definition: toolsmodel.cpp:54
pKey DeleteObject()
static INT getBoxRects(RECT rects[3], LPCRECT prc, LPPOINT ppt=NULL)
DWORD COLORREF
Definition: windef.h:300
HGDIOBJ WINAPI GetStockObject(_In_ int)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1539
#define NULL_BRUSH
Definition: wingdi.h:901
BOOL WINAPI Rectangle(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int)
HPEN WINAPI CreatePen(_In_ int, _In_ int, _In_ COLORREF)
#define PS_SOLID
Definition: wingdi.h:586
#define COLOR_APPWORKSPACE
Definition: winuser.h:919

Referenced by OnPaint().

◆ drawBrush()

VOID CToolSettingsWindow::drawBrush ( HDC  hdc,
LPCRECT  prc 
)
private

Definition at line 117 of file toolsettings.cpp.

118{
119 RECT rects[12];
120 getBrushRects(rects, prc);
121
122 HBRUSH hbrHigh = ::GetSysColorBrush(COLOR_HIGHLIGHT);
123 ::FillRect(hdc, &rects[toolsModel.GetBrushStyle()], hbrHigh);
124
125 for (INT i = 0; i < 12; i++)
126 {
127 RECT rcItem = rects[i];
128 INT x = (rcItem.left + rcItem.right) / 2, y = (rcItem.top + rcItem.bottom) / 2;
129 INT iColor;
130 if (i == toolsModel.GetBrushStyle())
132 else
134 Brush(hdc, x, y, x, y, ::GetSysColor(iColor), i);
135 }
136}
int GetBrushStyle() const
Definition: toolsmodel.cpp:65
static INT getBrushRects(RECT rects[12], LPCRECT prc, LPPOINT ppt=NULL)
_In_ ULONG iColor
Definition: xlateobj.h:17

Referenced by OnPaint().

◆ drawLine()

VOID CToolSettingsWindow::drawLine ( HDC  hdc,
LPCRECT  prc 
)
private

Definition at line 143 of file toolsettings.cpp.

144{
145 RECT rects[5];
146 getLineRects(rects, prc);
147
148 for (INT i = 0; i < 5; i++)
149 {
150 INT penWidth = i + 1;
151 RECT rcLine = rects[i];
152 ::InflateRect(&rcLine, -2, 0);
153 rcLine.top = (rcLine.top + rcLine.bottom - penWidth) / 2;
154 rcLine.bottom = rcLine.top + penWidth;
155 if (toolsModel.GetLineWidth() == penWidth)
156 {
159 }
160 else
161 {
163 }
164 }
165}
int GetLineWidth() const
Definition: toolsmodel.cpp:43
static INT getLineRects(RECT rects[5], LPCRECT prc, LPPOINT ppt=NULL)

Referenced by OnPaint().

◆ drawRubber()

VOID CToolSettingsWindow::drawRubber ( HDC  hdc,
LPCRECT  prc 
)
private

Definition at line 85 of file toolsettings.cpp.

86{
87 RECT rects[4], rcRubber;
88 getRubberRects(rects, prc);
89 INT xCenter = (prc->left + prc->right) / 2;
90 for (INT i = 0; i < 4; i++)
91 {
92 INT iColor, radius = i + 2;
93 if (toolsModel.GetRubberRadius() == radius)
94 {
97 }
98 else
99 {
101 }
102
103 INT yCenter = (rects[i].top + rects[i].bottom) / 2;
104 rcRubber.left = xCenter - radius;
105 rcRubber.top = yCenter - radius;
106 rcRubber.right = rcRubber.left + radius * 2;
107 rcRubber.bottom = rcRubber.top + radius * 2;
109 }
110}
int GetRubberRadius() const
Definition: toolsmodel.cpp:124
static INT getRubberRects(RECT rects[4], LPCRECT prc, LPPOINT ppt=NULL)

Referenced by OnPaint().

◆ drawTrans()

VOID CToolSettingsWindow::drawTrans ( HDC  hdc,
LPCRECT  prc 
)
private

Definition at line 67 of file toolsettings.cpp.

68{
69 RECT rc[2];
70 getTransRects(rc, prc);
71
72 HBRUSH hbrHigh = ::GetSysColorBrush(COLOR_HIGHLIGHT);
76 ::DrawIconEx(hdc, rc[1].left, rc[1].top, m_hTranspIcon,
78}
BOOL IsBackgroundTransparent() const
Definition: toolsmodel.cpp:135
GLdouble GLdouble GLdouble GLdouble top
Definition: glext.h:10859
GLint left
Definition: glext.h:7726
#define CY_TRANS_ICON
#define CX_TRANS_ICON
static INT getTransRects(RECT rects[2], LPCRECT prc, LPPOINT ppt=NULL)
#define DI_NORMAL
Definition: wingdi.h:72
BOOL WINAPI DrawIconEx(_In_ HDC, _In_ int, _In_ int, _In_ HICON, _In_ int, _In_ int, _In_ UINT, _In_opt_ HBRUSH, _In_ UINT)
Definition: cursoricon.c:1997

Referenced by OnPaint().

◆ OnCreate()

LRESULT CToolSettingsWindow::OnCreate ( UINT  nMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
private

Definition at line 260 of file toolsettings.cpp.

261{
262 /* preloading the draw transparent/nontransparent icons for later use */
267
268 RECT trackbarZoomPos = {1, 1, 1 + 40, 1 + 64};
269 trackbarZoom.Create(TRACKBAR_CLASS, m_hWnd, trackbarZoomPos, NULL, WS_CHILD | TBS_VERT | TBS_AUTOTICKS);
272 return 0;
273}
#define IDI_NONTRANSPARENT
Definition: resource.h:19
#define IDI_TRANSPARENT
Definition: resource.h:18
HWND Create(LPCTSTR lpstrWndClass, HWND hWndParent, _U_RECT rect=NULL, LPCTSTR szWindowName=NULL, DWORD dwStyle=0, DWORD dwExStyle=0, _U_MENUorID MenuOrID=0U, LPVOID lpCreateParam=NULL)
Definition: atlwin.h:411
LRESULT SendMessage(UINT message, WPARAM wParam=0, LPARAM lParam=0)
Definition: atlwin.h:1110
#define TRUE
Definition: types.h:120
HINSTANCE hProgInstance
Definition: main.cpp:15
static HICON
Definition: imagelist.c:84
#define TBS_VERT
Definition: commctrl.h:2016
#define TBM_SETRANGE
Definition: commctrl.h:2037
#define TBM_SETPOS
Definition: commctrl.h:2036
#define TBS_AUTOTICKS
Definition: commctrl.h:2015
#define TRACKBAR_CLASS
Definition: commctrl.h:2013
LONG_PTR LPARAM
Definition: windef.h:208
UINT_PTR WPARAM
Definition: windef.h:207
#define MAKELPARAM(l, h)
Definition: winuser.h:3998
#define IMAGE_ICON
Definition: winuser.h:212
#define LoadImage
Definition: winuser.h:5805
#define LR_DEFAULTCOLOR
Definition: winuser.h:1081
#define MAKEINTRESOURCE
Definition: winuser.h:591

◆ OnDestroy()

LRESULT CToolSettingsWindow::OnDestroy ( UINT  nMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
private

Definition at line 275 of file toolsettings.cpp.

276{
279 return 0;
280}
BOOL WINAPI DestroyIcon(_In_ HICON)
Definition: cursoricon.c:2022

◆ OnLButtonDown()

LRESULT CToolSettingsWindow::OnLButtonDown ( UINT  nMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
private

Definition at line 360 of file toolsettings.cpp.

361{
363
364 RECT rect1, rect2;
365 calculateTwoBoxes(rect1, rect2);
366 RECT rects[12];
367
368 INT iItem;
369 switch (toolsModel.GetActiveTool())
370 {
371 case TOOL_FREESEL:
372 case TOOL_RECTSEL:
373 case TOOL_TEXT:
374 iItem = getTransRects(rects, &rect1, &pt);
375 if (iItem != -1)
377 break;
378 case TOOL_RUBBER:
379 iItem = getRubberRects(rects, &rect1, &pt);
380 if (iItem != -1)
381 toolsModel.SetRubberRadius(iItem + 2);
382 break;
383 case TOOL_BRUSH:
384 iItem = getBrushRects(rects, &rect1, &pt);
385 if (iItem != -1)
387 break;
388 case TOOL_AIRBRUSH:
389 iItem = getAirBrushRects(rects, &rect1, &pt);
390 if (iItem != -1)
392 break;
393 case TOOL_LINE:
394 case TOOL_BEZIER:
395 iItem = getLineRects(rects, &rect1, &pt);
396 if (iItem != -1)
397 toolsModel.SetLineWidth(iItem + 1);
398 break;
399 case TOOL_RECT:
400 case TOOL_SHAPE:
401 case TOOL_ELLIPSE:
402 case TOOL_RRECT:
403 iItem = getBoxRects(rects, &rect1, &pt);
404 if (iItem != -1)
406
407 iItem = getLineRects(rects, &rect2, &pt);
408 if (iItem != -1)
409 toolsModel.SetLineWidth(iItem + 1);
410 break;
411 case TOOL_FILL:
412 case TOOL_COLOR:
413 case TOOL_ZOOM:
414 case TOOL_PEN:
415 break;
416 }
417
418 ::SetCapture(::GetParent(m_hWnd));
419 return 0;
420}
VOID calculateTwoBoxes(RECT &rect1, RECT &rect2)
void SetAirBrushWidth(int nAirBrushWidth)
Definition: toolsmodel.cpp:118
void SetShapeStyle(int nShapeStyle)
Definition: toolsmodel.cpp:59
void SetRubberRadius(int nRubberRadius)
Definition: toolsmodel.cpp:129
void SetBrushStyle(int nBrushStyle)
Definition: toolsmodel.cpp:70
void SetBackgroundTransparent(BOOL bTransparent)
Definition: toolsmodel.cpp:140
TOOLTYPE GetActiveTool() const
Definition: toolsmodel.cpp:76
void SetLineWidth(int nLineWidth)
Definition: toolsmodel.cpp:48
LPARAM lParam
Definition: combotst.c:139
#define pt(x, y)
Definition: drawing.c:79
@ TOOL_AIRBRUSH
Definition: toolsmodel.h:21
@ TOOL_COLOR
Definition: toolsmodel.h:17
@ TOOL_SHAPE
Definition: toolsmodel.h:26
@ TOOL_RUBBER
Definition: toolsmodel.h:15
@ TOOL_BRUSH
Definition: toolsmodel.h:20
@ TOOL_RECT
Definition: toolsmodel.h:25
@ TOOL_BEZIER
Definition: toolsmodel.h:24
@ TOOL_FILL
Definition: toolsmodel.h:16
@ TOOL_TEXT
Definition: toolsmodel.h:22
@ TOOL_PEN
Definition: toolsmodel.h:19
@ TOOL_LINE
Definition: toolsmodel.h:23
@ TOOL_FREESEL
Definition: toolsmodel.h:13
@ TOOL_ZOOM
Definition: toolsmodel.h:18
@ TOOL_ELLIPSE
Definition: toolsmodel.h:27
@ TOOL_RRECT
Definition: toolsmodel.h:28
@ TOOL_RECTSEL
Definition: toolsmodel.h:14
#define GET_Y_LPARAM(lp)
Definition: windowsx.h:300
#define GET_X_LPARAM(lp)
Definition: windowsx.h:299
HWND WINAPI SetCapture(_In_ HWND hWnd)
HWND WINAPI GetParent(_In_ HWND)

◆ OnPaint()

LRESULT CToolSettingsWindow::OnPaint ( UINT  nMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
private

Definition at line 305 of file toolsettings.cpp.

306{
307 RECT rect1, rect2;
308 calculateTwoBoxes(rect1, rect2);
309
310 PAINTSTRUCT ps;
311 HDC hdc = BeginPaint(&ps);
312
315 else
316 ::DrawEdge(hdc, &rect1, BDR_SUNKENOUTER, BF_RECT | BF_MIDDLE);
317
320
321 ::InflateRect(&rect1, -MARGIN2, -MARGIN2);
323 switch (toolsModel.GetActiveTool())
324 {
325 case TOOL_FREESEL:
326 case TOOL_RECTSEL:
327 case TOOL_TEXT:
328 drawTrans(hdc, &rect1);
329 break;
330 case TOOL_RUBBER:
331 drawRubber(hdc, &rect1);
332 break;
333 case TOOL_BRUSH:
334 drawBrush(hdc, &rect1);
335 break;
336 case TOOL_AIRBRUSH:
337 drawAirBrush(hdc, &rect1);
338 break;
339 case TOOL_LINE:
340 case TOOL_BEZIER:
341 drawLine(hdc, &rect1);
342 break;
343 case TOOL_RECT:
344 case TOOL_SHAPE:
345 case TOOL_ELLIPSE:
346 case TOOL_RRECT:
347 drawBox(hdc, &rect1);
348 drawLine(hdc, &rect2);
349 break;
350 case TOOL_FILL:
351 case TOOL_COLOR:
352 case TOOL_ZOOM:
353 case TOOL_PEN:
354 break;
355 }
356 EndPaint(&ps);
357 return 0;
358}
VOID drawBrush(HDC hdc, LPCRECT prc)
VOID drawBox(HDC hdc, LPCRECT prc)
VOID drawLine(HDC hdc, LPCRECT prc)
VOID drawAirBrush(HDC hdc, LPCRECT prc)
VOID drawRubber(HDC hdc, LPCRECT prc)
VOID drawTrans(HDC hdc, LPCRECT prc)
static HDC
Definition: imagelist.c:92
#define BDR_SUNKENOUTER
Definition: winuser.h:443
#define BF_MIDDLE
Definition: winuser.h:468
BOOL WINAPI DrawEdge(_In_ HDC, _Inout_ LPRECT, _In_ UINT, _In_ UINT)
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
#define BF_RECT
Definition: winuser.h:462

◆ OnToolsModelSettingsChanged()

LRESULT CToolSettingsWindow::OnToolsModelSettingsChanged ( UINT  nMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
private

Definition at line 429 of file toolsettings.cpp.

430{
431 Invalidate();
432 return 0;
433}

◆ OnToolsModelToolChanged()

LRESULT CToolSettingsWindow::OnToolsModelToolChanged ( UINT  nMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
private

Definition at line 422 of file toolsettings.cpp.

423{
424 Invalidate();
426 return 0;
427}
BOOL ShowWindow(int nCmdShow)
Definition: atlwin.h:1327
WPARAM wParam
Definition: combotst.c:138
#define SW_HIDE
Definition: winuser.h:762
#define SW_SHOW
Definition: winuser.h:769

◆ OnToolsModelZoomChanged()

LRESULT CToolSettingsWindow::OnToolsModelZoomChanged ( UINT  nMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
private

Definition at line 435 of file toolsettings.cpp.

436{
437 int tbPos = 0;
438 int tempZoom = toolsModel.GetZoom();
439
440 while (tempZoom > MIN_ZOOM)
441 {
442 tbPos++;
443 tempZoom = tempZoom >> 1;
444 }
446 return 0;
447}
#define MIN_ZOOM
Definition: common.h:14
int GetZoom() const
Definition: toolsmodel.cpp:148

Referenced by OnVScroll().

◆ OnVScroll()

LRESULT CToolSettingsWindow::OnVScroll ( UINT  nMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
private

Definition at line 282 of file toolsettings.cpp.

283{
284 if (!zoomTo(125 << trackbarZoom.SendMessage(TBM_GETPOS, 0, 0), 0, 0))
285 {
286 OnToolsModelZoomChanged(nMsg, wParam, lParam, bHandled);
287 }
288 return 0;
289}
BOOL zoomTo(int newZoom, int mouseX, int mouseY)
Definition: winproc.cpp:46
LRESULT OnToolsModelZoomChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
#define TBM_GETPOS
Definition: commctrl.h:2031

Member Data Documentation

◆ m_hNontranspIcon

HICON CToolSettingsWindow::m_hNontranspIcon
private

Definition at line 31 of file toolsettings.h.

Referenced by drawTrans(), OnCreate(), and OnDestroy().

◆ m_hTranspIcon

HICON CToolSettingsWindow::m_hTranspIcon
private

Definition at line 32 of file toolsettings.h.

Referenced by drawTrans(), OnCreate(), and OnDestroy().

◆ trackbarZoom

CWindow CToolSettingsWindow::trackbarZoom
private

The documentation for this class was generated from the following files: