ReactOS 0.4.16-dev-816-g135a9a9
win.c
Go to the documentation of this file.
1/*
2 * Window related functions
3 *
4 * Copyright 1993, 1994 Alexandre Julliard
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21#ifdef __REACTOS__
22#define WIN32_NO_STATUS
23#define _INC_WINDOWS
24#define COM_NO_WINDOWS_H
25#include <windef.h>
26#include <wingdi.h>
27#include <winuser.h>
28#include <winbase.h>
29#else
30#include "ntstatus.h"
31#define WIN32_NO_STATUS
32#include "user_private.h"
33#include "controls.h"
34#include "winver.h"
35#include "wine/asm.h"
36#endif
37#include "wine/exception.h"
38#include "wine/debug.h"
39
41
42#ifndef __REACTOS__
43#ifdef __i386__
44/* Some apps pass a non-stdcall proc to EnumChildWindows,
45 * so we need a small assembly wrapper to call the proc.
46 */
49 "pushl %ebp\n\t"
50 __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t")
51 __ASM_CFI(".cfi_rel_offset %ebp,0\n\t")
52 "movl %esp,%ebp\n\t"
53 __ASM_CFI(".cfi_def_cfa_register %ebp\n\t")
54 "pushl 16(%ebp)\n\t"
55 "pushl 12(%ebp)\n\t"
56 "call *8(%ebp)\n\t"
57 "leave\n\t"
58 __ASM_CFI(".cfi_def_cfa %esp,4\n\t")
59 __ASM_CFI(".cfi_same_value %ebp\n\t")
60 "ret" )
61#else
63{
64 return proc( hwnd, lparam );
65}
66#endif /* __i386__ */
67
68/*******************************************************************
69 * enum_windows
70 */
71static BOOL enum_windows( HDESK desktop, HWND hwnd, DWORD tid, BOOL children,
73{
74 HWND *list;
75 ULONG i, size = 128;
76 BOOL ret = !children; /* EnumChildWindows returns FALSE on empty list, the others TRUE */
78
79 for (;;)
80 {
81 if (!(list = HeapAlloc( GetProcessHeap(), 0, size * sizeof(HWND) ))) return FALSE;
82 status = NtUserBuildHwndList( desktop, hwnd, children, TRUE, tid, size, list, &size );
83 if (!status) break;
86 }
87 for (i = 0; i < size && list[i] != HWND_BOTTOM; i++)
88 {
89 if (!IsWindow( list[i] )) continue;
90 if (!(ret = enum_callback_wrapper( proc, list[i], param ))) break;
91 }
93 return ret;
94}
95
96
97/*******************************************************************
98 * is_desktop_window
99 *
100 * Check if window is the desktop or the HWND_MESSAGE top parent.
101 */
103{
104 struct ntuser_thread_info *thread_info = NtUserGetThreadInfo();
105
106 if (!hwnd) return FALSE;
107 if (hwnd == UlongToHandle( thread_info->top_window )) return TRUE;
108 if (hwnd == UlongToHandle( thread_info->msg_window )) return TRUE;
109
110 if (!HIWORD(hwnd) || HIWORD(hwnd) == 0xffff)
111 {
112 if (LOWORD(thread_info->top_window) == LOWORD(hwnd)) return TRUE;
113 if (LOWORD(thread_info->msg_window) == LOWORD(hwnd)) return TRUE;
114 }
115 return FALSE;
116}
117
118
119/* check if hwnd is a broadcast magic handle */
120static inline BOOL is_broadcast( HWND hwnd )
121{
122 return hwnd == HWND_BROADCAST || hwnd == HWND_TOPMOST;
123}
124
125
126/***********************************************************************
127 * WIN_IsCurrentProcess
128 *
129 * Check whether a given window belongs to the current process (and return the full handle).
130 */
132{
133 return UlongToHandle( NtUserCallHwnd( hwnd, NtUserIsCurrentProcessWindow ));
134}
135
136
137/***********************************************************************
138 * WIN_IsCurrentThread
139 *
140 * Check whether a given window belongs to the current thread (and return the full handle).
141 */
143{
144 return UlongToHandle( NtUserCallHwnd( hwnd, NtUserIsCurrentThreadWindow ));
145}
146
147
148/***********************************************************************
149 * WIN_GetFullHandle
150 *
151 * Convert a possibly truncated window handle to a full 32-bit handle.
152 */
154{
155 return UlongToHandle( NtUserCallHwnd( hwnd, NtUserGetFullWindowHandle ));
156}
157
158
159/***********************************************************************
160 * WIN_SetStyle
161 *
162 * Change the style of a window.
163 */
164ULONG WIN_SetStyle( HWND hwnd, ULONG set_bits, ULONG clear_bits )
165{
166 /* FIXME: Use SetWindowLong or move callers to win32u instead.
167 * We use STYLESTRUCT to pass params, but meaning of its field does not match our usage. */
168 STYLESTRUCT style = { .styleNew = set_bits, .styleOld = clear_bits };
169 return NtUserCallHwndParam( hwnd, (UINT_PTR)&style, NtUserSetWindowStyle );
170}
171
172
173/***********************************************************************
174 * dump_window_styles
175 */
176static void dump_window_styles( DWORD style, DWORD exstyle )
177{
178 TRACE( "style:" );
179 if(style & WS_POPUP) TRACE(" WS_POPUP");
180 if(style & WS_CHILD) TRACE(" WS_CHILD");
181 if(style & WS_MINIMIZE) TRACE(" WS_MINIMIZE");
182 if(style & WS_VISIBLE) TRACE(" WS_VISIBLE");
183 if(style & WS_DISABLED) TRACE(" WS_DISABLED");
184 if(style & WS_CLIPSIBLINGS) TRACE(" WS_CLIPSIBLINGS");
185 if(style & WS_CLIPCHILDREN) TRACE(" WS_CLIPCHILDREN");
186 if(style & WS_MAXIMIZE) TRACE(" WS_MAXIMIZE");
187 if((style & WS_CAPTION) == WS_CAPTION) TRACE(" WS_CAPTION");
188 else
189 {
190 if(style & WS_BORDER) TRACE(" WS_BORDER");
191 if(style & WS_DLGFRAME) TRACE(" WS_DLGFRAME");
192 }
193 if(style & WS_VSCROLL) TRACE(" WS_VSCROLL");
194 if(style & WS_HSCROLL) TRACE(" WS_HSCROLL");
195 if(style & WS_SYSMENU) TRACE(" WS_SYSMENU");
196 if(style & WS_THICKFRAME) TRACE(" WS_THICKFRAME");
197 if (style & WS_CHILD)
198 {
199 if(style & WS_GROUP) TRACE(" WS_GROUP");
200 if(style & WS_TABSTOP) TRACE(" WS_TABSTOP");
201 }
202 else
203 {
204 if(style & WS_MINIMIZEBOX) TRACE(" WS_MINIMIZEBOX");
205 if(style & WS_MAXIMIZEBOX) TRACE(" WS_MAXIMIZEBOX");
206 }
207
208 /* FIXME: Add dumping of BS_/ES_/SBS_/LBS_/CBS_/DS_/etc. styles */
209#define DUMPED_STYLES \
210 ((DWORD)(WS_POPUP | \
211 WS_CHILD | \
212 WS_MINIMIZE | \
213 WS_VISIBLE | \
214 WS_DISABLED | \
215 WS_CLIPSIBLINGS | \
216 WS_CLIPCHILDREN | \
217 WS_MAXIMIZE | \
218 WS_BORDER | \
219 WS_DLGFRAME | \
220 WS_VSCROLL | \
221 WS_HSCROLL | \
222 WS_SYSMENU | \
223 WS_THICKFRAME | \
224 WS_GROUP | \
225 WS_TABSTOP | \
226 WS_MINIMIZEBOX | \
227 WS_MAXIMIZEBOX))
228
229 if(style & ~DUMPED_STYLES) TRACE(" %08lx", style & ~DUMPED_STYLES);
230 TRACE("\n");
231#undef DUMPED_STYLES
232
233 TRACE( "exstyle:" );
234 if(exstyle & WS_EX_DLGMODALFRAME) TRACE(" WS_EX_DLGMODALFRAME");
235 if(exstyle & WS_EX_DRAGDETECT) TRACE(" WS_EX_DRAGDETECT");
236 if(exstyle & WS_EX_NOPARENTNOTIFY) TRACE(" WS_EX_NOPARENTNOTIFY");
237 if(exstyle & WS_EX_TOPMOST) TRACE(" WS_EX_TOPMOST");
238 if(exstyle & WS_EX_ACCEPTFILES) TRACE(" WS_EX_ACCEPTFILES");
239 if(exstyle & WS_EX_TRANSPARENT) TRACE(" WS_EX_TRANSPARENT");
240 if(exstyle & WS_EX_MDICHILD) TRACE(" WS_EX_MDICHILD");
241 if(exstyle & WS_EX_TOOLWINDOW) TRACE(" WS_EX_TOOLWINDOW");
242 if(exstyle & WS_EX_WINDOWEDGE) TRACE(" WS_EX_WINDOWEDGE");
243 if(exstyle & WS_EX_CLIENTEDGE) TRACE(" WS_EX_CLIENTEDGE");
244 if(exstyle & WS_EX_CONTEXTHELP) TRACE(" WS_EX_CONTEXTHELP");
245 if(exstyle & WS_EX_RIGHT) TRACE(" WS_EX_RIGHT");
246 if(exstyle & WS_EX_RTLREADING) TRACE(" WS_EX_RTLREADING");
247 if(exstyle & WS_EX_LEFTSCROLLBAR) TRACE(" WS_EX_LEFTSCROLLBAR");
248 if(exstyle & WS_EX_CONTROLPARENT) TRACE(" WS_EX_CONTROLPARENT");
249 if(exstyle & WS_EX_STATICEDGE) TRACE(" WS_EX_STATICEDGE");
250 if(exstyle & WS_EX_APPWINDOW) TRACE(" WS_EX_APPWINDOW");
251 if(exstyle & WS_EX_LAYERED) TRACE(" WS_EX_LAYERED");
252 if(exstyle & WS_EX_NOINHERITLAYOUT) TRACE(" WS_EX_NOINHERITLAYOUT");
253 if(exstyle & WS_EX_LAYOUTRTL) TRACE(" WS_EX_LAYOUTRTL");
254 if(exstyle & WS_EX_COMPOSITED) TRACE(" WS_EX_COMPOSITED");
255 if(exstyle & WS_EX_NOACTIVATE) TRACE(" WS_EX_NOACTIVATE");
256
257#define DUMPED_EX_STYLES \
258 ((DWORD)(WS_EX_DLGMODALFRAME | \
259 WS_EX_DRAGDETECT | \
260 WS_EX_NOPARENTNOTIFY | \
261 WS_EX_TOPMOST | \
262 WS_EX_ACCEPTFILES | \
263 WS_EX_TRANSPARENT | \
264 WS_EX_MDICHILD | \
265 WS_EX_TOOLWINDOW | \
266 WS_EX_WINDOWEDGE | \
267 WS_EX_CLIENTEDGE | \
268 WS_EX_CONTEXTHELP | \
269 WS_EX_RIGHT | \
270 WS_EX_RTLREADING | \
271 WS_EX_LEFTSCROLLBAR | \
272 WS_EX_CONTROLPARENT | \
273 WS_EX_STATICEDGE | \
274 WS_EX_APPWINDOW | \
275 WS_EX_LAYERED | \
276 WS_EX_NOINHERITLAYOUT | \
277 WS_EX_LAYOUTRTL | \
278 WS_EX_COMPOSITED |\
279 WS_EX_NOACTIVATE))
280
281 if(exstyle & ~DUMPED_EX_STYLES) TRACE(" %08lx", exstyle & ~DUMPED_EX_STYLES);
282 TRACE("\n");
283#undef DUMPED_EX_STYLES
284}
285
287{
288 return x == CW_USEDEFAULT || x == 0x8000;
289}
290
291/***********************************************************************
292 * WIN_CreateWindowEx
293 *
294 * Implementation of CreateWindowEx().
295 */
297{
298 UNICODE_STRING class, window_name = {0};
299 HWND hwnd, top_child = 0;
300 MDICREATESTRUCTW mdi_cs;
302 WCHAR name_buf[8];
303 HMENU menu;
304
305 if (!get_class_info( module, className, &info, &class, FALSE )) return FALSE;
306
307 TRACE("%s %s%s%s ex=%08lx style=%08lx %d,%d %dx%d parent=%p menu=%p inst=%p params=%p\n",
308 unicode ? debugstr_w(cs->lpszName) : debugstr_a((LPCSTR)cs->lpszName),
309 debugstr_w(className), class.Buffer != className ? "->" : "",
310 class.Buffer != className ? debugstr_wn(class.Buffer, class.Length / sizeof(WCHAR)) : "",
311 cs->dwExStyle, cs->style, cs->x, cs->y, cs->cx, cs->cy,
312 cs->hwndParent, cs->hMenu, cs->hInstance, cs->lpCreateParams );
313 if(TRACE_ON(win)) dump_window_styles( cs->style, cs->dwExStyle );
314
315 /* Fix the styles for MDI children */
316 if (cs->dwExStyle & WS_EX_MDICHILD)
317 {
318 POINT pos[2];
319 UINT id = 0;
320
321 if (!NtUserGetMDIClientInfo( cs->hwndParent ))
322 {
323 WARN("WS_EX_MDICHILD, but parent %p is not MDIClient\n", cs->hwndParent);
324 return 0;
325 }
326
327 /* cs->lpCreateParams of WM_[NC]CREATE is different for MDI children.
328 * MDICREATESTRUCT members have the originally passed values.
329 *
330 * Note: we rely on the fact that MDICREATESTRUCTA and MDICREATESTRUCTW
331 * have the same layout.
332 */
333 mdi_cs.szClass = cs->lpszClass;
334 mdi_cs.szTitle = cs->lpszName;
335 mdi_cs.hOwner = cs->hInstance;
336 mdi_cs.x = cs->x;
337 mdi_cs.y = cs->y;
338 mdi_cs.cx = cs->cx;
339 mdi_cs.cy = cs->cy;
340 mdi_cs.style = cs->style;
341 mdi_cs.lParam = (LPARAM)cs->lpCreateParams;
342
343 cs->lpCreateParams = &mdi_cs;
344
346 {
347 if (cs->style & WS_POPUP)
348 {
349 TRACE("WS_POPUP with MDIS_ALLCHILDSTYLES is not allowed\n");
350 return 0;
351 }
352 cs->style |= WS_CHILD | WS_CLIPSIBLINGS;
353 }
354 else
355 {
356 cs->style &= ~WS_POPUP;
359 }
360
361 top_child = GetWindow(cs->hwndParent, GW_CHILD);
362
363 if (top_child)
364 {
365 /* Restore current maximized child */
366 if((cs->style & WS_VISIBLE) && IsZoomed(top_child))
367 {
368 TRACE("Restoring current maximized child %p\n", top_child);
369 if (cs->style & WS_MAXIMIZE)
370 {
371 /* if the new window is maximized don't bother repainting */
372 SendMessageW( top_child, WM_SETREDRAW, FALSE, 0 );
373 NtUserShowWindow( top_child, SW_SHOWNORMAL );
374 SendMessageW( top_child, WM_SETREDRAW, TRUE, 0 );
375 }
376 else NtUserShowWindow( top_child, SW_SHOWNORMAL );
377 }
378 }
379
380 MDI_CalcDefaultChildPos( cs->hwndParent, -1, pos, 0, &id );
381 if (!(cs->style & WS_POPUP)) cs->hMenu = ULongToHandle(id);
382
383 TRACE( "MDI child id %04x\n", id );
384
385 if (cs->style & (WS_CHILD | WS_POPUP))
386 {
387 if (is_default_coord( cs->x ))
388 {
389 cs->x = pos[0].x;
390 cs->y = pos[0].y;
391 }
392 if (is_default_coord( cs->cx ) || !cs->cx) cs->cx = pos[1].x;
393 if (is_default_coord( cs->cy ) || !cs->cy) cs->cy = pos[1].y;
394 }
395 }
396
397 if (!unicode && cs->lpszName)
398 {
399 const char *nameA = (const char *)cs->lpszName;
400 /* resource ID string is a special case */
401 if (nameA[0] == '\xff')
402 {
403 name_buf[0] = 0xffff;
404 name_buf[1] = MAKEWORD( nameA[1], nameA[2] );
405 name_buf[2] = 0;
406 RtlInitUnicodeString( &window_name, name_buf );
407 }
408 else if (!RtlCreateUnicodeStringFromAsciiz( &window_name, (const char *)cs->lpszName ))
409 return 0;
410 }
411 else RtlInitUnicodeString( &window_name, cs->lpszName );
412
413 menu = cs->hMenu;
414 if (!menu && info.lpszMenuName && (cs->style & (WS_CHILD | WS_POPUP)) != WS_CHILD)
415 menu = LoadMenuW( cs->hInstance, info.lpszMenuName );
416
417 hwnd = NtUserCreateWindowEx( cs->dwExStyle, &class, NULL, &window_name, cs->style,
418 cs->x, cs->y, cs->cx, cs->cy, cs->hwndParent, menu, module,
419 cs->lpCreateParams, 0, cs->hInstance, 0, !unicode );
420 if (!hwnd && menu && menu != cs->hMenu) NtUserDestroyMenu( menu );
421 if (!unicode && window_name.Buffer != name_buf) RtlFreeUnicodeString( &window_name );
422 return hwnd;
423}
424
425
426/***********************************************************************
427 * CreateWindowExA (USER32.@)
428 */
430 LPCSTR windowName, DWORD style, INT x,
432 HWND parent, HMENU menu,
434{
436
437 cs.lpCreateParams = data;
438 cs.hInstance = instance;
439 cs.hMenu = menu;
440 cs.hwndParent = parent;
441 cs.x = x;
442 cs.y = y;
443 cs.cx = width;
444 cs.cy = height;
445 cs.style = style;
446 cs.lpszName = windowName;
447 cs.lpszClass = className;
448 cs.dwExStyle = exStyle;
449
450 if (!IS_INTRESOURCE(className))
451 {
452 WCHAR bufferW[256];
453 if (!MultiByteToWideChar( CP_ACP, 0, className, -1, bufferW, ARRAY_SIZE( bufferW )))
454 return 0;
455 return wow_handlers.create_window( (CREATESTRUCTW *)&cs, bufferW, instance, FALSE );
456 }
457 /* Note: we rely on the fact that CREATESTRUCTA and */
458 /* CREATESTRUCTW have the same layout. */
459 return wow_handlers.create_window( (CREATESTRUCTW *)&cs, (LPCWSTR)className, instance, FALSE );
460}
461
462
463/***********************************************************************
464 * CreateWindowExW (USER32.@)
465 */
467 LPCWSTR windowName, DWORD style, INT x,
469 HWND parent, HMENU menu,
471{
473
474 cs.lpCreateParams = data;
475 cs.hInstance = instance;
476 cs.hMenu = menu;
477 cs.hwndParent = parent;
478 cs.x = x;
479 cs.y = y;
480 cs.cx = width;
481 cs.cy = height;
482 cs.style = style;
483 cs.lpszName = windowName;
484 cs.lpszClass = className;
485 cs.dwExStyle = exStyle;
486
487 return wow_handlers.create_window( &cs, className, instance, TRUE );
488}
489
490
491/***********************************************************************
492 * CloseWindow (USER32.@)
493 */
495{
496 if (GetWindowLongW( hwnd, GWL_STYLE ) & WS_CHILD) return FALSE;
498 return TRUE;
499}
500
501
502/***********************************************************************
503 * OpenIcon (USER32.@)
504 */
506{
507 if (!IsIconic( hwnd )) return FALSE;
509 return TRUE;
510}
511
512
513/***********************************************************************
514 * FindWindowExW (USER32.@)
515 */
517{
518 UNICODE_STRING class_str, title_str;
519
520 if (title) RtlInitUnicodeString( &title_str, title );
521
522 if (class)
523 {
524 if (IS_INTRESOURCE(class))
525 {
526 class_str.Buffer = (WCHAR *)class;
527 class_str.Length = class_str.MaximumLength = 0;
528 }
529 else RtlInitUnicodeString( &class_str, class );
530 }
531
532 return NtUserFindWindowEx( parent, child, class ? &class_str : NULL,
533 title ? &title_str : NULL, 0 );
534}
535
536
537
538/***********************************************************************
539 * FindWindowA (USER32.@)
540 */
542{
543 HWND ret = FindWindowExA( 0, 0, className, title );
545 return ret;
546}
547
548
549/***********************************************************************
550 * FindWindowExA (USER32.@)
551 */
553{
555 HWND hwnd = 0;
556
557 if (title)
558 {
559 DWORD len = MultiByteToWideChar( CP_ACP, 0, title, -1, NULL, 0 );
560 if (!(titleW = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) ))) return 0;
562 }
563
564 if (!IS_INTRESOURCE(className))
565 {
566 WCHAR classW[256];
567 if (MultiByteToWideChar( CP_ACP, 0, className, -1, classW, ARRAY_SIZE( classW )))
569 }
570 else
571 {
572 hwnd = FindWindowExW( parent, child, (LPCWSTR)className, titleW );
573 }
574
576 return hwnd;
577}
578
579
580/***********************************************************************
581 * FindWindowW (USER32.@)
582 */
584{
585 return FindWindowExW( 0, 0, className, title );
586}
587
588
589/**********************************************************************
590 * GetDesktopWindow (USER32.@)
591 */
593{
594 struct ntuser_thread_info *thread_info = NtUserGetThreadInfo();
595
596 if (thread_info->top_window) return UlongToHandle( thread_info->top_window );
597 return NtUserGetDesktopWindow();
598}
599
600
601/*******************************************************************
602 * EnableWindow (USER32.@)
603 */
605{
606 return NtUserEnableWindow( hwnd, enable );
607}
608
609
610/***********************************************************************
611 * IsWindowEnabled (USER32.@)
612 */
614{
615 return NtUserIsWindowEnabled( hwnd );
616}
617
618/***********************************************************************
619 * IsWindowUnicode (USER32.@)
620 */
622{
623 return NtUserIsWindowUnicode( hwnd );
624}
625
626
627/***********************************************************************
628 * GetWindowDpiAwarenessContext (USER32.@)
629 */
631{
632 return LongToHandle( NtUserGetWindowDpiAwarenessContext( hwnd ) );
633}
634
635/***********************************************************************
636 * GetDpiAwarenessContextForProcess (USER32.@)
637 */
639{
640 return LongToHandle( NtUserGetProcessDpiAwarenessContext( process ) );
641}
642
643/***********************************************************************
644 * GetWindowDpiHostingBehavior (USER32.@)
645 */
647{
648 FIXME("(%p): stub\n", hwnd);
649 return DPI_HOSTING_BEHAVIOR_DEFAULT;
650}
651
652
654{
655 if (offset == DWLP_DLGPROC && NtUserGetDialogInfo( hwnd ))
656 {
657 DLGPROC proc = NtUserGetDialogProc( (DLGPROC)ret, ansi );
658 if (proc && proc != WINPROC_PROC16) return (LONG_PTR)proc;
659 }
660 return ret;
661}
662
663
665{
668 newval = NtUserCallTwoParam( newval, ansi, NtUserAllocWinProc );
670 proc = NtUserGetDialogProc( (DLGPROC)ret, ansi );
671 if (proc) ret = (UINT_PTR)proc;
672 return ret;
673}
674
675
676/***********************************************************************
677 * GetDpiForWindow (USER32.@)
678 */
680{
681 return NtUserGetDpiForWindow( hwnd );
682}
683
684
685/***********************************************************************
686 * SwitchToThisWindow (USER32.@)
687 */
689{
691 else BringWindowToTop( hwnd );
692}
693
694
695/***********************************************************************
696 * GetWindowRect (USER32.@)
697 */
699{
700 UINT dpi = NTUSER_DPI_CONTEXT_GET_DPI( (UINT_PTR)GetThreadDpiAwarenessContext() );
701 BOOL ret = NtUserGetWindowRect( hwnd, rect, dpi );
702 if (ret) TRACE( "hwnd %p %s\n", hwnd, wine_dbgstr_rect(rect) );
703 return ret;
704}
705
706
707/***********************************************************************
708 * GetWindowRgn (USER32.@)
709 */
711{
712 return NtUserGetWindowRgnEx( hwnd, hrgn, 0 );
713}
714
715
716/***********************************************************************
717 * GetWindowRgnBox (USER32.@)
718 */
720{
721 int ret = ERROR;
722 HRGN hrgn;
723
724 if (!rect)
725 return ERROR;
726
727 if ((hrgn = CreateRectRgn( 0, 0, 0, 0 )))
728 {
729 if ((ret = GetWindowRgn( hwnd, hrgn )) != ERROR )
730 ret = GetRgnBox( hrgn, rect );
732 }
733
734 return ret;
735}
736
737
738/***********************************************************************
739 * GetClientRect (USER32.@)
740 */
742{
743 UINT dpi = NTUSER_DPI_CONTEXT_GET_DPI( (UINT_PTR)GetThreadDpiAwarenessContext() );
744 return NtUserGetClientRect( hwnd, rect, dpi );
745}
746
747
748/*******************************************************************
749 * WindowFromPoint (USER32.@)
750 */
752{
753 return NtUserWindowFromPoint( pt.x, pt.y );
754}
755
756
757/*******************************************************************
758 * ChildWindowFromPoint (USER32.@)
759 */
761{
763}
764
765/*******************************************************************
766 * RealChildWindowFromPoint (USER32.@)
767 */
769{
771}
772
773/*******************************************************************
774 * ChildWindowFromPointEx (USER32.@)
775 */
777{
779}
780
781
782/*******************************************************************
783 * MapWindowPoints (USER32.@)
784 */
786{
787 UINT dpi = NTUSER_DPI_CONTEXT_GET_DPI( (UINT_PTR)GetThreadDpiAwarenessContext() );
788 return NtUserMapWindowPoints( hwnd_from, hwnd_to, points, count, dpi );
789}
790
791
792/*******************************************************************
793 * ClientToScreen (USER32.@)
794 */
796{
797 return NtUserClientToScreen( hwnd, pt );
798}
799
800
801/*******************************************************************
802 * ScreenToClient (USER32.@)
803 */
805{
806 return NtUserScreenToClient( hwnd, pt );
807}
808
809
810/***********************************************************************
811 * IsIconic (USER32.@)
812 */
814{
815 return (GetWindowLongW( hwnd, GWL_STYLE ) & WS_MINIMIZE) != 0;
816}
817
818
819/***********************************************************************
820 * IsZoomed (USER32.@)
821 */
823{
824 return (GetWindowLongW( hwnd, GWL_STYLE ) & WS_MAXIMIZE) != 0;
825}
826
827
828/*******************************************************************
829 * AllowSetForegroundWindow (USER32.@)
830 */
832{
833 /* FIXME: If Win98/2000 style SetForegroundWindow behavior is
834 * implemented, then fix this function. */
835 return TRUE;
836}
837
838
839/*******************************************************************
840 * LockSetForegroundWindow (USER32.@)
841 */
843{
844 /* FIXME: If Win98/2000 style SetForegroundWindow behavior is
845 * implemented, then fix this function. */
846 return TRUE;
847}
848
849
850/***********************************************************************
851 * BringWindowToTop (USER32.@)
852 */
854{
855 return NtUserSetWindowPos( hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE );
856}
857
858
859/***********************************************************************
860 * AnimateWindow (USER32.@)
861 */
863{
864 FIXME( "partial stub\n" );
865
866 /* If trying to show/hide and it's already shown/hidden or invalid window,
867 * fail with invalid parameter. */
868 if (!IsWindow( hwnd ) || (!(flags & AW_HIDE)) == IsWindowVisible( hwnd ))
869 {
871 return FALSE;
872 }
873
874 NtUserShowWindow( hwnd, (flags & AW_HIDE) ? SW_HIDE : ((flags & AW_ACTIVATE) ? SW_SHOW : SW_SHOWNA) );
875 return TRUE;
876}
877
878
879/***********************************************************************
880 * BeginDeferWindowPos (USER32.@)
881 */
883{
884 return NtUserBeginDeferWindowPos( count );
885}
886
887
888/***********************************************************************
889 * DeferWindowPos (USER32.@)
890 */
892 INT cx, INT cy, UINT flags )
893{
894 return NtUserDeferWindowPosAndBand( hdwp, hwnd, after, x, y, cx, cy, flags, 0, 0 );
895}
896
897
898/***********************************************************************
899 * EndDeferWindowPos (USER32.@)
900 */
902{
903 return NtUserEndDeferWindowPosEx( hdwp, FALSE );
904}
905
906
907/***********************************************************************
908 * ArrangeIconicWindows (USER32.@)
909 */
911{
912 return NtUserArrangeIconicWindows( parent );
913}
914
915
916/**********************************************************************
917 * GetWindowWord (USER32.@)
918 */
920{
921 return NtUserGetWindowWord( hwnd, offset );
922}
923
924
925/**********************************************************************
926 * GetWindowLongA (USER32.@)
927 */
928
929#ifdef __i386__
930
931/* This wrapper is here to workaround a ntlea quirk. First of all, ntlea
932 * checks whether GetWindowLongA starts with the Win32 hotpatchable prologue,
933 * if it can find that, it will use a hooking strategy more difficult for us
934 * to deal with. Secondly, it assumes what follows the prologue is a `pushl $-2`,
935 * and will try to skip over this instruction when calling `GetWindowLongA`,
936 * (i.e. it tries to jump to `GetWindowLongA + 7`, 5 bytes for the prologue, 2
937 * bytes for the `pushl`.). We have to anticipate that and make sure the result
938 * of doing this won't be a messed up stack, or a desynced PC.
939 */
941 ".byte 0x8b, 0xff, 0x55, 0x8b, 0xec\n" /* Win32 hotpatchable prologue. */
942 "pushl $-2\n"
943 "addl $4, %esp\n"
944 "popl %ebp\n"
945 "jmp " __ASM_STDCALL("get_window_longA", 8) )
946LONG WINAPI get_window_longA( HWND hwnd, INT offset )
947#else
949#endif
950{
951 switch (offset)
952 {
953#ifdef _WIN64
954 case GWLP_WNDPROC:
955 case GWLP_HINSTANCE:
956 case GWLP_HWNDPARENT:
957 WARN( "Invalid offset %d\n", offset );
959 return 0;
960#endif
961 default:
962 if (sizeof(void *) == sizeof(LONG))
963 {
964 LONG_PTR ret = NtUserGetWindowLongA( hwnd, offset );
966 }
967 return NtUserGetWindowLongA( hwnd, offset );
968 }
969}
970
971
972/**********************************************************************
973 * GetWindowLongW (USER32.@)
974 */
976{
977 switch (offset)
978 {
979#ifdef _WIN64
980 case GWLP_WNDPROC:
981 case GWLP_HINSTANCE:
982 case GWLP_HWNDPARENT:
983 WARN( "Invalid offset %d\n", offset );
985 return 0;
986#endif
987 default:
988 if (sizeof(void *) == sizeof(LONG))
989 {
990 LONG_PTR ret = NtUserGetWindowLongW( hwnd, offset );
992 }
993 return NtUserGetWindowLongW( hwnd, offset );
994 }
995}
996
997
998/**********************************************************************
999 * SetWindowLongA (USER32.@)
1000 *
1001 * See SetWindowLongW.
1002 */
1004{
1005 switch (offset)
1006 {
1007#ifdef _WIN64
1008 case GWLP_WNDPROC:
1009 case GWLP_HINSTANCE:
1010 case GWLP_HWNDPARENT:
1011 WARN( "Invalid offset %d\n", offset );
1013 return 0;
1014#else
1015 case DWLP_DLGPROC:
1016 if (NtUserGetDialogInfo( hwnd )) return set_dialog_proc( hwnd, newval, TRUE );
1017 /* fall through */
1018#endif
1019 default:
1020 return NtUserSetWindowLong( hwnd, offset, newval, TRUE );
1021 }
1022}
1023
1024
1025/**********************************************************************
1026 * SetWindowLongW (USER32.@) Set window attribute
1027 *
1028 * SetWindowLong() alters one of a window's attributes or sets a 32-bit (long)
1029 * value in a window's extra memory.
1030 *
1031 * The _hwnd_ parameter specifies the handle to a window that
1032 * has extra memory. The _newval_ parameter contains the new
1033 * attribute or extra memory value. If positive, the _offset_
1034 * parameter is the byte-addressed location in the window's extra
1035 * memory to set. If negative, _offset_ specifies the window
1036 * attribute to set, and should be one of the following values:
1037 *
1038 * GWL_EXSTYLE The window's extended window style
1039 *
1040 * GWL_STYLE The window's window style.
1041 *
1042 * GWLP_WNDPROC Pointer to the window's window procedure.
1043 *
1044 * GWLP_HINSTANCE The window's application instance handle.
1045 *
1046 * GWLP_ID The window's identifier.
1047 *
1048 * GWLP_USERDATA The window's user-specified data.
1049 *
1050 * If the window is a dialog box, the _offset_ parameter can be one of
1051 * the following values:
1052 *
1053 * DWLP_DLGPROC The address of the window's dialog box procedure.
1054 *
1055 * DWLP_MSGRESULT The return value of a message
1056 * that the dialog box procedure processed.
1057 *
1058 * DWLP_USER Application specific information.
1059 *
1060 * RETURNS
1061 *
1062 * If successful, returns the previous value located at _offset_. Otherwise,
1063 * returns 0.
1064 *
1065 * NOTES
1066 *
1067 * Extra memory for a window class is specified by a nonzero cbWndExtra
1068 * parameter of the WNDCLASS structure passed to RegisterClass() at the
1069 * time of class creation.
1070 *
1071 * Using GWL_WNDPROC to set a new window procedure effectively creates
1072 * a window subclass. Use CallWindowProc() in the new windows procedure
1073 * to pass messages to the superclass's window procedure.
1074 *
1075 * The user data is reserved for use by the application which created
1076 * the window.
1077 *
1078 * Do not use GWL_STYLE to change the window's WS_DISABLED style;
1079 * instead, call the EnableWindow() function to change the window's
1080 * disabled state.
1081 *
1082 * Do not use GWL_HWNDPARENT to reset the window's parent, use
1083 * SetParent() instead.
1084 *
1085 * Win95:
1086 * When offset is GWL_STYLE and the calling app's ver is 4.0,
1087 * it sends WM_STYLECHANGING before changing the settings
1088 * and WM_STYLECHANGED afterwards.
1089 * App ver 4.0 can't use SetWindowLong to change WS_EX_TOPMOST.
1090 */
1092 HWND hwnd, /* [in] window to alter */
1093 INT offset, /* [in] offset, in bytes, of location to alter */
1094 LONG newval /* [in] new value of location */
1095)
1096{
1097 switch (offset)
1098 {
1099#ifdef _WIN64
1100 case GWLP_WNDPROC:
1101 case GWLP_HINSTANCE:
1102 case GWLP_HWNDPARENT:
1103 WARN("Invalid offset %d\n", offset );
1105 return 0;
1106#else
1107 case DWLP_DLGPROC:
1108 if (NtUserGetDialogInfo( hwnd )) return set_dialog_proc( hwnd, newval, FALSE );
1109 /* fall through */
1110#endif
1111 default:
1112 return NtUserSetWindowLong( hwnd, offset, newval, FALSE );
1113 }
1114}
1115
1116
1117/*******************************************************************
1118 * GetWindowTextA (USER32.@)
1119 */
1121{
1122 WCHAR *buffer;
1123 int ret = 0;
1124
1125 if (!lpString || nMaxCount <= 0) return 0;
1126
1127 __TRY
1128 {
1129 lpString[0] = 0;
1130
1132 {
1133 ret = (INT)SendMessageA( hwnd, WM_GETTEXT, nMaxCount, (LPARAM)lpString );
1134 }
1135 else if ((buffer = HeapAlloc( GetProcessHeap(), 0, nMaxCount * sizeof(WCHAR) )))
1136 {
1137 /* when window belongs to other process, don't send a message */
1139 if (!WideCharToMultiByte( CP_ACP, 0, buffer, -1, lpString, nMaxCount, NULL, NULL ))
1140 lpString[nMaxCount-1] = 0;
1142 ret = strlen(lpString);
1143 }
1144 }
1146 {
1147 ret = 0;
1148 }
1149 __ENDTRY
1150
1151 return ret;
1152}
1153
1154
1155/*******************************************************************
1156 * GetWindowTextW (USER32.@)
1157 */
1159{
1160 int ret;
1161
1162 if (!lpString || nMaxCount <= 0) return 0;
1163
1164 __TRY
1165 {
1166 lpString[0] = 0;
1167
1169 {
1170 ret = (INT)SendMessageW( hwnd, WM_GETTEXT, nMaxCount, (LPARAM)lpString );
1171 }
1172 else
1173 {
1174 /* when window belongs to other process, don't send a message */
1176 }
1177 }
1179 {
1180 ret = 0;
1181 }
1182 __ENDTRY
1183
1184 return ret;
1185}
1186
1187
1188/*******************************************************************
1189 * SetWindowTextA (USER32.@)
1190 * SetWindowText (USER32.@)
1191 */
1193{
1194 if (is_broadcast(hwnd))
1195 {
1197 return FALSE;
1198 }
1199 if (!WIN_IsCurrentProcess( hwnd ))
1200 WARN( "setting text %s of other process window %p should not use SendMessage\n",
1201 debugstr_a(lpString), hwnd );
1202 return (BOOL)SendMessageA( hwnd, WM_SETTEXT, 0, (LPARAM)lpString );
1203}
1204
1205
1206/*******************************************************************
1207 * SetWindowTextW (USER32.@)
1208 */
1210{
1211 if (is_broadcast(hwnd))
1212 {
1214 return FALSE;
1215 }
1216 if (!WIN_IsCurrentProcess( hwnd ))
1217 WARN( "setting text %s of other process window %p should not use SendMessage\n",
1218 debugstr_w(lpString), hwnd );
1219 return (BOOL)SendMessageW( hwnd, WM_SETTEXT, 0, (LPARAM)lpString );
1220}
1221
1222
1223/*******************************************************************
1224 * GetWindowTextLengthA (USER32.@)
1225 */
1227{
1228 CPINFO info;
1229
1231
1232 /* when window belongs to other process, don't send a message */
1233 GetCPInfo( CP_ACP, &info );
1234 return NtUserGetWindowTextLength( hwnd ) * info.MaxCharSize;
1235}
1236
1237/*******************************************************************
1238 * GetWindowTextLengthW (USER32.@)
1239 */
1241{
1243
1244 /* when window belongs to other process, don't send a message */
1245 return NtUserGetWindowTextLength( hwnd );
1246}
1247
1248
1249/*******************************************************************
1250 * IsWindow (USER32.@)
1251 */
1253{
1254 return NtUserIsWindow( hwnd );
1255}
1256
1257
1258/***********************************************************************
1259 * GetWindowThreadProcessId (USER32.@)
1260 */
1262{
1263 return NtUserGetWindowThread( hwnd, process );
1264}
1265
1266
1267/*****************************************************************
1268 * GetParent (USER32.@)
1269 */
1271{
1272 return NtUserGetParent( hwnd );
1273}
1274
1275
1276/*******************************************************************
1277 * IsChild (USER32.@)
1278 */
1280{
1281 return NtUserIsChild( parent, child );
1282}
1283
1284
1285/***********************************************************************
1286 * IsWindowVisible (USER32.@)
1287 */
1289{
1290 return NtUserIsWindowVisible( hwnd );
1291}
1292
1293
1294/*******************************************************************
1295 * GetTopWindow (USER32.@)
1296 */
1298{
1299 if (!hwnd) hwnd = GetDesktopWindow();
1300 return GetWindow( hwnd, GW_CHILD );
1301}
1302
1303
1304/*******************************************************************
1305 * GetWindow (USER32.@)
1306 */
1308{
1309 return NtUserGetWindowRelative( hwnd, rel );
1310}
1311
1312
1313/*******************************************************************
1314 * ShowOwnedPopups (USER32.@)
1315 */
1317{
1318 return NtUserShowOwnedPopups( owner, show );
1319}
1320
1321
1322/*******************************************************************
1323 * GetLastActivePopup (USER32.@)
1324 */
1326{
1327 return NtUserGetLastActivePopup( hwnd );
1328}
1329
1330
1331/*******************************************************************
1332 * WIN_ListChildren
1333 *
1334 * Build an array of the children of a given window. The array must be
1335 * freed with HeapFree. Returns NULL when no windows are found.
1336 */
1338{
1339 HWND *list;
1340 ULONG size = 128;
1342
1343 if (!(hwnd = GetWindow( hwnd, GW_CHILD ))) return NULL;
1344
1345 for (;;)
1346 {
1347 if (!(list = HeapAlloc( GetProcessHeap(), 0, size * sizeof(HWND) ))) return NULL;
1349 if (!status && size > 1) break;
1350 HeapFree( GetProcessHeap(), 0, list );
1351 if (status != STATUS_BUFFER_TOO_SMALL) return NULL;
1352 }
1353 list[size - 1] = 0;
1354 return list;
1355}
1356
1357
1358/*******************************************************************
1359 * EnumWindows (USER32.@)
1360 */
1362{
1363 return enum_windows( 0, 0, 0, FALSE, lpEnumFunc, lParam );
1364}
1365
1366
1367/**********************************************************************
1368 * EnumThreadWindows (USER32.@)
1369 */
1371{
1372 return enum_windows( 0, 0, id, FALSE, func, lParam );
1373}
1374
1375
1376/***********************************************************************
1377 * EnumDesktopWindows (USER32.@)
1378 */
1380{
1381 return enum_windows( desktop, 0, 0, FALSE, func, lparam );
1382}
1383
1384
1385/**********************************************************************
1386 * EnumChildWindows (USER32.@)
1387 */
1389{
1390 return enum_windows( 0, parent, 0, TRUE, func, lParam );
1391}
1392
1393
1394/*******************************************************************
1395 * AnyPopup (USER32.@)
1396 */
1398{
1399 int i;
1400 BOOL retvalue;
1402
1403 if (!list) return FALSE;
1404 for (i = 0; list[i]; i++)
1405 {
1406 if (IsWindowVisible( list[i] ) && GetWindow( list[i], GW_OWNER )) break;
1407 }
1408 retvalue = (list[i] != 0);
1409 HeapFree( GetProcessHeap(), 0, list );
1410 return retvalue;
1411}
1412
1413
1414/*******************************************************************
1415 * FlashWindow (USER32.@)
1416 */
1418{
1419 FLASHWINFO finfo;
1420
1421 finfo.cbSize = sizeof(FLASHWINFO);
1422 finfo.dwFlags = bInvert ? FLASHW_ALL : FLASHW_STOP;
1423 finfo.uCount = 1;
1424 finfo.dwTimeout = 0;
1425 finfo.hwnd = hWnd;
1426 return NtUserFlashWindowEx( &finfo );
1427}
1428
1429
1430/*******************************************************************
1431 * GetWindowContextHelpId (USER32.@)
1432 */
1434{
1435 return NtUserGetWindowContextHelpId( hwnd );
1436}
1437
1438
1439/*******************************************************************
1440 * SetWindowContextHelpId (USER32.@)
1441 */
1443{
1444 return NtUserSetWindowContextHelpId( hwnd, id );
1445}
1446
1447
1448/*******************************************************************
1449 * DragDetect (USER32.@)
1450 */
1452{
1453 return NtUserDragDetect( hwnd, pt.x, pt.y );
1454}
1455
1456/******************************************************************************
1457 * GetWindowModuleFileNameA (USER32.@)
1458 */
1460{
1462
1463 TRACE( "%p, %p, %u\n", hwnd, module, size );
1464
1465 if (!WIN_IsCurrentProcess( hwnd ))
1466 {
1468 return 0;
1469 }
1470
1472 return GetModuleFileNameA( hinst, module, size );
1473}
1474
1475/******************************************************************************
1476 * GetWindowModuleFileNameW (USER32.@)
1477 */
1479{
1481
1482 TRACE( "%p, %p, %u\n", hwnd, module, size );
1483
1484 if (!WIN_IsCurrentProcess( hwnd ))
1485 {
1487 return 0;
1488 }
1489
1491 return GetModuleFileNameW( hinst, module, size );
1492}
1493
1494/******************************************************************************
1495 * GetWindowInfo (USER32.@)
1496 *
1497 * Note: tests show that Windows doesn't check cbSize of the structure.
1498 */
1500{
1501 return NtUserGetWindowInfo( hwnd, info );
1502}
1503
1504/*****************************************************************************
1505 * UpdateLayeredWindowIndirect (USER32.@)
1506 */
1507BOOL WINAPI UpdateLayeredWindowIndirect( HWND hwnd, const UPDATELAYEREDWINDOWINFO *info )
1508{
1509 if (!info || info->cbSize != sizeof(*info))
1510 {
1512 return FALSE;
1513 }
1514
1515 return NtUserUpdateLayeredWindow( hwnd, info->hdcDst, info->pptDst, info->psize,
1516 info->hdcSrc, info->pptSrc, info->crKey,
1517 info->pblend, info->dwFlags, info->prcDirty );
1518}
1519
1520
1521/*****************************************************************************
1522 * UpdateLayeredWindow (USER32.@)
1523 */
1525 HDC hdcSrc, POINT *pptSrc, COLORREF crKey, BLENDFUNCTION *pblend,
1526 DWORD flags)
1527{
1528 UPDATELAYEREDWINDOWINFO info;
1529
1530 if (flags & ULW_EX_NORESIZE) /* only valid for UpdateLayeredWindowIndirect */
1531 {
1533 return FALSE;
1534 }
1535 info.cbSize = sizeof(info);
1536 info.hdcDst = hdcDst;
1537 info.pptDst = pptDst;
1538 info.psize = psize;
1539 info.hdcSrc = hdcSrc;
1540 info.pptSrc = pptSrc;
1541 info.crKey = crKey;
1542 info.pblend = pblend;
1543 info.dwFlags = flags;
1544 info.prcDirty = NULL;
1546}
1547
1548
1549/******************************************************************************
1550 * GetProcessDefaultLayout [USER32.@]
1551 *
1552 * Gets the default layout for parentless windows.
1553 */
1555{
1556 if (!layout)
1557 {
1559 return FALSE;
1560 }
1561 *layout = NtUserGetProcessDefaultLayout();
1562 if (*layout == ~0u)
1563 {
1565 DWORD i, version_layout = 0;
1566 UINT len;
1567 DWORD user_lang = GetUserDefaultLangID();
1568 DWORD *languages;
1569 void *data = NULL;
1570
1572 if (!(len = GetFileVersionInfoSizeW( buffer, NULL ))) goto done;
1573 if (!(data = HeapAlloc( GetProcessHeap(), 0, len ))) goto done;
1574 if (!GetFileVersionInfoW( buffer, 0, len, data )) goto done;
1575 if (!VerQueryValueW( data, L"\\VarFileInfo\\Translation", (void **)&languages, &len ) || !len) goto done;
1576
1577 len /= sizeof(DWORD);
1578 for (i = 0; i < len; i++) if (LOWORD(languages[i]) == user_lang) break;
1579 if (i == len) /* try neutral language */
1580 for (i = 0; i < len; i++)
1581 if (LOWORD(languages[i]) == MAKELANGID( PRIMARYLANGID(user_lang), SUBLANG_NEUTRAL )) break;
1582 if (i == len) i = 0; /* default to the first one */
1583
1584 swprintf( buffer, ARRAY_SIZE(buffer), L"\\StringFileInfo\\%04x%04x\\FileDescription",
1585 LOWORD(languages[i]), HIWORD(languages[i]) );
1586 if (!VerQueryValueW( data, buffer, (void **)&str, &len )) goto done;
1587 TRACE( "found description %s\n", debugstr_w( str ));
1588 if (str[0] == 0x200e && str[1] == 0x200e) version_layout = LAYOUT_RTL;
1589
1590 done:
1591 HeapFree( GetProcessHeap(), 0, data );
1592 NtUserSetProcessDefaultLayout( *layout = version_layout );
1593 }
1594 return TRUE;
1595}
1596
1597
1598/******************************************************************************
1599 * SetProcessDefaultLayout [USER32.@]
1600 *
1601 * Sets the default layout for parentless windows.
1602 */
1604{
1605 return NtUserSetProcessDefaultLayout( layout );
1606}
1607
1608
1609/***********************************************************************
1610 * UpdateWindow (USER32.@)
1611 */
1613{
1614 if (!hwnd)
1615 {
1617 return FALSE;
1618 }
1619
1621}
1622
1623
1624/***********************************************************************
1625 * ValidateRgn (USER32.@)
1626 */
1628{
1629 if (!hwnd)
1630 {
1632 return FALSE;
1633 }
1634
1636}
1637
1638
1639/*************************************************************************
1640 * ScrollWindow (USER32.@)
1641 */
1642BOOL WINAPI ScrollWindow( HWND hwnd, INT dx, INT dy, const RECT *rect, const RECT *clip_rect )
1643{
1644 UINT flags = SW_INVALIDATE | SW_ERASE | (rect ? 0 : SW_SCROLLCHILDREN) | SW_NODCCACHE;
1645 return NtUserScrollWindowEx( hwnd, dx, dy, rect, clip_rect, 0, NULL, flags );
1646}
1647
1648#ifdef _WIN64
1649
1650/* 64bit versions */
1651
1652#undef GetWindowLongPtrW
1653#undef GetWindowLongPtrA
1654#undef SetWindowLongPtrW
1655#undef SetWindowLongPtrA
1656
1657/*****************************************************************************
1658 * GetWindowLongPtrW (USER32.@)
1659 */
1661{
1662 LONG_PTR ret = NtUserGetWindowLongPtrW( hwnd, offset );
1664}
1665
1666/*****************************************************************************
1667 * GetWindowLongPtrA (USER32.@)
1668 */
1670{
1671 LONG_PTR ret = NtUserGetWindowLongPtrA( hwnd, offset );
1672 return get_window_long_ptr( hwnd, offset, ret, TRUE );
1673}
1674
1675/*****************************************************************************
1676 * SetWindowLongPtrW (USER32.@)
1677 */
1679{
1680 if (offset == DWLP_DLGPROC && NtUserGetDialogInfo( hwnd ))
1681 return set_dialog_proc( hwnd, newval, FALSE );
1682
1683 return NtUserSetWindowLongPtr( hwnd, offset, newval, FALSE );
1684}
1685
1686/*****************************************************************************
1687 * SetWindowLongPtrA (USER32.@)
1688 */
1690{
1691 if (offset == DWLP_DLGPROC && NtUserGetDialogInfo( hwnd ))
1692 return set_dialog_proc( hwnd, newval, TRUE );
1693
1694 return NtUserSetWindowLongPtr( hwnd, offset, newval, TRUE );
1695}
1696
1697#endif /* _WIN64 */
1698
1699#endif
1700
1701/*****************************************************************************
1702 * GetWindowDisplayAffinity (USER32.@)
1703 */
1705{
1706 FIXME("(%p, %p): stub\n", hwnd, affinity);
1707
1708 if (!hwnd || !affinity)
1709 {
1711 return FALSE;
1712 }
1713
1714 *affinity = WDA_NONE;
1715 return TRUE;
1716}
1717
1718/*****************************************************************************
1719 * SetWindowDisplayAffinity (USER32.@)
1720 */
1722{
1723 FIXME("(%p, %lu): stub\n", hwnd, affinity);
1724
1725 if (!hwnd)
1726 {
1728 return FALSE;
1729 }
1730
1732 return FALSE;
1733}
1734
1735/**********************************************************************
1736 * SetWindowCompositionAttribute (USER32.@)
1737 */
1739{
1740 FIXME("(%p, %p): stub\n", hwnd, data);
1742 return FALSE;
1743}
@ lparam
Definition: SystemMenu.c:31
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
Arabic default style
Definition: afstyles.h:94
static const char * wine_dbgstr_rect(const RECT *prc)
Definition: atltest.h:160
HWND hWnd
Definition: settings.c:17
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
LONG NTSTATUS
Definition: precomp.h:26
#define ARRAY_SIZE(A)
Definition: main.h:20
#define FIXME(fmt,...)
Definition: precomp.h:53
#define WARN(fmt,...)
Definition: precomp.h:61
#define LongToHandle(h)
Definition: basetsd.h:82
#define UlongToHandle(ul)
Definition: basetsd.h:97
#define ULongToHandle(h)
Definition: basetsd.h:81
Definition: bufpool.h:45
Definition: list.h:37
LPARAM lParam
Definition: combotst.c:139
#define ERROR_NOT_ENOUGH_MEMORY
Definition: dderror.h:7
#define DLGPROC
Definition: maze.c:62
#define enum_callback_wrapper(callback, instance, ref)
Definition: dinput_main.c:455
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
static HINSTANCE instance
Definition: main.c:40
#define GetProcessHeap()
Definition: compat.h:736
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:102
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define CP_ACP
Definition: compat.h:109
#define SetLastError(x)
Definition: compat.h:752
#define HeapAlloc
Definition: compat.h:733
#define __TRY
Definition: compat.h:80
#define TRACE_ON(x)
Definition: compat.h:75
#define MAX_PATH
Definition: compat.h:34
#define HeapFree(x, y, z)
Definition: compat.h:735
#define __ENDTRY
Definition: compat.h:82
#define WideCharToMultiByte
Definition: compat.h:111
#define MultiByteToWideChar
Definition: compat.h:110
#define __EXCEPT_PAGE_FAULT
Definition: compat.h:81
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
Definition: loader.c:600
DWORD WINAPI GetModuleFileNameA(HINSTANCE hModule, LPSTR lpFilename, DWORD nSize)
Definition: loader.c:539
BOOL WINAPI GetCPInfo(UINT codepage, LPCPINFO cpinfo)
Definition: locale.c:2144
LANGID WINAPI GetUserDefaultLangID(void)
Definition: locale.c:1177
BOOL WINAPI GetFileVersionInfoW(LPCWSTR filename, DWORD handle, DWORD datasize, LPVOID data)
Definition: version.c:845
BOOL WINAPI VerQueryValueW(LPCVOID pBlock, LPCWSTR lpSubBlock, LPVOID *lplpBuffer, PUINT puLen)
Definition: version.c:1057
DWORD WINAPI GetFileVersionInfoSizeW(LPCWSTR filename, LPDWORD handle)
Definition: version.c:611
#define swprintf
Definition: precomp.h:40
#define pt(x, y)
Definition: drawing.c:79
r parent
Definition: btrfs.c:3010
KAFFINITY affinity
Definition: wave.h:2
#define ERROR(name)
Definition: error_private.h:53
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
pKey DeleteObject()
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
GLint GLint GLsizei width
Definition: gl.h:1546
GLenum func
Definition: glext.h:6028
GLuint buffer
Definition: glext.h:5915
GLsizeiptr size
Definition: glext.h:5919
GLintptr offset
Definition: glext.h:5920
GLbitfield flags
Definition: glext.h:7161
GLboolean enable
Definition: glext.h:11120
GLfloat param
Definition: glext.h:5796
GLenum GLsizei len
Definition: glext.h:6722
GLsizei const GLfloat * points
Definition: glext.h:8112
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
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 * u
Definition: glfuncs.h:240
static const WCHAR titleW[]
Definition: htmlelem.c:1067
#define cs
Definition: i386-dis.c:442
BOOL NTAPI NtUserUpdateLayeredWindow(HWND hwnd, HDC hdcDst, POINT *pptDst, SIZE *psize, HDC hdcSrc, POINT *pptSrc, COLORREF crKey, BLENDFUNCTION *pblend, DWORD dwFlags, RECT *prcDirty)
Definition: layered.c:341
BOOL NTAPI NtUserSetWindowPos(HWND hWnd, HWND hWndInsertAfter, int X, int Y, int cx, int cy, UINT uFlags)
Definition: winpos.c:3533
DWORD NTAPI NtUserScrollWindowEx(HWND hWnd, INT dx, INT dy, const RECT *rect, const RECT *clipRect, HRGN hrgnUpdate, LPRECT rcUpdate, UINT flags)
Definition: scrollex.c:571
INT NTAPI NtUserInternalGetWindowText(HWND hWnd, LPWSTR lpString, INT nMaxCount)
Definition: window.c:4592
HWND NTAPI NtUserRealChildWindowFromPoint(HWND Parent, LONG x, LONG y)
Definition: winpos.c:3513
BOOL NTAPI NtUserFlashWindowEx(IN PFLASHWINFO pfwi)
Definition: painting.c:1752
HWND NTAPI NtUserCreateWindowEx(DWORD dwExStyle, PLARGE_STRING plstrClassName, PLARGE_STRING plstrClsVersion, PLARGE_STRING plstrWindowName, DWORD dwStyle, int x, int y, int nWidth, int nHeight, HWND hWndParent, HMENU hMenu, HINSTANCE hInstance, LPVOID lpParam, DWORD dwFlags, PVOID acbiBuffer)
Definition: window.c:2669
#define NtUserSetWindowLongPtr
Definition: ntuser.h:3288
DWORD_PTR NTAPI NtUserCallTwoParam(DWORD_PTR Param1, DWORD_PTR Param2, DWORD Routine)
Definition: simplecall.c:434
HWND NTAPI NtUserWindowFromPoint(LONG X, LONG Y)
Definition: winpos.c:3857
BOOL NTAPI NtUserDragDetect(HWND hWnd, POINT pt)
Definition: message.c:2209
BOOL NTAPI NtUserRedrawWindow(HWND hWnd, CONST RECT *lprcUpdate, HRGN hrgnUpdate, UINT flags)
Definition: painting.c:2003
BOOL NTAPI NtUserDestroyMenu(HMENU hMenu)
Definition: menu.c:5834
LONG NTAPI NtUserSetWindowLong(HWND hWnd, DWORD Index, LONG NewValue, BOOL Ansi)
Definition: window.c:4048
BOOL NTAPI NtUserShowWindow(HWND hWnd, LONG nCmdShow)
Definition: winpos.c:3821
NTSTATUS NTAPI NtUserBuildHwndList(HDESK hDesktop, HWND hwndParent, BOOLEAN bChildren, ULONG dwThreadId, ULONG cHwnd, HWND *phwndList, ULONG *pcHwndNeeded)
Definition: window.c:1521
HWND NTAPI NtUserChildWindowFromPointEx(HWND Parent, LONG x, LONG y, UINT Flags)
Definition: winpos.c:3252
DWORD_PTR NTAPI NtUserCallHwnd(HWND hWnd, DWORD Routine)
Definition: simplecall.c:711
HWND NTAPI NtUserFindWindowEx(HWND hwndParent, HWND hwndChildAfter, PUNICODE_STRING ucClassName, PUNICODE_STRING ucWindowName, DWORD dwUnknown)
Definition: window.c:3146
BOOL NTAPI NtUserEndDeferWindowPosEx(HDWP WinPosInfo, BOOL bAsync)
Definition: winpos.c:3273
DWORD NTAPI NtUserCallHwndParam(HWND hWnd, DWORD_PTR Param, DWORD Routine)
Definition: simplecall.c:778
#define debugstr_a
Definition: kernel32.h:31
#define debugstr_wn
Definition: kernel32.h:33
#define debugstr_w
Definition: kernel32.h:32
static real win[4][36]
GLint dy
Definition: linetemp.h:97
if(dx< 0)
Definition: linetemp.h:194
GLint dx
Definition: linetemp.h:97
__u16 time
Definition: mkdosfs.c:8
static HINSTANCE hinst
Definition: edit.c:551
static TfClientId tid
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:63
static HWND child
Definition: cursoricon.c:298
static UINT UINT *static DPI_AWARENESS_CONTEXT(WINAPI *pGetThreadDpiAwarenessContext)(void)
static DWORD layout
Definition: win.c:53
static HRGN hrgn
Definition: win.c:55
static COLORREF BYTE DWORD *static DWORD
Definition: win.c:42
static HDC
Definition: win.c:43
static BOOL bInvert
Definition: win.c:51
#define __ASM_GLOBAL_FUNC(name, code)
Definition: port.h:201
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
unsigned __int3264 UINT_PTR
Definition: mstsclib_h.h:274
unsigned int UINT
Definition: ndis.h:50
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeStringFromAsciiz(_Out_ PUNICODE_STRING Destination, _In_ PCSZ Source)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
_Must_inspect_result_ _Out_ LPSIZE psize
Definition: ntgdi.h:1569
#define L(x)
Definition: ntvdm.h:50
static HANDLE proc()
Definition: pdb.c:34
#define LOWORD(l)
Definition: pedump.c:82
#define WS_CHILD
Definition: pedump.c:617
#define WS_CAPTION
Definition: pedump.c:624
#define WS_EX_NOPARENTNOTIFY
Definition: pedump.c:646
#define WS_EX_ACCEPTFILES
Definition: pedump.c:648
#define WS_MAXIMIZEBOX
Definition: pedump.c:632
#define WS_EX_DLGMODALFRAME
Definition: pedump.c:645
#define WS_MAXIMIZE
Definition: pedump.c:623
#define WS_TABSTOP
Definition: pedump.c:634
#define WS_SYSMENU
Definition: pedump.c:629
#define WS_BORDER
Definition: pedump.c:625
#define WS_POPUP
Definition: pedump.c:616
#define WS_GROUP
Definition: pedump.c:633
#define WS_VSCROLL
Definition: pedump.c:627
#define WS_MINIMIZE
Definition: pedump.c:622
#define WS_VISIBLE
Definition: pedump.c:620
#define WS_EX_TOPMOST
Definition: pedump.c:647
long LONG
Definition: pedump.c:60
#define WS_DISABLED
Definition: pedump.c:621
#define WS_DLGFRAME
Definition: pedump.c:626
#define WS_EX_TRANSPARENT
Definition: pedump.c:649
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
#define WS_HSCROLL
Definition: pedump.c:628
#define WS_CLIPCHILDREN
Definition: pedump.c:619
#define WS_MINIMIZEBOX
Definition: pedump.c:631
#define WS_THICKFRAME
Definition: pedump.c:630
#define INT
Definition: polytest.cpp:20
static char title[]
Definition: ps.c:92
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:586
_Out_opt_ int * cx
Definition: commctrl.h:585
#define __ASM_CFI(str)
Definition: asm.h:39
#define __ASM_STDCALL_FUNC(name, args, code)
Definition: asm.h:81
#define __ASM_STDCALL(name, args)
Definition: asm.h:33
#define list
Definition: rosglue.h:35
const WCHAR * str
#define MAKELANGID(p, s)
Definition: nls.h:15
#define SUBLANG_NEUTRAL
Definition: nls.h:167
#define PRIMARYLANGID(l)
Definition: nls.h:16
#define DECLSPEC_HOTPATCH
Definition: config.h:9
#define STATUS_BUFFER_TOO_SMALL
Definition: shellext.h:69
#define TRACE(s)
Definition: solgame.cpp:4
& rect
Definition: startmenu.cpp:1413
USHORT MaximumLength
Definition: env_spec_w32.h:370
Definition: ps.c:97
__inline int after(__u32 seq1, __u32 seq2)
Definition: tcpcore.h:2395
#define GWLP_WNDPROC
Definition: treelist.c:66
HANDLE HINSTANCE
Definition: typedefs.h:77
#define MAKEWORD(a, b)
Definition: typedefs.h:248
uint32_t * LPDWORD
Definition: typedefs.h:59
int32_t INT
Definition: typedefs.h:58
uint32_t ULONG
Definition: typedefs.h:59
#define HIWORD(l)
Definition: typedefs.h:247
#define WS_EX_DRAGDETECT
Definition: undocuser.h:21
#define WIN_GetFullHandle(h)
Definition: user_x.h:108
static const WCHAR classW[]
Definition: lex.c:40
static const WCHAR procid[]
Definition: wbemdisp.c:289
int ret
#define dpi
Definition: sysparams.c:23
void MDI_CalcDefaultChildPos(HWND hwndClient, INT total, LPPOINT lpPos, INT delta, UINT *id)
Definition: mdi.c:308
int WINAPI GetWindowTextA(HWND hWnd, LPSTR lpString, int nMaxCount)
Definition: window.c:1312
int WINAPI GetWindowTextW(HWND hWnd, LPWSTR lpString, int nMaxCount)
Definition: window.c:1394
static UINT WPARAM LPARAM BOOL ansi
Definition: misc.c:135
BOOL WINAPI UpdateLayeredWindow(HWND hwnd, HDC hdcDst, POINT *pptDst, SIZE *psize, HDC hdcSrc, POINT *pptSrc, COLORREF crKey, BLENDFUNCTION *pblend, DWORD flags)
Definition: win.c:1524
HWND WINAPI ChildWindowFromPointEx(HWND parent, POINT pt, UINT flags)
Definition: win.c:776
static BOOL enum_windows(HDESK desktop, HWND hwnd, DWORD tid, BOOL children, WNDENUMPROC proc, LPARAM param)
Definition: win.c:71
BOOL WINAPI EnumWindows(WNDENUMPROC lpEnumFunc, LPARAM lParam)
Definition: win.c:1361
HWND WINAPI ChildWindowFromPoint(HWND parent, POINT pt)
Definition: win.c:760
BOOL WINAPI ScrollWindow(HWND hwnd, INT dx, INT dy, const RECT *rect, const RECT *clip_rect)
Definition: win.c:1642
UINT WINAPI ArrangeIconicWindows(HWND parent)
Definition: win.c:910
BOOL WINAPI DragDetect(HWND hwnd, POINT pt)
Definition: win.c:1451
BOOL WINAPI ShowOwnedPopups(HWND owner, BOOL show)
Definition: win.c:1316
WORD WINAPI GetWindowWord(HWND hwnd, INT offset)
Definition: win.c:919
HWND WIN_IsCurrentProcess(HWND hwnd)
Definition: win.c:131
BOOL WINAPI SetWindowDisplayAffinity(HWND hwnd, DWORD affinity)
Definition: win.c:1721
DPI_AWARENESS_CONTEXT WINAPI GetDpiAwarenessContextForProcess(HANDLE process)
Definition: win.c:638
static LONG_PTR get_window_long_ptr(HWND hwnd, int offset, LONG_PTR ret, BOOL ansi)
Definition: win.c:653
BOOL WINAPI DECLSPEC_HOTPATCH GetWindowInfo(HWND hwnd, WINDOWINFO *info)
Definition: win.c:1499
BOOL WINAPI SetProcessDefaultLayout(DWORD layout)
Definition: win.c:1603
BOOL is_desktop_window(HWND hwnd)
Definition: win.c:102
INT WINAPI GetWindowTextLengthW(HWND hwnd)
Definition: win.c:1240
INT WINAPI GetWindowTextLengthA(HWND hwnd)
Definition: win.c:1226
#define DUMPED_EX_STYLES
DPI_HOSTING_BEHAVIOR WINAPI GetWindowDpiHostingBehavior(HWND hwnd)
Definition: win.c:646
int WINAPI GetWindowRgn(HWND hwnd, HRGN hrgn)
Definition: win.c:710
ULONG WIN_SetStyle(HWND hwnd, ULONG set_bits, ULONG clear_bits)
Definition: win.c:164
BOOL WINAPI SetWindowCompositionAttribute(HWND hwnd, void *data)
Definition: win.c:1738
BOOL WINAPI AllowSetForegroundWindow(DWORD procid)
Definition: win.c:831
BOOL WINAPI LockSetForegroundWindow(UINT lockcode)
Definition: win.c:842
BOOL WINAPI CloseWindow(HWND hwnd)
Definition: win.c:494
UINT WINAPI GetDpiForWindow(HWND hwnd)
Definition: win.c:679
static void dump_window_styles(DWORD style, DWORD exstyle)
Definition: win.c:176
DPI_AWARENESS_CONTEXT WINAPI GetWindowDpiAwarenessContext(HWND hwnd)
Definition: win.c:630
BOOL WINAPI BringWindowToTop(HWND hwnd)
Definition: win.c:853
BOOL WINAPI GetWindowDisplayAffinity(HWND hwnd, DWORD *affinity)
Definition: win.c:1704
BOOL WINAPI IsIconic(HWND hwnd)
Definition: win.c:813
BOOL WINAPI GetProcessDefaultLayout(DWORD *layout)
Definition: win.c:1554
BOOL WINAPI EnumDesktopWindows(HDESK desktop, WNDENUMPROC func, LPARAM lparam)
Definition: win.c:1379
HWND WINAPI FindWindowW(LPCWSTR className, LPCWSTR title)
Definition: win.c:583
static BOOL is_default_coord(int x)
Definition: win.c:286
BOOL WINAPI SetWindowContextHelpId(HWND hwnd, DWORD id)
Definition: win.c:1442
UINT WINAPI GetWindowModuleFileNameA(HWND hwnd, LPSTR module, UINT size)
Definition: win.c:1459
BOOL WINAPI OpenIcon(HWND hwnd)
Definition: win.c:505
BOOL WINAPI DECLSPEC_HOTPATCH SetWindowTextW(HWND hwnd, LPCWSTR lpString)
Definition: win.c:1209
BOOL WINAPI AnimateWindow(HWND hwnd, DWORD time, DWORD flags)
Definition: win.c:862
UINT WINAPI GetWindowModuleFileNameW(HWND hwnd, LPWSTR module, UINT size)
Definition: win.c:1478
HWND WINAPI FindWindowExW(HWND parent, HWND child, const WCHAR *class, const WCHAR *title)
Definition: win.c:516
BOOL WINAPI UpdateLayeredWindowIndirect(HWND hwnd, const UPDATELAYEREDWINDOWINFO *info)
Definition: win.c:1507
#define DUMPED_STYLES
HWND WINAPI GetTopWindow(HWND hwnd)
Definition: win.c:1297
BOOL WINAPI AnyPopup(void)
Definition: win.c:1397
HWND WIN_CreateWindowEx(CREATESTRUCTW *cs, LPCWSTR className, HINSTANCE module, BOOL unicode)
Definition: win.c:296
BOOL WINAPI FlashWindow(HWND hWnd, BOOL bInvert)
Definition: win.c:1417
int WINAPI GetWindowRgnBox(HWND hwnd, RECT *rect)
Definition: win.c:719
void WINAPI SwitchToThisWindow(HWND hwnd, BOOL alt_tab)
Definition: win.c:688
DWORD WINAPI GetWindowContextHelpId(HWND hwnd)
Definition: win.c:1433
static LONG_PTR set_dialog_proc(HWND hwnd, LONG_PTR newval, BOOL ansi)
Definition: win.c:664
BOOL WINAPI IsZoomed(HWND hwnd)
Definition: win.c:822
HWND WIN_IsCurrentThread(HWND hwnd)
Definition: win.c:142
static BOOL is_broadcast(HWND hwnd)
Definition: win.c:120
HWND * WIN_ListChildren(HWND hwnd)
Definition: win.c:1337
DWORD WINAPI GetWindowThreadProcessId(HWND hWnd, PDWORD lpdwProcessId)
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
DWORD COLORREF
Definition: windef.h:300
#define WINAPI
Definition: msvc.h:6
#define ERROR_INVALID_INDEX
Definition: winerror.h:894
#define ERROR_INVALID_WINDOW_HANDLE
Definition: winerror.h:881
#define ERROR_CANNOT_FIND_WND_CLASS
Definition: winerror.h:888
#define ERROR_NOACCESS
Definition: winerror.h:578
HRGN WINAPI CreateRectRgn(_In_ int, _In_ int, _In_ int, _In_ int)
#define LAYOUT_RTL
Definition: wingdi.h:1371
int WINAPI GetRgnBox(_In_ HRGN, _Out_ LPRECT)
#define SW_SHOWNORMAL
Definition: winuser.h:773
#define WS_EX_LAYOUTRTL
Definition: winuser.h:390
#define GW_OWNER
Definition: winuser.h:769
#define SetWindowLongPtrA
Definition: winuser.h:5357
#define WS_EX_STATICEDGE
Definition: winuser.h:403
BOOL WINAPI IsWindow(_In_opt_ HWND)
#define WM_GETTEXTLENGTH
Definition: winuser.h:1622
#define SW_HIDE
Definition: winuser.h:771
BOOL WINAPI SetWindowTextA(_In_ HWND, _In_opt_ LPCSTR)
#define GetWindowLongPtrW
Definition: winuser.h:4832
#define WS_EX_COMPOSITED
Definition: winuser.h:385
HWND WINAPI CreateWindowExA(_In_ DWORD dwExStyle, _In_opt_ LPCSTR lpClassName, _In_opt_ LPCSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
#define CWP_ALL
Definition: winuser.h:207
LONG WINAPI GetWindowLongA(_In_ HWND, _In_ int)
#define HWND_TOPMOST
Definition: winuser.h:1211
#define DWLP_DLGPROC
Definition: winuser.h:874
#define SW_SCROLLCHILDREN
Definition: winuser.h:2581
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
HWND WINAPI GetLastActivePopup(_In_ HWND)
LONG WINAPI SetWindowLongA(_In_ HWND, _In_ int, _In_ LONG)
#define WDA_NONE
Definition: winuser.h:3410
#define WS_EX_APPWINDOW
Definition: winuser.h:383
#define SW_MINIMIZE
Definition: winuser.h:779
#define WS_EX_CONTROLPARENT
Definition: winuser.h:387
#define HWND_BROADCAST
Definition: winuser.h:1207
LONG WINAPI SetWindowLongW(_In_ HWND, _In_ int, _In_ LONG)
LONG WINAPI GetWindowLongW(_In_ HWND, _In_ int)
#define SWP_NOMOVE
Definition: winuser.h:1247
#define SW_INVALIDATE
Definition: winuser.h:2582
#define IS_INTRESOURCE(i)
Definition: winuser.h:580
#define WS_EX_NOACTIVATE
Definition: winuser.h:395
#define WS_EX_TOOLWINDOW
Definition: winuser.h:404
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define SWP_NOSIZE
Definition: winuser.h:1248
#define WM_GETTEXT
Definition: winuser.h:1621
#define RDW_UPDATENOW
Definition: winuser.h:1223
#define GetWindowLongPtrA
Definition: winuser.h:4831
HWND WINAPI FindWindowExA(_In_opt_ HWND, _In_opt_ HWND, _In_opt_ LPCSTR, _In_opt_ LPCSTR)
BOOL WINAPI EndDeferWindowPos(_In_ HDWP)
BOOL WINAPI EnumChildWindows(_In_opt_ HWND, _In_ WNDENUMPROC, _In_ LPARAM)
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
#define GWLP_HINSTANCE
Definition: winuser.h:859
BOOL WINAPI ClientToScreen(_In_ HWND, _Inout_ LPPOINT)
#define MDIS_ALLCHILDSTYLES
Definition: winuser.h:253
HWND WINAPI GetDesktopWindow(void)
Definition: window.c:628
#define WM_SETTEXT
Definition: winuser.h:1620
BOOL WINAPI IsWindowUnicode(_In_ HWND)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define HWND_TOP
Definition: winuser.h:1210
#define WS_EX_MDICHILD
Definition: winuser.h:394
#define SW_SHOWNA
Definition: winuser.h:781
_In_ int nMaxCount
Definition: winuser.h:4880
BOOL WINAPI IsChild(_In_ HWND, _In_ HWND)
#define ULW_EX_NORESIZE
Definition: winuser.h:2790
#define GWLP_HWNDPARENT
Definition: winuser.h:861
#define RDW_ALLCHILDREN
Definition: winuser.h:1224
HWND WINAPI CreateWindowExW(_In_ DWORD dwExStyle, _In_opt_ LPCWSTR lpClassName, _In_opt_ LPCWSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
BOOL WINAPI UpdateWindow(_In_ HWND)
#define WS_EX_WINDOWEDGE
Definition: winuser.h:407
BOOL WINAPI ValidateRgn(_In_ HWND, _In_opt_ HRGN)
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
#define WS_EX_LAYERED
Definition: winuser.h:389
BOOL WINAPI IsWindowEnabled(_In_ HWND)
#define CW_USEDEFAULT
Definition: winuser.h:225
HWND WINAPI GetParent(_In_ HWND)
HWND WINAPI GetWindow(_In_ HWND, _In_ UINT)
HWND WINAPI WindowFromPoint(_In_ POINT)
#define SW_RESTORE
Definition: winuser.h:782
#define SW_ERASE
Definition: winuser.h:2583
HDWP WINAPI DeferWindowPos(_In_ HDWP, _In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define SW_SHOW
Definition: winuser.h:778
#define WS_EX_CLIENTEDGE
Definition: winuser.h:384
HWND WINAPI RealChildWindowFromPoint(_In_ HWND, _In_ POINT)
#define WS_EX_LEFTSCROLLBAR
Definition: winuser.h:392
#define WS_EX_CONTEXTHELP
Definition: winuser.h:386
#define GW_CHILD
Definition: winuser.h:766
HMENU WINAPI LoadMenuW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
BOOL WINAPI EnumThreadWindows(_In_ DWORD, _In_ WNDENUMPROC, _In_ LPARAM)
#define SetWindowLongPtrW
Definition: winuser.h:5358
#define GWL_STYLE
Definition: winuser.h:855
#define WS_EX_RTLREADING
Definition: winuser.h:402
HWND WINAPI FindWindowA(_In_opt_ LPCSTR, _In_opt_ LPCSTR)
#define RDW_VALIDATE
Definition: winuser.h:1221
BOOL WINAPI IsWindowVisible(_In_ HWND)
BOOL(CALLBACK * WNDENUMPROC)(HWND, LPARAM)
Definition: winuser.h:2911
#define WS_EX_NOINHERITLAYOUT
Definition: winuser.h:396
#define HWND_BOTTOM
Definition: winuser.h:1208
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HDWP WINAPI BeginDeferWindowPos(_In_ int)
#define WS_EX_RIGHT
Definition: winuser.h:400
#define WM_SETREDRAW
Definition: winuser.h:1619
BOOL WINAPI ScreenToClient(_In_ HWND, _Inout_ LPPOINT)
static HDC hdcSrc
Definition: xlate.c:32
static HDC hdcDst
Definition: xlate.c:32
const char * LPCSTR
Definition: xmlstorage.h:183
char * LPSTR
Definition: xmlstorage.h:182
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185