ReactOS 0.4.16-dev-91-g764881a
ghost.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS user32.dll
3 * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4 * PURPOSE: Ghost window class
5 * COPYRIGHT: Copyright 2018 Katayama Hirofumi MZ (katayama.hirofumi.mz@gmail.com)
6 */
7
8#include <user32.h>
9#include <strsafe.h>
10#include "ghostwnd.h"
11
13
14#define GHOST_TIMER_ID 0xFACEDEAD
15#define GHOST_INTERVAL 1000 // one second
16
18{
19 L"Ghost", /* name */
20 0, /* style */
21 GhostWndProcA, /* procA */
22 GhostWndProcW, /* procW */
23 0, /* extra */
24 IDC_WAIT, /* cursor */
25 NULL /* brush */
26};
27
28static HBITMAP
30{
32 BITMAPINFO bi;
33 HDC hdc;
34 LPVOID pvBits;
35
36 ZeroMemory(&bi, sizeof(bi));
38 bi.bmiHeader.biWidth = cx;
40 bi.bmiHeader.biPlanes = 1;
41 bi.bmiHeader.biBitCount = 32;
42
44 if (hdc)
45 {
46 hbm = CreateDIBSection(hdc, &bi, DIB_RGB_COLORS, &pvBits, NULL, 0);
48 }
49 return hbm;
50}
51
52static HBITMAP
54{
56 HDC hdc, hdcMem;
57 HGDIOBJ hbmOld;
58
60 if (!hdc)
61 return NULL;
62
64 if (!hdcMem)
65 goto earth;
66
68 if (hbm)
69 {
70 hbmOld = SelectObject(hdcMem, hbm);
71 BitBlt(hdcMem, 0, 0, cx, cy, hdc, 0, 0, SRCCOPY | CAPTUREBLT);
72 SelectObject(hdcMem, hbmOld);
73 }
74
76
77earth:
79
80 return hbm;
81}
82
83static VOID
85{
86 BITMAP bm;
87 DWORD i, *pdw;
88
89 GetObject(hbm, sizeof(bm), &bm);
90
91 if (bm.bmBitsPixel != 32 || !bm.bmBits)
92 {
93 ERR("bm.bmBitsPixel == %d, bm.bmBits == %p\n",
94 bm.bmBitsPixel, bm.bmBits);
95 return;
96 }
97
98 pdw = bm.bmBits;
99 for (i = 0; i < bm.bmWidth * bm.bmHeight; ++i)
100 {
101 *pdw = *pdw | 0x00C0C0C0; // bitwise-OR with ARGB #C0C0C0
102 ++pdw;
103 }
104}
105
106/****************************************************************************/
107
108static GHOST_DATA *
110{
112}
113
114static HWND
116{
118 if (!pData)
119 return NULL;
120 return pData->hwndTarget;
121}
122
123static LPWSTR
124Ghost_GetText(HWND hwndTarget, INT *pcchTextW, INT cchExtra)
125{
126 LPWSTR pszTextW = NULL, pszTextNewW;
127 INT cchNonExtra, cchTextW = *pcchTextW;
128
129 pszTextNewW = HeapAlloc(GetProcessHeap(), 0, cchTextW * sizeof(WCHAR));
130 for (;;)
131 {
132 if (!pszTextNewW)
133 {
134 ERR("HeapAlloc failed\n");
135 if (pszTextW)
136 HeapFree(GetProcessHeap(), 0, pszTextW);
137 return NULL;
138 }
139 pszTextW = pszTextNewW;
140
141 cchNonExtra = cchTextW - cchExtra;
142 if (InternalGetWindowText(hwndTarget, pszTextW,
143 cchNonExtra) < cchNonExtra - 1)
144 {
145 break;
146 }
147
148 cchTextW *= 2;
149 pszTextNewW = HeapReAlloc(GetProcessHeap(), 0, pszTextW,
150 cchTextW * sizeof(WCHAR));
151 }
152
153 *pcchTextW = cchTextW;
154 return pszTextW;
155}
156
157static BOOL
159{
160 HBITMAP hbm32bpp;
161 HWND hwndTarget, hwndPrev;
163 RECT rc;
164 DWORD style, exstyle;
165 WCHAR szTextW[320], szNotRespondingW[32];
166 LPWSTR pszTextW;
167 INT cchTextW, cchExtraW, cchNonExtraW;
168 PWND pWnd = ValidateHwnd(hwnd);
169 if (pWnd)
170 {
171 if (!pWnd->fnid)
172 {
174 }
175 else if (pWnd->fnid != FNID_GHOST)
176 {
177 ERR("Wrong window class for Ghost! fnId 0x%x\n", pWnd->fnid);
178 return FALSE;
179 }
180 }
181
182 // get the target
183 hwndTarget = (HWND)lpcs->lpCreateParams;
184 if (!IsWindowVisible(hwndTarget) || // invisible?
185 (GetWindowLongPtrW(hwndTarget, GWL_STYLE) & WS_CHILD) || // child?
186 !IsHungAppWindow(hwndTarget)) // not hung?
187 {
188 return FALSE;
189 }
190
191 // check prop
192 if (GetPropW(hwndTarget, GHOST_PROP))
193 return FALSE;
194
195 // set prop
196 SetPropW(hwndTarget, GHOST_PROP, hwnd);
197
198 // create user data
199 pData = HeapAlloc(GetProcessHeap(), 0, sizeof(GHOST_DATA));
200 if (!pData)
201 {
202 ERR("HeapAlloc failed\n");
203 return FALSE;
204 }
205
206 // get window image
207 GetWindowRect(hwndTarget, &rc);
208 hbm32bpp = IntGetWindowBitmap(hwndTarget,
209 rc.right - rc.left,
210 rc.bottom - rc.top);
211 if (!hbm32bpp)
212 {
213 ERR("hbm32bpp was NULL\n");
215 return FALSE;
216 }
217 // make a ghost image
218 IntMakeGhostImage(hbm32bpp);
219
220 // set user data
221 pData->hwndTarget = hwndTarget;
222 pData->hbm32bpp = hbm32bpp;
223 pData->bDestroyTarget = FALSE;
225
226 // get style
227 style = GetWindowLongPtrW(hwndTarget, GWL_STYLE);
228 exstyle = GetWindowLongPtrW(hwndTarget, GWL_EXSTYLE);
229
230 // get text
231 cchTextW = ARRAYSIZE(szTextW);
232 cchExtraW = ARRAYSIZE(szNotRespondingW);
233 cchNonExtraW = cchTextW - cchExtraW;
234 if (InternalGetWindowText(hwndTarget, szTextW,
235 cchNonExtraW) < cchNonExtraW - 1)
236 {
237 pszTextW = szTextW;
238 }
239 else
240 {
241 cchTextW *= 2;
242 pszTextW = Ghost_GetText(hwndTarget, &cchTextW, cchExtraW);
243 if (!pszTextW)
244 {
245 ERR("Ghost_GetText failed\n");
246 DeleteObject(hbm32bpp);
248 return FALSE;
249 }
250 }
251
252 // don't use scrollbars.
254
255 // set style
258
259 // set text with " (Not Responding)"
261 szNotRespondingW, ARRAYSIZE(szNotRespondingW));
262 StringCchCatW(pszTextW, cchTextW, szNotRespondingW);
263 SetWindowTextW(hwnd, pszTextW);
264
265 // free the text buffer
266 if (szTextW != pszTextW)
267 HeapFree(GetProcessHeap(), 0, pszTextW);
268
269 // get previous window of target
270 hwndPrev = GetWindow(hwndTarget, GW_HWNDPREV);
271
272 // hide target
273 ShowWindowAsync(hwndTarget, SW_HIDE);
274
275 // shrink the ghost to zero size and insert.
276 // this will avoid effects.
277 SetWindowPos(hwnd, hwndPrev, 0, 0, 0, 0,
280
281 // resume the position and size of ghost
282 MoveWindow(hwnd, rc.left, rc.top,
283 rc.right - rc.left, rc.bottom - rc.top, TRUE);
284
285 // make ghost visible
287
288 // redraw
290
291 // start timer
293
294 return TRUE;
295}
296
297static void
299{
301 if (!pData)
302 return;
303
304 pData->bDestroyTarget |= bDestroyTarget;
306}
307
308static void
310{
311 BITMAP bm;
312 HDC hdcMem;
314
315 if (!pData || !GetObject(pData->hbm32bpp, sizeof(bm), &bm))
316 return;
317
319 if (hdcMem)
320 {
321 HGDIOBJ hbmOld = SelectObject(hdcMem, pData->hbm32bpp);
322 BitBlt(hdc, 0, 0, bm.bmWidth, bm.bmHeight,
323 hdcMem, 0, 0, SRCCOPY | CAPTUREBLT);
324 SelectObject(hdcMem, hbmOld);
326 }
327}
328
329static void
331{
332 HDC hdc;
333
334 // do the default behaviour
335 if (bUnicode)
337 else
339
340 // draw the ghost image
342 if (hdc)
343 {
346 }
347}
348
349static void
351{
352 PAINTSTRUCT ps;
353 HDC hdc = BeginPaint(hwnd, &ps);
354 if (hdc)
355 {
356 // don't draw at here
357 EndPaint(hwnd, &ps);
358 }
359}
360
361static void
363{
364 RECT rc;
365 HWND hwndTarget = Ghost_GetTarget(hwnd);
366
367 GetWindowRect(hwnd, &rc);
368
369 // move the target
370 SetWindowPos(hwndTarget, NULL, rc.left, rc.top, 0, 0,
373}
374
375static void
377{
379}
380
381static void
383{
384 HWND hwndTarget = pData->hwndTarget;
385 DWORD pid;
387
388 pData->hwndTarget = NULL;
389 GetWindowThreadProcessId(hwndTarget, &pid);
390
392 if (hProcess)
393 {
396 }
397
398 DestroyWindow(hwndTarget);
399}
400
401static void
403{
404 // delete the user data
406 if (pData)
407 {
409
410 // delete image
411 DeleteObject(pData->hbm32bpp);
412 pData->hbm32bpp = NULL;
413
414 // remove prop
415 RemovePropW(pData->hwndTarget, GHOST_PROP);
416
417 // show target
419
420 // destroy target if necessary
421 if (pData->bDestroyTarget)
422 {
424 }
425
427 }
428
430
432}
433
434static void
436{
437 INT id;
438 WCHAR szAskTerminate[128];
439 WCHAR szHungUpTitle[128];
440
441 // stop timer
443
445 szAskTerminate, ARRAYSIZE(szAskTerminate));
447 szHungUpTitle, ARRAYSIZE(szHungUpTitle));
448
449 id = MessageBoxW(hwnd, szAskTerminate, szHungUpTitle,
451 if (id == IDYES)
452 {
453 // destroy the target
455 return;
456 }
457
458 // restart timer
460}
461
462static void
464{
465 HWND hwndTarget;
467
468 if (id != GHOST_TIMER_ID || !pData)
469 return;
470
471 // stop the timer
472 KillTimer(hwnd, id);
473
474 hwndTarget = pData->hwndTarget;
475 if (!IsWindow(hwndTarget) || !IsHungAppWindow(hwndTarget))
476 {
477 // resume if window is destroyed or responding
479 return;
480 }
481
482 // restart the timer
484}
485
486static HICON
488{
490 HICON hIcon = NULL;
491
492 if (!pData)
493 return NULL;
494
495 // same as the original icon
496 switch (fType)
497 {
498 case ICON_BIG:
499 {
501 break;
502 }
503
504 case ICON_SMALL:
505 {
507 break;
508 }
509 }
510
511 return hIcon;
512}
513
516 BOOL unicode)
517{
518 switch (uMsg)
519 {
520 case WM_CREATE:
522 return -1;
523 break;
524
525 case WM_NCPAINT:
526 Ghost_OnNCPaint(hwnd, (HRGN)wParam, unicode);
527 return 0;
528
529 case WM_ERASEBKGND:
531 return TRUE;
532
533 case WM_PAINT:
535 break;
536
537 case WM_MOVE:
539 break;
540
541 case WM_SIZE:
542 break;
543
544 case WM_SIZING:
545 return TRUE;
546
547 case WM_SYSCOMMAND:
548 switch ((UINT)wParam)
549 {
550 case SC_MAXIMIZE:
551 case SC_SIZE:
552 // sizing-related
553 return 0;
554 }
555 if (unicode)
556 return DefWindowProcW(hwnd, uMsg, wParam, lParam);
557 else
558 return DefWindowProcA(hwnd, uMsg, wParam, lParam);
559
560 case WM_CLOSE:
562 break;
563
564 case WM_TIMER:
566 break;
567
568 case WM_NCMOUSEMOVE:
569 if (unicode)
571 else
574 return 0;
575
576 case WM_GETICON:
578
579 case WM_COMMAND:
580 if (LOWORD(wParam) == 3333)
582 break;
583
584 case WM_DESTROY:
586 break;
587
588 case WM_NCDESTROY:
590 break;
591
592 default:
593 {
594 if (unicode)
595 return DefWindowProcW(hwnd, uMsg, wParam, lParam);
596 else
597 return DefWindowProcA(hwnd, uMsg, wParam, lParam);
598 }
599 }
600 return 0;
601}
602
605{
606 return GhostWndProc_common(hwnd, uMsg, wParam, lParam, FALSE);
607}
608
611{
612 return GhostWndProc_common(hwnd, uMsg, wParam, lParam, TRUE);
613}
static HRGN hrgn
Arabic default style
Definition: afstyles.h:94
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define IDS_NOT_RESPONDING
Definition: resource.h:263
#define ERR(fmt,...)
Definition: precomp.h:57
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define ARRAYSIZE(array)
Definition: filtermapper.c:47
#define CloseHandle
Definition: compat.h:739
#define GetProcessHeap()
Definition: compat.h:736
HANDLE HWND
Definition: compat.h:19
#define HeapAlloc
Definition: compat.h:733
#define HeapReAlloc
Definition: compat.h:734
#define HeapFree(x, y, z)
Definition: compat.h:735
#define CALLBACK
Definition: compat.h:35
#define ValidateHwnd(hwnd)
Definition: precomp.h:85
BOOL WINAPI TerminateProcess(IN HANDLE hProcess, IN UINT uExitCode)
Definition: proc.c:1532
HANDLE WINAPI OpenProcess(IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN DWORD dwProcessId)
Definition: proc.c:1227
static VOID BitBlt(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Width, _In_ ULONG Height, _In_reads_bytes_(Delta *Height) PUCHAR Buffer, _In_ ULONG BitsPerPixel, _In_ ULONG Delta)
Definition: common.c:57
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
pKey DeleteObject()
#define GHOST_PROP
Definition: ghostwnd.h:11
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLuint id
Definition: glext.h:5910
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
#define PROCESS_TERMINATE
Definition: pstypes.h:158
#define FNID_DESTROY
Definition: ntuser.h:898
#define FNID_GHOST
Definition: ntuser.h:875
BOOL NTAPI NtUserSetWindowFNID(HWND hWnd, WORD fnID)
Definition: window.c:4334
if(dx< 0)
Definition: linetemp.h:194
_In_ BOOL _In_ HANDLE hProcess
Definition: mapping.h:71
HDC hdc
Definition: main.c:9
static HBITMAP
Definition: button.c:44
static HDC
Definition: imagelist.c:88
static HICON
Definition: imagelist.c:80
HICON hIcon
Definition: msconfig.c:44
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
unsigned int UINT
Definition: ndis.h:50
_In_ HBITMAP hbm
Definition: ntgdi.h:2776
#define L(x)
Definition: ntvdm.h:50
#define LOWORD(l)
Definition: pedump.c:82
#define WS_CHILD
Definition: pedump.c:617
#define WS_VSCROLL
Definition: pedump.c:627
#define WS_VISIBLE
Definition: pedump.c:620
short SHORT
Definition: pedump.c:59
#define WS_HSCROLL
Definition: pedump.c:628
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:586
_Out_opt_ int * cx
Definition: commctrl.h:585
STRSAFEAPI StringCchCatW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:325
Definition: bl.h:1331
Definition: ntuser.h:694
DWORD fnid
Definition: ntuser.h:709
USHORT biBitCount
Definition: precomp.h:46
BITMAPINFOHEADER bmiHeader
Definition: wingdi.h:1476
LPVOID lpCreateParams
Definition: winuser.h:2958
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 ICON_BIG
Definition: tnclass.cpp:51
#define ICON_SMALL
Definition: tnclass.cpp:48
#define GWLP_USERDATA
Definition: treelist.c:63
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1830
int32_t INT
Definition: typedefs.h:58
#define HIWORD(l)
Definition: typedefs.h:247
static void Ghost_Unenchant(HWND hwnd, BOOL bDestroyTarget)
Definition: ghost.c:298
static void Ghost_OnNCDestroy(HWND hwnd)
Definition: ghost.c:402
static void Ghost_OnNCPaint(HWND hwnd, HRGN hrgn, BOOL bUnicode)
Definition: ghost.c:330
static void Ghost_OnMove(HWND hwnd, int x, int y)
Definition: ghost.c:362
#define GHOST_TIMER_ID
Definition: ghost.c:14
LRESULT CALLBACK GhostWndProcA(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: ghost.c:604
static VOID IntMakeGhostImage(HBITMAP hbm)
Definition: ghost.c:84
static BOOL Ghost_OnCreate(HWND hwnd, CREATESTRUCTW *lpcs)
Definition: ghost.c:158
LRESULT CALLBACK GhostWndProcW(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: ghost.c:610
static void Ghost_OnTimer(HWND hwnd, UINT id)
Definition: ghost.c:463
static void Ghost_OnPaint(HWND hwnd)
Definition: ghost.c:350
static HBITMAP IntGetWindowBitmap(HWND hwnd, INT cx, INT cy)
Definition: ghost.c:53
static void Ghost_OnDestroy(HWND hwnd)
Definition: ghost.c:376
static HWND Ghost_GetTarget(HWND hwnd)
Definition: ghost.c:115
const struct builtin_class_descr GHOST_builtin_class
Definition: ghost.c:17
static HICON Ghost_GetIcon(HWND hwnd, INT fType)
Definition: ghost.c:487
LRESULT WINAPI GhostWndProc_common(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL unicode)
Definition: ghost.c:515
static GHOST_DATA * Ghost_GetData(HWND hwnd)
Definition: ghost.c:109
static LPWSTR Ghost_GetText(HWND hwndTarget, INT *pcchTextW, INT cchExtra)
Definition: ghost.c:124
static void Ghost_OnDraw(HWND hwnd, HDC hdc)
Definition: ghost.c:309
#define GHOST_INTERVAL
Definition: ghost.c:15
static void Ghost_OnClose(HWND hwnd)
Definition: ghost.c:435
static void Ghost_DestroyTarget(GHOST_DATA *pData)
Definition: ghost.c:382
static HBITMAP IntCreate32BppBitmap(INT cx, INT cy)
Definition: ghost.c:29
HINSTANCE User32Instance
Definition: dllmain.c:27
HDC hdcMem
Definition: welcome.c:104
HBITMAP WINAPI CreateDIBSection(HDC hDC, CONST BITMAPINFO *BitmapInfo, UINT Usage, VOID **Bits, HANDLE hSection, DWORD dwOffset)
Definition: bitmap.c:245
#define IDS_HUNG_UP_TITLE
Definition: resource.h:13
#define IDS_ASK_TERMINATE
Definition: resource.h:12
BOOL WINAPI IsHungAppWindow(HWND hwnd)
Definition: window.c:1847
#define ZeroMemory
Definition: winbase.h:1712
DWORD WINAPI GetWindowThreadProcessId(HWND hWnd, PDWORD lpdwProcessId)
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
_In_ ULONG_PTR _In_ ULONG _Out_ ULONG_PTR * pid
Definition: winddi.h:3837
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207
#define WINAPI
Definition: msvc.h:6
#define DIB_RGB_COLORS
Definition: wingdi.h:367
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1546
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
#define SRCCOPY
Definition: wingdi.h:333
#define GetObject
Definition: wingdi.h:4468
BOOL WINAPI DeleteDC(_In_ HDC)
#define CAPTUREBLT
Definition: wingdi.h:1376
#define WM_PAINT
Definition: winuser.h:1623
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
#define WM_ERASEBKGND
Definition: winuser.h:1628
BOOL WINAPI IsWindow(_In_opt_ HWND)
#define SW_HIDE
Definition: winuser.h:771
#define WM_CLOSE
Definition: winuser.h:1624
#define SWP_NOACTIVATE
Definition: winuser.h:1245
#define WM_SYSCOMMAND
Definition: winuser.h:1744
#define GetWindowLongPtrW
Definition: winuser.h:4832
HDC WINAPI GetWindowDC(_In_opt_ HWND)
#define GCLP_HICONSM
Definition: winuser.h:675
HANDLE WINAPI RemovePropW(_In_ HWND, _In_ LPCWSTR)
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LRESULT WINAPI DefWindowProcA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define GCLP_HICON
Definition: winuser.h:674
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
#define WM_CREATE
Definition: winuser.h:1611
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
#define SWP_DRAWFRAME
Definition: winuser.h:1242
#define WM_SIZE
Definition: winuser.h:1614
#define SWP_NOMOVE
Definition: winuser.h:1247
#define WM_COMMAND
Definition: winuser.h:1743
#define SW_SHOWNOACTIVATE
Definition: winuser.h:777
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
#define SWP_NOSIZE
Definition: winuser.h:1248
#define MB_YESNO
Definition: winuser.h:820
int WINAPI MessageBoxW(_In_opt_ HWND hWnd, _In_opt_ LPCWSTR lpText, _In_opt_ LPCWSTR lpCaption, _In_ UINT uType)
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
#define SC_SIZE
Definition: winuser.h:2587
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
BOOL WINAPI ShowWindowAsync(_In_ HWND, _In_ int)
#define WM_NCMOUSEMOVE
Definition: winuser.h:1694
#define WM_TIMER
Definition: winuser.h:1745
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
BOOL WINAPI SetPropW(_In_ HWND, _In_ LPCWSTR, _In_opt_ HANDLE)
#define LoadCursor
Definition: winuser.h:5824
#define GetClassLongPtrW
Definition: winuser.h:4567
HANDLE WINAPI GetPropW(_In_ HWND, _In_ LPCWSTR)
#define WM_MOVE
Definition: winuser.h:1613
#define WM_SIZING
Definition: winuser.h:1810
HWND WINAPI GetWindow(_In_ HWND, _In_ UINT)
#define WM_NCDESTROY
Definition: winuser.h:1687
#define MB_ICONINFORMATION
Definition: winuser.h:805
#define SWP_NOOWNERZORDER
Definition: winuser.h:1252
#define IDC_WAIT
Definition: winuser.h:689
#define GW_HWNDPREV
Definition: winuser.h:765
#define WM_DESTROY
Definition: winuser.h:1612
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
#define IDYES
Definition: winuser.h:838
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
INT WINAPI InternalGetWindowText(_In_ HWND hWnd, _Out_writes_to_(cchMaxCount, return+1) LPWSTR pString, _In_ int cchMaxCount)
#define SetWindowLongPtrW
Definition: winuser.h:5358
#define GWL_STYLE
Definition: winuser.h:855
#define SWP_NOSENDCHANGING
Definition: winuser.h:1254
BOOL WINAPI IsWindowVisible(_In_ HWND)
BOOL WINAPI DestroyWindow(_In_ HWND)
BOOL WINAPI MoveWindow(_In_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ BOOL)
#define SC_MAXIMIZE
Definition: winuser.h:2591
#define WM_NCPAINT
Definition: winuser.h:1690
#define GWL_EXSTYLE
Definition: winuser.h:854
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184