ReactOS 0.4.15-dev-6054-gbddd8b0
toolsettings.cpp
Go to the documentation of this file.
1/*
2 * PROJECT: PAINT for ReactOS
3 * LICENSE: LGPL
4 * FILE: base/applications/mspaint/toolsettings.cpp
5 * PURPOSE: Window procedure of the tool settings window
6 * PROGRAMMERS: Benedikt Freisen
7 * Stanislav Motylkov
8 * Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
9 */
10
11/* INCLUDES *********************************************************/
12
13#include "precomp.h"
14
15#define X_TOOLSETTINGS 0
16#define Y_TOOLSETTINGS (CY_TOOLBAR + 3)
17#define CX_TOOLSETTINGS CX_TOOLBAR
18#define CY_TOOLSETTINGS 140
19
20#define CX_TRANS_ICON 40
21#define CY_TRANS_ICON 30
22#define MARGIN1 3
23#define MARGIN2 2
24
25static const BYTE s_AirRadius[4] = { 5, 8, 3, 12 };
26
28
29/* FUNCTIONS ********************************************************/
30
32{
33 RECT toolSettingsWindowPos =
34 {
37 };
38 return !!Create(toolBoxContainer, toolSettingsWindowPos, NULL, WS_CHILD | WS_VISIBLE);
39}
40
41static INT
42getSplitRects(RECT *rects, INT cColumns, INT cRows, LPCRECT prc, LPPOINT ppt)
43{
44 INT cx = prc->right - prc->left, cy = prc->bottom - prc->top;
45 for (INT i = 0, iRow = 0; iRow < cRows; ++iRow)
46 {
47 for (INT iColumn = 0; iColumn < cColumns; ++iColumn)
48 {
49 RECT& rc = rects[i];
50 rc.left = prc->left + (iColumn * cx / cColumns);
51 rc.top = prc->top + (iRow * cy / cRows);
52 rc.right = prc->left + ((iColumn + 1) * cx / cColumns);
53 rc.bottom = prc->top + ((iRow + 1) * cy / cRows);
54 if (ppt && ::PtInRect(&rc, *ppt))
55 return i;
56 ++i;
57 }
58 }
59 return -1;
60}
61
62static inline INT getTransRects(RECT rects[2], LPCRECT prc, LPPOINT ppt = NULL)
63{
64 return getSplitRects(rects, 1, 2, prc, ppt);
65}
66
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}
79
80static inline INT getRubberRects(RECT rects[4], LPCRECT prc, LPPOINT ppt = NULL)
81{
82 return getSplitRects(rects, 1, 4, prc, ppt);
83}
84
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}
111
112static inline INT getBrushRects(RECT rects[12], LPCRECT prc, LPPOINT ppt = NULL)
113{
114 return getSplitRects(rects, 3, 4, prc, ppt);
115}
116
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}
137
138static inline INT getLineRects(RECT rects[5], LPCRECT prc, LPPOINT ppt = NULL)
139{
140 return getSplitRects(rects, 1, 5, prc, ppt);
141}
142
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}
166
168{
169 INT cx = (prc->right - prc->left), cy = (prc->bottom - prc->top);
170
171 rects[0] = rects[1] = rects[2] = rects[3] = *prc;
172
173 rects[0].right = rects[1].left = prc->left + cx * 3 / 8;
174 rects[0].bottom = rects[1].bottom = prc->top + cy / 2;
175
176 rects[2].top = rects[3].top = prc->top + cy / 2;
177 rects[2].right = rects[3].left = prc->left + cx * 2 / 8;
178
179 if (ppt)
180 {
181 for (INT i = 0; i < 4; ++i)
182 {
183 if (::PtInRect(&rects[i], *ppt))
184 return i;
185 }
186 }
187 return -1;
188}
189
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}
213
214static inline INT getBoxRects(RECT rects[3], LPCRECT prc, LPPOINT ppt = NULL)
215{
216 return getSplitRects(rects, 1, 3, prc, ppt);
217}
218
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}
259
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}
274
276{
279 return 0;
280}
281
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}
290
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}
304
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}
359
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}
421
423{
424 Invalidate();
426 return 0;
427}
428
430{
431 Invalidate();
432 return 0;
433}
434
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
BOOL zoomTo(int newZoom, int mouseX, int mouseY)
Definition: winproc.cpp:46
#define IDI_NONTRANSPARENT
Definition: resource.h:19
#define IDI_TRANSPARENT
Definition: resource.h:18
@ Create
Definition: registry.c:563
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
BOOL ShowWindow(int nCmdShow)
Definition: atlwin.h:1327
LRESULT OnCreate(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
LRESULT OnDestroy(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
LRESULT OnPaint(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
LRESULT OnToolsModelToolChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
LRESULT OnLButtonDown(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
VOID drawBrush(HDC hdc, LPCRECT prc)
VOID drawBox(HDC hdc, LPCRECT prc)
LRESULT OnToolsModelZoomChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
VOID drawLine(HDC hdc, LPCRECT prc)
VOID drawAirBrush(HDC hdc, LPCRECT prc)
VOID drawRubber(HDC hdc, LPCRECT prc)
BOOL DoCreate(HWND hwndParent)
VOID drawTrans(HDC hdc, LPCRECT prc)
LRESULT OnToolsModelSettingsChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
VOID calculateTwoBoxes(RECT &rect1, RECT &rect2)
LRESULT OnVScroll(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
int GetZoom() const
Definition: toolsmodel.cpp:148
int GetAirBrushWidth() const
Definition: toolsmodel.cpp:113
int GetLineWidth() const
Definition: toolsmodel.cpp:43
int GetShapeStyle() const
Definition: toolsmodel.cpp:54
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
int GetBrushStyle() const
Definition: toolsmodel.cpp:65
BOOL IsBackgroundTransparent() const
Definition: toolsmodel.cpp:135
void SetBackgroundTransparent(BOOL bTransparent)
Definition: toolsmodel.cpp:140
int GetRubberRadius() const
Definition: toolsmodel.cpp:124
TOOLTYPE GetActiveTool() const
Definition: toolsmodel.cpp:76
void SetLineWidth(int nLineWidth)
Definition: toolsmodel.cpp:48
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
static HWND hwndParent
Definition: cryptui.c:300
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define pt(x, y)
Definition: drawing.c:79
void Airbrush(HDC hdc, LONG x, LONG y, COLORREF color, LONG r)
Definition: drawing.cpp:151
RECT rect2
Definition: edittest.c:51
unsigned int BOOL
Definition: ntddk_ex.h:94
pKey DeleteObject()
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLdouble GLdouble GLdouble GLdouble top
Definition: glext.h:10859
GLint left
Definition: glext.h:7726
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
HINSTANCE hProgInstance
Definition: main.cpp:15
CToolBox toolBoxContainer
Definition: toolbox.cpp:12
void __cdecl srand(_In_ unsigned int _Seed)
HDC hdc
Definition: main.c:9
static HDC
Definition: imagelist.c:92
static HICON
Definition: imagelist.c:84
unsigned int UINT
Definition: ndis.h:50
_Out_ LPRECT prc
Definition: ntgdi.h:1658
#define WS_CHILD
Definition: pedump.c:617
#define WS_VISIBLE
Definition: pedump.c:620
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:586
#define TBM_GETPOS
Definition: commctrl.h:2031
_Out_opt_ int * cx
Definition: commctrl.h:585
#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 right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
static INT getBrushRects(RECT rects[12], LPCRECT prc, LPPOINT ppt=NULL)
#define MARGIN2
#define MARGIN1
#define Y_TOOLSETTINGS
#define CY_TOOLSETTINGS
#define CY_TRANS_ICON
static INT getRubberRects(RECT rects[4], LPCRECT prc, LPPOINT ppt=NULL)
#define CX_TOOLSETTINGS
static INT getBoxRects(RECT rects[3], LPCRECT prc, LPPOINT ppt=NULL)
#define CX_TRANS_ICON
#define X_TOOLSETTINGS
static const BYTE s_AirRadius[4]
static INT getAirBrushRects(RECT rects[4], LPCRECT prc, LPPOINT ppt=NULL)
static INT getTransRects(RECT rects[2], LPCRECT prc, LPPOINT ppt=NULL)
static INT getSplitRects(RECT *rects, INT cColumns, INT cRows, LPCRECT prc, LPPOINT ppt)
CToolSettingsWindow toolSettingsWindow
static INT getLineRects(RECT rects[5], LPCRECT prc, LPPOINT ppt=NULL)
@ 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
int32_t WINBOOL
Definition: typedefs.h:58
int32_t INT
Definition: typedefs.h:58
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207
DWORD COLORREF
Definition: windef.h:300
#define GET_Y_LPARAM(lp)
Definition: windowsx.h:300
#define GET_X_LPARAM(lp)
Definition: windowsx.h:299
HGDIOBJ WINAPI GetStockObject(_In_ int)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1539
#define DI_NORMAL
Definition: wingdi.h:72
#define NULL_BRUSH
Definition: wingdi.h:901
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
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
HWND WINAPI SetCapture(_In_ HWND hWnd)
DWORD WINAPI GetSysColor(_In_ int)
#define SW_HIDE
Definition: winuser.h:762
#define BDR_SUNKENOUTER
Definition: winuser.h:443
#define MAKELPARAM(l, h)
Definition: winuser.h:3998
#define IMAGE_ICON
Definition: winuser.h:212
#define COLOR_WINDOWTEXT
Definition: winuser.h:915
#define COLOR_HIGHLIGHT
Definition: winuser.h:920
HBRUSH WINAPI GetSysColorBrush(_In_ int)
#define BF_MIDDLE
Definition: winuser.h:468
BOOL WINAPI PtInRect(_In_ LPCRECT, _In_ POINT)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI DrawEdge(_In_ HDC, _Inout_ LPRECT, _In_ UINT, _In_ UINT)
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
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
#define COLOR_APPWORKSPACE
Definition: winuser.h:919
#define COLOR_HIGHLIGHTTEXT
Definition: winuser.h:921
HWND WINAPI GetParent(_In_ HWND)
#define LoadImage
Definition: winuser.h:5805
#define LR_DEFAULTCOLOR
Definition: winuser.h:1081
#define SW_SHOW
Definition: winuser.h:769
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
BOOL WINAPI InflateRect(_Inout_ LPRECT, _In_ int, _In_ int)
#define BF_RECT
Definition: winuser.h:462
#define MAKEINTRESOURCE
Definition: winuser.h:591
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
BOOL WINAPI DestroyIcon(_In_ HICON)
Definition: cursoricon.c:2022
_In_ ULONG iColor
Definition: xlateobj.h:17
unsigned char BYTE
Definition: xxhash.c:193