source: trunk/src/user32/user32.cpp@ 131

Last change on this file since 131 was 131, checked in by sandervl, 26 years ago

Comctl32 crash on exit fix + user32 bugfix for winhlp32 changed to be similar to Wine

File size: 243.2 KB
Line 
1/* $Id: user32.cpp,v 1.8 1999-06-20 14:02:13 sandervl Exp $ */
2
3/*
4 * Win32 misc user32 API functions for OS/2
5 *
6 * Copyright 1998 Sander van Leeuwen
7 * Copyright 1998 Patrick Haller
8 * Copyright 1998 Peter Fitzsimmons
9 * Copyright 1999 Christoph Bratschi
10 *
11 *
12 * Project Odin Software License can be found in LICENSE.TXT
13 *
14 */
15/*****************************************************************************
16 * Name : USER32.CPP
17 * Purpose : This module maps all Win32 functions contained in USER32.DLL
18 * to their OS/2-specific counterparts as far as possible.
19 *****************************************************************************/
20
21#include <os2win.h>
22#include "misc.h"
23
24#include "user32.h"
25#include "wndproc.h"
26#include "wndsubproc.h"
27#include "wndclass.h"
28#include "icon.h"
29#include "usrcall.h"
30#include "syscolor.h"
31
32#include <wchar.h>
33#include <stdlib.h>
34#include <string.h>
35
36//undocumented stuff
37// WIN32API CalcChildScroll
38// WIN32API CascadeChildWindows
39// WIN32API ClientThreadConnect
40// WIN32API DragObject
41// WIN32API DrawFrame
42// WIN32API EditWndProc
43// WIN32API EndTask
44// WIN32API GetInputDesktop
45// WIN32API GetNextQueueWindow
46// WIN32API GetShellWindow
47// WIN32API InitSharedTable
48// WIN32API InitTask
49// WIN32API IsHungThread
50// WIN32API LockWindowStation
51// WIN32API ModifyAccess
52// WIN32API PlaySoundEvent
53// WIN32API RegisterLogonProcess
54// WIN32API RegisterNetworkCapabilities
55// WIN32API RegisterSystemThread
56// WIN32API SetDeskWallpaper
57// WIN32API SetDesktopBitmap
58// WIN32API SetInternalWindowPos
59// WIN32API SetLogonNotifyWindow
60// WIN32API SetShellWindow
61// WIN32API SetSysColorsTemp
62// WIN32API SetWindowFullScreenState
63// WIN32API SwitchToThisWindow
64// WIN32API SysErrorBox
65// WIN32API TileChildWindows
66// WIN32API UnlockWindowStation
67// WIN32API UserClientDllInitialize
68// WIN32API UserSignalProc
69// WIN32API WinOldAppHackoMatic
70// WIN32API WNDPROC_CALLBACK
71// WIN32API YieldTask
72
73
74
75
76//******************************************************************************
77//******************************************************************************
78HWND WIN32API GetActiveWindow()
79{
80 return(O32_GetActiveWindow());
81}
82//******************************************************************************
83//******************************************************************************
84int __cdecl wsprintfA(char *lpOut, LPCSTR lpFmt, ...)
85{
86 int rc;
87 va_list argptr;
88
89#ifdef DEBUG
90 WriteLog("USER32: wsprintfA\n");
91 WriteLog("USER32: %s\n", lpFmt);
92#endif
93 va_start(argptr, lpFmt);
94 rc = O32_wvsprintf(lpOut, (char *)lpFmt, argptr);
95 va_end(argptr);
96#ifdef DEBUG
97 WriteLog("USER32: %s\n", lpOut);
98#endif
99 return(rc);
100}
101//******************************************************************************
102//******************************************************************************
103int __cdecl wsprintfW(LPWSTR lpOut, LPCWSTR lpFmt, ...)
104{
105 int rc;
106 char *lpFmtA;
107 char szOut[512];
108 va_list argptr;
109
110 dprintf(("USER32: wsprintfW(%08xh,%08xh).\n",
111 lpOut,
112 lpFmt));
113
114 lpFmtA = UnicodeToAsciiString((LPWSTR)lpFmt);
115
116 /* @@@PH 98/07/13 transform "%s" to "%ls" does the unicode magic */
117 {
118 PSZ pszTemp;
119 PSZ pszTemp1;
120 ULONG ulStrings;
121 ULONG ulIndex; /* temporary string counter */
122
123 for (ulStrings = 0, /* determine number of placeholders */
124 pszTemp = lpFmtA;
125
126 (pszTemp != NULL) &&
127 (*pszTemp != 0);
128
129 ulStrings++)
130 {
131 pszTemp = strstr(pszTemp,
132 "%s");
133 if (pszTemp != NULL) /* skip 2 characters */
134 {
135 pszTemp++;
136 pszTemp++;
137 }
138 else
139 break; /* leave loop immediately */
140 }
141
142 if (ulStrings != 0) /* transformation required ? */
143 {
144 /* now reallocate lpFmt */
145 ulStrings += strlen(lpFmtA); /* calculate total string length */
146 pszTemp = lpFmtA; /* save string pointer */
147 pszTemp1 = lpFmtA; /* save string pointer */
148
149 /* @@@PH allocation has to be compatible to FreeAsciiString !!! */
150 lpFmtA = (char *)malloc(ulStrings + 1);
151 if (lpFmtA == NULL) /* check proper allocation */
152 return (0); /* raise error condition */
153
154 for (ulIndex = 0;
155 ulIndex <= ulStrings;
156 ulIndex++,
157 pszTemp++)
158 {
159 if ((pszTemp[0] == '%') &&
160 (pszTemp[1] == 's') )
161 {
162 /* replace %s by %ls */
163 lpFmtA[ulIndex++] = '%';
164 lpFmtA[ulIndex ] = 'l';
165 lpFmtA[ulIndex+1] = 's';
166 }
167 else
168 lpFmtA[ulIndex] = *pszTemp; /* just copy over the character */
169 }
170
171 lpFmtA[ulStrings] = 0; /* string termination */
172
173 FreeAsciiString(pszTemp1); /* the original string is obsolete */
174 }
175 }
176
177 dprintf(("USER32: wsprintfW (%s).\n",
178 lpFmt));
179
180 va_start(argptr,
181 lpFmt);
182
183 rc = O32_wvsprintf(szOut,
184 lpFmtA,
185 argptr);
186
187 AsciiToUnicode(szOut,
188 lpOut);
189
190 FreeAsciiString(lpFmtA);
191 return(rc);
192}
193//******************************************************************************
194//******************************************************************************
195int WIN32API MessageBoxA(HWND hwndOwner, LPCTSTR lpszText, LPCTSTR lpszTitle, UINT fuStyle)
196{
197 dprintf(("USER32: MessageBoxA %s %s\n", lpszText, lpszTitle));
198 return(O32_MessageBox(hwndOwner, lpszText, lpszTitle, fuStyle));
199}
200//******************************************************************************
201//******************************************************************************
202BOOL WIN32API MessageBeep( UINT arg1)
203{
204#ifdef DEBUG
205 WriteLog("USER32: MessageBeep\n");
206#endif
207 return O32_MessageBeep(arg1);
208}
209//******************************************************************************
210//******************************************************************************
211LONG WIN32API SendDlgItemMessageA( HWND arg1, int arg2, UINT arg3, WPARAM arg4, LPARAM arg5)
212{
213#ifdef DEBUG
214 WriteLog("USER32: SendDlgItemMessageA\n");
215#endif
216 return O32_SendDlgItemMessage(arg1, arg2, arg3, arg4, arg5);
217}
218//******************************************************************************
219//******************************************************************************
220VOID WIN32API PostQuitMessage( int arg1)
221{
222 dprintf(("USER32: PostQuitMessage\n"));
223 O32_PostQuitMessage(arg1);
224}
225//******************************************************************************
226// Not implemented by Open32 (31-5-99 Christoph Bratschi)
227//******************************************************************************
228BOOL WIN32API IsDlgButtonChecked( HWND arg1, UINT arg2)
229{
230#ifdef DEBUG
231 WriteLog("USER32: IsDlgButtonChecked\n");
232#endif
233// return O32_IsDlgButtonChecked(arg1, arg2);
234 return (BOOL)SendDlgItemMessageA(arg1,arg2,BM_GETCHECK,0,0);
235}
236//******************************************************************************
237//******************************************************************************
238int WIN32API GetWindowTextLengthA( HWND arg1)
239{
240 dprintf(("USER32: GetWindowTextLength\n"));
241 return O32_GetWindowTextLength(arg1);
242}
243//******************************************************************************
244//******************************************************************************
245int WIN32API GetWindowTextA( HWND arg1, LPSTR arg2, int arg3)
246{
247 dprintf(("USER32: GetWindowTextA\n"));
248 return O32_GetWindowText(arg1, arg2, arg3);
249}
250//******************************************************************************
251
252/*******************************************************************
253 * InternalGetWindowText (USER32.326)
254 */
255int WIN32API InternalGetWindowText(HWND hwnd,
256 LPWSTR lpString,
257 INT nMaxCount )
258{
259 dprintf(("USER32: InternalGetWindowText(%08xh,%08xh,%08xh) not properly implemented.\n",
260 hwnd,
261 lpString,
262 nMaxCount));
263
264 return GetWindowTextW(hwnd,lpString,nMaxCount);
265}
266
267
268//******************************************************************************
269BOOL WIN32API GetWindowRect( HWND arg1, PRECT arg2)
270{
271 BOOL rc;
272
273 rc = O32_GetWindowRect(arg1, arg2);
274 dprintf(("USER32: GetWindowRect %X returned %d\n", arg1, rc));
275 return(rc);
276}
277//******************************************************************************
278//******************************************************************************
279HWND WIN32API GetNextDlgTabItem( HWND arg1, HWND arg2, BOOL arg3)
280{
281 dprintf(("USER32: GetNextDlgTabItem\n"));
282 return O32_GetNextDlgTabItem(arg1, arg2, arg3);
283}
284//******************************************************************************
285//******************************************************************************
286BOOL WIN32API GetMessageA( LPMSG arg1, HWND arg2, UINT arg3, UINT arg4)
287{
288//// dprintf(("USER32: GetMessage\n"));
289 return O32_GetMessage(arg1, arg2, arg3, arg4);
290}
291//******************************************************************************
292//******************************************************************************
293HWND WIN32API GetFocus(void)
294{
295 dprintf(("USER32: GetFocus\n"));
296 return O32_GetFocus();
297}
298//******************************************************************************
299//******************************************************************************
300HWND WIN32API GetDlgItem(HWND arg1, int arg2)
301{
302 HWND rc;
303
304 rc = O32_GetDlgItem(arg1, arg2);
305 dprintf(("USER32: GetDlgItem %d returned %d\n", arg2, rc));
306 return(rc);
307}
308//******************************************************************************
309//******************************************************************************
310int WIN32API GetDlgCtrlID( HWND arg1)
311{
312 dprintf(("USER32: GetDlgCtrlID\n"));
313 return O32_GetDlgCtrlID(arg1);
314}
315//******************************************************************************
316//******************************************************************************
317HWND WIN32API GetDesktopWindow(void)
318{
319 dprintf(("USER32: GetDesktopWindow\n"));
320 return O32_GetDesktopWindow();
321}
322//******************************************************************************
323//******************************************************************************
324BOOL WIN32API EnumThreadWindows(DWORD dwThreadId, WNDENUMPROC lpfn, LPARAM lParam)
325{
326 BOOL rc;
327 EnumWindowCallback *callback = new EnumWindowCallback(lpfn, lParam);
328
329 dprintf(("USER32: EnumThreadWindows\n"));
330 rc = O32_EnumThreadWindows(dwThreadId, callback->GetOS2Callback(), (LPARAM)callback);
331 if(callback)
332 delete callback;
333 return(rc);
334}
335//******************************************************************************
336//******************************************************************************
337BOOL WIN32API EndDialog( HWND arg1, int arg2)
338{
339 BOOL rc;
340
341 dprintf(("USER32: EndDialog\n"));
342 rc = O32_EndDialog(arg1, arg2);
343 return(rc);
344}
345//******************************************************************************
346//******************************************************************************
347LONG WIN32API DispatchMessageA( const MSG * arg1)
348{
349//// dprintf(("USER32: DispatchMessage\n"));
350 return O32_DispatchMessage(arg1);
351}
352//******************************************************************************
353//******************************************************************************
354BOOL WIN32API OffsetRect( PRECT arg1, int arg2, int arg3)
355{
356#ifdef DEBUG
357//// WriteLog("USER32: OffsetRect\n");
358#endif
359 return O32_OffsetRect(arg1, arg2, arg3);
360}
361//******************************************************************************
362//******************************************************************************
363BOOL WIN32API CopyRect( PRECT arg1, const RECT * arg2)
364{
365// ddprintf(("USER32: CopyRect\n"));
366 return O32_CopyRect(arg1, arg2);
367}
368//******************************************************************************
369// Not implemented by Open32 (5-31-99 Christoph Bratschi)
370//******************************************************************************
371BOOL WIN32API CheckDlgButton( HWND arg1, int arg2, UINT arg3)
372{
373#ifdef DEBUG
374 WriteLog("USER32: CheckDlgButton\n");
375#endif
376// return O32_CheckDlgButton(arg1, arg2, arg3);
377 return (BOOL)SendDlgItemMessageA(arg1,arg2,BM_SETCHECK,arg3,0);
378}
379//******************************************************************************
380//******************************************************************************
381HWND WIN32API SetFocus( HWND arg1)
382{
383 dprintf(("USER32: SetFocus\n"));
384 return O32_SetFocus(arg1);
385}
386//******************************************************************************
387//******************************************************************************
388BOOL WIN32API TranslateMessage( const MSG * arg1)
389{
390#ifdef DEBUG
391//// WriteLog("USER32: TranslateMessage\n");
392#endif
393 return O32_TranslateMessage(arg1);
394}
395//******************************************************************************
396//******************************************************************************
397BOOL WIN32API SetWindowPos( HWND arg1, HWND arg2, int arg3, int arg4, int arg5, int arg6, UINT arg7)
398{
399#ifdef DEBUG
400 WriteLog("USER32: SetWindowPos\n");
401#endif
402 return O32_SetWindowPos(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
403}
404//******************************************************************************
405//******************************************************************************
406BOOL WIN32API ShowWindow(HWND arg1, int arg2)
407{
408#ifdef DEBUG
409 WriteLog("USER32: ShowWindow %X %d\n", arg1, arg2);
410#endif
411 return O32_ShowWindow(arg1, arg2);
412}
413//******************************************************************************
414//******************************************************************************
415BOOL WIN32API SetWindowTextA(HWND arg1, LPCSTR arg2)
416{
417#ifdef DEBUG
418 WriteLog("USER32: SetWindowText %s\n", arg2);
419#endif
420 return O32_SetWindowText(arg1, arg2);
421}
422//******************************************************************************
423//******************************************************************************
424BOOL WIN32API SetForegroundWindow(HWND arg1)
425{
426#ifdef DEBUG
427 WriteLog("USER32: SetForegroundWindow\n");
428#endif
429 return O32_SetForegroundWindow(arg1);
430}
431//******************************************************************************
432//******************************************************************************
433int WIN32API ReleaseDC( HWND arg1, HDC arg2)
434{
435#ifdef DEBUG
436 WriteLog("USER32: ReleaseDC\n");
437#endif
438 return O32_ReleaseDC(arg1, arg2);
439}
440//******************************************************************************
441//******************************************************************************
442BOOL WIN32API InvalidateRect(HWND arg1, const RECT *arg2, BOOL arg3)
443{
444#ifdef DEBUG
445 if(arg2)
446 WriteLog("USER32: InvalidateRect for window %X (%d,%d)(%d,%d) %d\n", arg1, arg2->left, arg2->top, arg2->right, arg2->bottom, arg3);
447 else WriteLog("USER32: InvalidateRect for window %X NULL, %d\n", arg1, arg3);
448#endif
449 return O32_InvalidateRect(arg1, arg2, arg3);
450}
451//******************************************************************************
452//******************************************************************************
453BOOL WIN32API GetUpdateRect( HWND arg1, PRECT arg2, BOOL arg3)
454{
455#ifdef DEBUG
456 WriteLog("USER32: GetUpdateRect\n");
457#endif
458 return O32_GetUpdateRect(arg1, arg2, arg3);
459}
460//******************************************************************************
461//******************************************************************************
462HDC WIN32API GetDC( HWND arg1)
463{
464 HDC hdc;
465
466 hdc = O32_GetDC(arg1);
467#ifdef DEBUG
468 WriteLog("USER32: GetDC of %X returns %X\n", arg1, hdc);
469#endif
470 return(hdc);
471}
472//******************************************************************************
473//******************************************************************************
474HDC WIN32API GetDCEx(HWND arg1, HRGN arg2, DWORD arg3)
475{
476#ifdef DEBUG
477 WriteLog("USER32: GetDCEx\n");
478#endif
479 return O32_GetDCEx(arg1, arg2, arg3);
480}
481//******************************************************************************
482//******************************************************************************
483BOOL WIN32API GetClientRect( HWND arg1, PRECT arg2)
484{
485#ifdef DEBUG
486 WriteLog("USER32: GetClientRect of %X\n", arg1);
487#endif
488
489 return O32_GetClientRect(arg1, arg2);
490}
491//******************************************************************************
492//******************************************************************************
493HWND WIN32API FindWindowA(LPCSTR arg1, LPCSTR arg2)
494{
495#ifdef DEBUG
496 WriteLog("USER32: FindWindow\n");
497#endif
498 return O32_FindWindow(arg1, arg2);
499}
500//******************************************************************************
501//******************************************************************************
502HWND WIN32API FindWindowExA(HWND arg1, HWND arg2, LPCSTR arg3, LPCSTR arg4)
503{
504#ifdef DEBUG
505 WriteLog("USER32: FindWindowExA, not completely implemented\n");
506#endif
507 return O32_FindWindow(arg3, arg4);
508}
509//******************************************************************************
510//******************************************************************************
511BOOL WIN32API FlashWindow( HWND arg1, BOOL arg2)
512{
513#ifdef DEBUG
514 WriteLog("USER32: FlashWindow\n");
515#endif
516 return O32_FlashWindow(arg1, arg2);
517}
518//******************************************************************************
519//******************************************************************************
520BOOL WIN32API EndPaint( HWND arg1, const PAINTSTRUCT * arg2)
521{
522#ifdef DEBUG
523 WriteLog("USER32: EndPaint\n");
524#endif
525 return O32_EndPaint(arg1, arg2);
526}
527//******************************************************************************
528//******************************************************************************
529BOOL WIN32API MoveWindow(HWND arg1, int arg2, int arg3, int arg4, int arg5, BOOL arg6)
530{
531 BOOL rc;
532
533 rc = O32_MoveWindow(arg1, arg2, arg3, arg4, arg5, arg6);
534 dprintf(("USER32: MoveWindow %X to (%d,%d) size (%d,%d), repaint = %d returned %d\n", arg1, arg2, arg3, arg4, arg5, arg6, rc));
535 return(rc);
536}
537//******************************************************************************
538//******************************************************************************
539HWND WIN32API CreateWindowExA(DWORD dwExStyle,
540 LPCSTR arg2,
541 LPCSTR arg3,
542 DWORD dwStyle,
543 int x,
544 int y,
545 int nWidth,
546 int nHeight,
547 HWND parent,
548 HMENU arg10,
549 HINSTANCE arg11,
550 PVOID arg12)
551{
552 HWND hwnd;
553 Win32WindowProc *window = NULL;
554
555 /* @@@PH 98/06/12 CreateWindow crashes somewhere in Open32 */
556 if(arg3 == NULL)
557 arg3 = (LPCSTR)"CRASH, CRASH";
558
559 // 6-12-99 CB: WS_CLIPCHILDREN not set -> controls not redrawn
560 // Problems with group boxes
561
562 //SvL: Correct window style (like Wine does) instead
563 if(dwStyle & WS_CHILD) {
564 dwStyle |= WS_CLIPSIBLINGS;
565 if(!(dwStyle & WS_POPUP)) {
566 dwStyle |= WS_CAPTION;
567 }
568 }
569 if(dwExStyle & WS_EX_DLGMODALFRAME)
570 {
571 dwStyle &= ~WS_THICKFRAME;
572 }
573
574#ifdef DEBUG
575 WriteLog("USER32: CreateWindow: dwExStyle = %X\n", dwExStyle);
576 if((int)arg2 >> 16 != 0)
577 WriteLog("USER32: CreateWindow: classname = %s\n", arg2);
578 else WriteLog("USER32: CreateWindow: classname = %X\n", arg2);
579 WriteLog("USER32: CreateWindow: windowname= %s\n", arg3);
580 WriteLog("USER32: CreateWindow: dwStyle = %X\n", dwStyle);
581 WriteLog("USER32: CreateWindow: x = %d\n", x);
582 WriteLog("USER32: CreateWindow: y = %d\n", y);
583 WriteLog("USER32: CreateWindow: nWidth = %d\n", nWidth);
584 WriteLog("USER32: CreateWindow: nHeight = %d\n", nHeight);
585 WriteLog("USER32: CreateWindow: parent = %X\n", parent);
586 WriteLog("USER32: CreateWindow: hwmenu = %X\n", arg10);
587 WriteLog("USER32: CreateWindow: hinstance = %X\n", arg11);
588 WriteLog("USER32: CreateWindow: param = %X\n", arg12);
589 #endif
590
591 if((int) arg2 >> 16 != 0 && strcmp(arg2, "COMBOBOX") == 0)
592 {
593 dprintf(("COMBOBOX creation"));
594 //TODO: #%@#%$ Open32 doesn't support this
595 dwStyle &= ~(CBS_OWNERDRAWFIXED | CBS_OWNERDRAWVARIABLE);
596
597 /* @@@PH 98/06/12 drop down combos are problematic too */
598 /* so we translate the styles to OS/2 style */
599 dwStyle |= CBS_DROPDOWN | CBS_DROPDOWNLIST;
600 }
601
602 //Classname might be name of system class, in which case we don't
603 //need to use our own callback
604// if(Win32WindowClass::FindClass((LPSTR)arg2) != NULL) {
605 window = new Win32WindowProc(arg11, arg2);
606// }
607
608 hwnd = O32_CreateWindowEx(dwExStyle,
609 arg2,
610 arg3,
611 dwStyle,
612 x,
613 y,
614 nWidth,
615 nHeight,
616 parent,
617 arg10,
618 arg11,
619 arg12);
620
621 //SvL: 16-11-'97: window can be already destroyed if hwnd == 0
622 if(hwnd == 0 && window != 0 && Win32WindowProc::FindWindowProc(window)) {
623 delete(window);
624 window = 0;
625 }
626 if(window) {
627 window->SetWindowHandle(hwnd);
628 }
629 //SvL: Taken from Wine
630 if(dwStyle & WS_CHILD && !(dwExStyle & WS_EX_NOPARENTNOTIFY) )
631 {
632 /* Notify the parent window only */
633 SendMessageA(parent, WM_PARENTNOTIFY, MAKEWPARAM(WM_CREATE, 0), (LPARAM)hwnd );
634 }
635
636 dprintf(("USER32: ************CreateWindowExA %s (%d,%d,%d,%d), hwnd = %X\n", arg2, x, y, nWidth, nHeight, hwnd));
637 return(hwnd);
638}
639//******************************************************************************
640//******************************************************************************
641LRESULT WIN32API SendMessageA(HWND arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
642{
643 LRESULT rc;
644
645#ifdef DEBUG
646 WriteLog("USER32: SendMessage....\n");
647#endif
648 rc = O32_SendMessage(arg1, arg2, arg3, arg4);
649#ifdef DEBUG
650 WriteLog("USER32: *****SendMessage %X %X %X %X returned %d\n", arg1, arg2, arg3, arg4, rc);
651#endif
652 return(rc);
653}
654//******************************************************************************
655//******************************************************************************
656HWND WIN32API SetActiveWindow( HWND arg1)
657{
658#ifdef DEBUG
659 WriteLog("USER32: SetActiveWindow\n");
660#endif
661 return O32_SetActiveWindow(arg1);
662}
663//******************************************************************************
664//******************************************************************************
665HDC WIN32API BeginPaint(HWND arg1, PPAINTSTRUCT arg2)
666{
667 dprintf(("USER32: BeginPaint %X\n", arg2));
668 return O32_BeginPaint(arg1, arg2);
669}
670//******************************************************************************
671//******************************************************************************
672BOOL WIN32API IsDialogMessageA( HWND arg1, LPMSG arg2)
673{
674#ifdef DEBUG
675//// WriteLog("USER32: IsDialogMessage\n");
676#endif
677 return O32_IsDialogMessage(arg1, arg2);
678}
679//******************************************************************************
680//******************************************************************************
681int WIN32API DrawTextA(HDC arg1, LPCSTR arg2, int arg3, PRECT arg4, UINT arg5)
682{
683#ifdef DEBUG
684 WriteLog("USER32: DrawTextA %s", arg2);
685#endif
686 return O32_DrawText(arg1, arg2, arg3, arg4, arg5);
687}
688//******************************************************************************
689//******************************************************************************
690int WIN32API DrawTextExA(HDC arg1, LPCSTR arg2, int arg3, PRECT arg4, UINT arg5, LPDRAWTEXTPARAMS lpDTParams)
691{
692#ifdef DEBUG
693 WriteLog("USER32: DrawTextExA (not completely implemented) %s", arg2);
694#endif
695 return O32_DrawText(arg1, arg2, arg3, arg4, arg5);
696}
697//******************************************************************************
698//******************************************************************************
699int WIN32API GetSystemMetrics(int arg1)
700{
701 int rc;
702
703 switch(arg1) {
704 case SM_CXICONSPACING: //TODO: size of grid cell for large icons
705 rc = O32_GetSystemMetrics(SM_CXICON);
706 break;
707 case SM_CYICONSPACING:
708 rc = O32_GetSystemMetrics(SM_CYICON);
709 break;
710 case SM_PENWINDOWS:
711 rc = FALSE;
712 break;
713 case SM_DBCSENABLED:
714 rc = FALSE;
715 break;
716 case SM_CXEDGE: //size of 3D window edge (not supported)
717 rc = 1;
718 break;
719 case SM_CYEDGE:
720 rc = 1;
721 break;
722 case SM_CXMINSPACING: //can be SM_CXMINIMIZED or larger
723 rc = O32_GetSystemMetrics(SM_CXMINIMIZED);
724 break;
725 case SM_CYMINSPACING:
726 rc = GetSystemMetrics(SM_CYMINIMIZED);
727 break;
728 case SM_CXSMICON: //recommended size of small icons (TODO: adjust to screen res.)
729 rc = 16;
730 break;
731 case SM_CYSMICON:
732 rc = 16;
733 break;
734 case SM_CYSMCAPTION: //size in pixels of a small caption (TODO: ????)
735 rc = 8;
736 break;
737 case SM_CXSMSIZE: //size of small caption buttons (pixels) (TODO: implement properly)
738 rc = 16;
739 break;
740 case SM_CYSMSIZE:
741 rc = 16;
742 break;
743 case SM_CXMENUSIZE: //TODO: size of menu bar buttons (such as MDI window close)
744 rc = 16;
745 break;
746 case SM_CYMENUSIZE:
747 rc = 16;
748 break;
749 case SM_ARRANGE:
750 rc = ARW_BOTTOMLEFT | ARW_LEFT;
751 break;
752 case SM_CXMINIMIZED:
753 break;
754 case SM_CYMINIMIZED:
755 break;
756 case SM_CXMAXTRACK: //max window size
757 case SM_CXMAXIMIZED: //max toplevel window size
758 rc = O32_GetSystemMetrics(SM_CXSCREEN);
759 break;
760 case SM_CYMAXTRACK:
761 case SM_CYMAXIMIZED:
762 rc = O32_GetSystemMetrics(SM_CYSCREEN);
763 break;
764 case SM_NETWORK:
765 rc = 0x01; //TODO: default = yes
766 break;
767 case SM_CLEANBOOT:
768 rc = 0; //normal boot
769 break;
770 case SM_CXDRAG: //nr of pixels before drag becomes a real one
771 rc = 2;
772 break;
773 case SM_CYDRAG:
774 rc = 2;
775 break;
776 case SM_SHOWSOUNDS: //show instead of play sound
777 rc = FALSE;
778 break;
779 case SM_CXMENUCHECK:
780 rc = 4; //TODO
781 break;
782 case SM_CYMENUCHECK:
783 rc = O32_GetSystemMetrics(SM_CYMENU);
784 break;
785 case SM_SLOWMACHINE:
786 rc = FALSE; //even a slow machine is fast with OS/2 :)
787 break;
788 case SM_MIDEASTENABLED:
789 rc = FALSE;
790 break;
791 case SM_CMETRICS:
792 rc = O32_GetSystemMetrics(44); //Open32 changed this one
793 break;
794 default:
795 rc = O32_GetSystemMetrics(arg1);
796 break;
797 }
798#ifdef DEBUG
799 WriteLog("USER32: GetSystemMetrics %d returned %d\n", arg1, rc);
800#endif
801 return(rc);
802}
803//******************************************************************************
804//******************************************************************************
805UINT WIN32API SetTimer( HWND arg1, UINT arg2, UINT arg3, TIMERPROC arg4)
806{
807#ifdef DEBUG
808 WriteLog("USER32: SetTimer INCORRECT CALLING CONVENTION FOR HANDLER!!!!!\n");
809#endif
810 //SvL: Write callback handler class for this one
811 return O32_SetTimer(arg1, arg2, arg3, (TIMERPROC_O32)arg4);
812}
813//******************************************************************************
814//******************************************************************************
815BOOL WIN32API KillTimer(HWND arg1, UINT arg2)
816{
817#ifdef DEBUG
818 WriteLog("USER32: KillTimer\n");
819#endif
820 return O32_KillTimer(arg1, arg2);
821}
822//******************************************************************************
823//******************************************************************************
824BOOL WIN32API DestroyWindow(HWND arg1)
825{
826#ifdef DEBUG
827 WriteLog("USER32: DestroyWindow\n");
828#endif
829 return O32_DestroyWindow(arg1);
830}
831//******************************************************************************
832//******************************************************************************
833BOOL WIN32API PostMessageA( HWND arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
834{
835#ifdef DEBUG
836 WriteLog("USER32: PostMessageA %X %X %X %X\n", arg1, arg2, arg3, arg4);
837#endif
838 return O32_PostMessage(arg1, arg2, arg3, arg4);
839}
840//******************************************************************************
841//******************************************************************************
842BOOL WIN32API InflateRect( PRECT arg1, int arg2, int arg3)
843{
844#ifdef DEBUG
845 WriteLog("USER32: InflateRect\n");
846#endif
847 return O32_InflateRect(arg1, arg2, arg3);
848}
849//******************************************************************************
850//TODO:How can we emulate this one in OS/2???
851//******************************************************************************
852DWORD WIN32API WaitForInputIdle(HANDLE hProcess, DWORD dwTimeOut)
853{
854#ifdef DEBUG
855 WriteLog("USER32: WaitForInputIdle (Not Implemented) %d\n", dwTimeOut);
856#endif
857
858 if(dwTimeOut == INFINITE) return(0);
859
860// DosSleep(dwTimeOut/16);
861 return(0);
862}
863//******************************************************************************
864//******************************************************************************
865UINT WIN32API GetDlgItemTextA(HWND arg1, int arg2, LPSTR arg3, UINT arg4)
866{
867 UINT rc;
868
869 rc = O32_GetDlgItemText(arg1, arg2, arg3, arg4);
870#ifdef DEBUG
871 if(rc)
872 WriteLog("USER32: GetDlgItemTextA returned %s\n", arg3);
873 else WriteLog("USER32: GetDlgItemTextA returned 0 (%d)\n", GetLastError());
874#endif
875 return(rc);
876}
877//******************************************************************************
878//******************************************************************************
879BOOL WIN32API PeekMessageA(LPMSG arg1, HWND arg2, UINT arg3, UINT arg4, UINT arg5)
880{
881#ifdef DEBUG
882// WriteLog("USER32: PeekMessage\n");
883#endif
884 return O32_PeekMessage(arg1, arg2, arg3, arg4, arg5);
885}
886//******************************************************************************
887//******************************************************************************
888int WIN32API ShowCursor( BOOL arg1)
889{
890#ifdef DEBUG
891 WriteLog("USER32: ShowCursor\n");
892#endif
893 return O32_ShowCursor(arg1);
894}
895//******************************************************************************
896//BUGBUG: UpdateWindow sends a WM_ERASEBKGRND when it shouldn't!
897// So we just do it manually
898//******************************************************************************
899BOOL WIN32API UpdateWindow(HWND hwnd)
900{
901 RECT rect;
902
903#ifdef DEBUG
904 WriteLog("USER32: UpdateWindow\n");
905#endif
906 if(O32_GetUpdateRect(hwnd, &rect, FALSE) != FALSE) {//update region empty?
907 WndCallback(hwnd, WM_PAINT, 0, 0);
908// O32_PostMessage(hwnd, WM_PAINT, 0, 0);
909 }
910#ifdef DEBUG
911 else WriteLog("USER32: Update region empty!\n");
912#endif
913 return(TRUE);
914}
915//******************************************************************************
916//******************************************************************************
917BOOL WIN32API AdjustWindowRect( PRECT arg1, DWORD arg2, BOOL arg3)
918{
919#ifdef DEBUG
920 WriteLog("USER32: AdjustWindowRect\n");
921#endif
922 return O32_AdjustWindowRect(arg1, arg2, arg3);
923}
924//******************************************************************************
925//******************************************************************************
926BOOL WIN32API AdjustWindowRectEx( PRECT arg1, DWORD arg2, BOOL arg3, DWORD arg4)
927{
928#ifdef DEBUG
929 WriteLog("USER32: AdjustWindowRectEx\n");
930#endif
931 return O32_AdjustWindowRectEx(arg1, arg2, arg3, arg4);
932}
933//******************************************************************************
934//******************************************************************************
935BOOL WIN32API ClientToScreen( HWND arg1, PPOINT arg2)
936{
937#ifdef DEBUG
938//// WriteLog("USER32: ClientToScreen\n");
939#endif
940 return O32_ClientToScreen(arg1, arg2);
941}
942//******************************************************************************
943//******************************************************************************
944BOOL WIN32API SetRect( PRECT arg1, int arg2, int arg3, int arg4, int arg5)
945{
946#ifdef DEBUG
947 WriteLog("USER32: SetRect\n");
948#endif
949 return O32_SetRect(arg1, arg2, arg3, arg4, arg5);
950}
951//******************************************************************************
952//******************************************************************************
953LONG WIN32API GetWindowLongA(HWND hwnd, int nIndex)
954{
955 LONG rc;
956
957#ifdef DEBUG
958 WriteLog("USER32: GetWindowLong %X %d\n", hwnd, nIndex);
959#endif
960 if(nIndex == GWL_WNDPROC || nIndex == DWL_DLGPROC) {
961 Win32WindowProc *window = Win32WindowProc::FindProc(hwnd);
962 if(window && !(nIndex == DWL_DLGPROC && window->IsWindow() == TRUE)) {
963 return (LONG)window->GetWin32Callback();
964 }
965 }
966 rc = O32_GetWindowLong(hwnd, nIndex);
967#ifdef DEBUG
968 WriteLog("USER32: GetWindowLong returned %X\n", rc);
969#endif
970 return(rc);
971}
972//******************************************************************************
973//******************************************************************************
974BOOL WIN32API SetDlgItemInt( HWND arg1, int arg2, UINT arg3, BOOL arg4)
975{
976#ifdef DEBUG
977 WriteLog("USER32: SetDlgItemInt\n");
978#endif
979 return O32_SetDlgItemInt(arg1, arg2, arg3, arg4);
980}
981//******************************************************************************
982//******************************************************************************
983BOOL WIN32API SetDlgItemTextA( HWND arg1, int arg2, LPCSTR arg3)
984{
985#ifdef DEBUG
986 WriteLog("USER32: SetDlgItemText to %s\n", arg3);
987#endif
988 return O32_SetDlgItemText(arg1, arg2, arg3);
989}
990//******************************************************************************
991//******************************************************************************
992BOOL WIN32API WinHelpA( HWND arg1, LPCSTR arg2, UINT arg3, DWORD arg4)
993{
994#ifdef DEBUG
995 WriteLog("USER32: WinHelp not implemented %s\n", arg2);
996#endif
997// return O32_WinHelp(arg1, arg2, arg3, arg4);
998 return(TRUE);
999}
1000//******************************************************************************
1001//******************************************************************************
1002BOOL WIN32API IsIconic( HWND arg1)
1003{
1004#ifdef DEBUG
1005 WriteLog("USER32: IsIconic\n");
1006#endif
1007 return O32_IsIconic(arg1);
1008}
1009//******************************************************************************
1010//******************************************************************************
1011int WIN32API TranslateAcceleratorA(HWND arg1, HACCEL arg2, LPMSG arg3)
1012{
1013#ifdef DEBUG
1014//// WriteLog("USER32: TranslateAccelerator\n");
1015#endif
1016 return O32_TranslateAccelerator(arg1, arg2, arg3);
1017}
1018//******************************************************************************
1019//******************************************************************************
1020HWND WIN32API GetWindow(HWND arg1, UINT arg2)
1021{
1022 HWND rc;
1023
1024 rc = O32_GetWindow(arg1, arg2);
1025#ifdef DEBUG
1026 WriteLog("USER32: GetWindow %X %d returned %d\n", arg1, arg2, rc);
1027#endif
1028 return(rc);
1029}
1030//******************************************************************************
1031//******************************************************************************
1032HDC WIN32API GetWindowDC(HWND arg1)
1033{
1034#ifdef DEBUG
1035 WriteLog("USER32: GetWindowDC\n");
1036#endif
1037 return O32_GetWindowDC(arg1);
1038}
1039//******************************************************************************
1040//******************************************************************************
1041BOOL WIN32API SubtractRect( PRECT arg1, const RECT * arg2, const RECT * arg3)
1042{
1043#ifdef DEBUG
1044 WriteLog("USER32: SubtractRect");
1045#endif
1046 return O32_SubtractRect(arg1, arg2, arg3);
1047}
1048//******************************************************************************
1049//SvL: 24-6-'97 - Added
1050//******************************************************************************
1051BOOL WIN32API ClipCursor(const RECT * arg1)
1052{
1053#ifdef DEBUG
1054 WriteLog("USER32: ClipCursor\n");
1055#endif
1056 return O32_ClipCursor(arg1);
1057}
1058//******************************************************************************
1059//SvL: 24-6-'97 - Added
1060//TODO: Not implemented
1061//******************************************************************************
1062WORD WIN32API GetAsyncKeyState(INT nVirtKey)
1063{
1064#ifdef DEBUG
1065//// WriteLog("USER32: GetAsyncKeyState Not implemented\n");
1066#endif
1067 return 0;
1068}
1069//******************************************************************************
1070//SvL: 24-6-'97 - Added
1071//******************************************************************************
1072HCURSOR WIN32API GetCursor(void)
1073{
1074#ifdef DEBUG
1075//// WriteLog("USER32: GetCursor\n");
1076#endif
1077 return O32_GetCursor();
1078}
1079//******************************************************************************
1080//SvL: 24-6-'97 - Added
1081//******************************************************************************
1082BOOL WIN32API GetCursorPos( PPOINT arg1)
1083{
1084#ifdef DEBUG
1085//// WriteLog("USER32: GetCursorPos\n");
1086#endif
1087 return O32_GetCursorPos(arg1);
1088}
1089//******************************************************************************
1090//SvL: 24-6-'97 - Added
1091//******************************************************************************
1092UINT WIN32API RegisterWindowMessageA(LPCSTR arg1)
1093{
1094 UINT rc;
1095
1096 rc = O32_RegisterWindowMessage(arg1);
1097#ifdef DEBUG
1098 WriteLog("USER32: RegisterWindowMessageA %s returned %X\n", arg1, rc);
1099#endif
1100 return(rc);
1101}
1102//******************************************************************************
1103//SvL: 24-6-'97 - Added
1104//******************************************************************************
1105WORD WIN32API VkKeyScanA( char arg1)
1106{
1107#ifdef DEBUG
1108 WriteLog("USER32: VkKeyScanA\n");
1109#endif
1110 return O32_VkKeyScan(arg1);
1111}
1112//******************************************************************************
1113//SvL: 24-6-'97 - Added
1114//******************************************************************************
1115SHORT WIN32API GetKeyState( int arg1)
1116{
1117#ifdef DEBUG
1118 WriteLog("USER32: GetKeyState %d\n", arg1);
1119#endif
1120 return O32_GetKeyState(arg1);
1121}
1122//******************************************************************************
1123//******************************************************************************
1124HCURSOR WIN32API SetCursor( HCURSOR arg1)
1125{
1126#ifdef DEBUG
1127 WriteLog("USER32: SetCursor\n");
1128#endif
1129 return O32_SetCursor(arg1);
1130}
1131//******************************************************************************
1132//******************************************************************************
1133BOOL WIN32API SetCursorPos( int arg1, int arg2)
1134{
1135#ifdef DEBUG
1136 WriteLog("USER32: SetCursorPos\n");
1137#endif
1138 return O32_SetCursorPos(arg1, arg2);
1139}
1140//******************************************************************************
1141//******************************************************************************
1142BOOL WIN32API EnableScrollBar( HWND arg1, INT arg2, UINT arg3)
1143{
1144#ifdef DEBUG
1145 WriteLog("USER32: EnableScrollBar\n");
1146#endif
1147 return O32_EnableScrollBar(arg1, arg2, arg3);
1148}
1149//******************************************************************************
1150//******************************************************************************
1151BOOL WIN32API EnableWindow( HWND arg1, BOOL arg2)
1152{
1153#ifdef DEBUG
1154 WriteLog("USER32: EnableWindow\n");
1155#endif
1156 return O32_EnableWindow(arg1, arg2);
1157}
1158//******************************************************************************
1159//******************************************************************************
1160HWND WIN32API SetCapture( HWND arg1)
1161{
1162#ifdef DEBUG
1163 WriteLog("USER32: SetCapture\n");
1164#endif
1165 return O32_SetCapture(arg1);
1166}
1167//******************************************************************************
1168//******************************************************************************
1169BOOL WIN32API ReleaseCapture(void)
1170{
1171#ifdef DEBUG
1172 WriteLog("USER32: ReleaseCapture\n");
1173#endif
1174 return O32_ReleaseCapture();
1175}
1176//******************************************************************************
1177//******************************************************************************
1178DWORD WIN32API MsgWaitForMultipleObjects( DWORD arg1, LPHANDLE arg2, BOOL arg3, DWORD arg4, DWORD arg5)
1179{
1180#ifdef DEBUG
1181 WriteLog("USER32: MsgWaitForMultipleObjects\n");
1182#endif
1183 return O32_MsgWaitForMultipleObjects(arg1, arg2, arg3, arg4, arg5);
1184}
1185//******************************************************************************
1186//******************************************************************************
1187HDWP WIN32API BeginDeferWindowPos( int arg1)
1188{
1189#ifdef DEBUG
1190 WriteLog("USER32: BeginDeferWindowPos\n");
1191#endif
1192 return O32_BeginDeferWindowPos(arg1);
1193}
1194//******************************************************************************
1195//******************************************************************************
1196BOOL WIN32API BringWindowToTop( HWND arg1)
1197{
1198#ifdef DEBUG
1199 WriteLog("USER32: BringWindowToTop\n");
1200#endif
1201 return O32_BringWindowToTop(arg1);
1202}
1203//******************************************************************************
1204//******************************************************************************
1205BOOL WIN32API CallMsgFilterA( LPMSG arg1, int arg2)
1206{
1207#ifdef DEBUG
1208 WriteLog("USER32: CallMsgFilterA\n");
1209#endif
1210 return O32_CallMsgFilter(arg1, arg2);
1211}
1212//******************************************************************************
1213//******************************************************************************
1214BOOL WIN32API CallMsgFilterW( LPMSG arg1, int arg2)
1215{
1216#ifdef DEBUG
1217 WriteLog("USER32: CallMsgFilterW\n");
1218#endif
1219 // NOTE: This will not work as is (needs UNICODE support)
1220 return O32_CallMsgFilter(arg1, arg2);
1221}
1222//******************************************************************************
1223//******************************************************************************
1224LRESULT WIN32API CallWindowProcA(WNDPROC wndprcPrev,
1225 HWND arg2,
1226 UINT arg3,
1227 WPARAM arg4,
1228 LPARAM arg5)
1229{
1230#ifdef DEBUG
1231//// WriteLog("USER32: CallWindowProcA %X hwnd=%X, msg = %X\n", wndprcPrev, arg2, arg3);
1232#endif
1233
1234 if(Win32WindowSubProc::FindSubProc((WNDPROC_O32)wndprcPrev) != NULL) {
1235 WNDPROC_O32 orgprc = (WNDPROC_O32)wndprcPrev; //is original Open32 system class callback (_System)
1236 return orgprc(arg2, arg3, arg4, arg5);
1237 }
1238 else return wndprcPrev(arg2, arg3, arg4, arg5); //win32 callback (__stdcall)
1239}
1240//******************************************************************************
1241//******************************************************************************
1242LRESULT WIN32API CallWindowProcW(WNDPROC arg1,
1243 HWND arg2,
1244 UINT arg3,
1245 WPARAM arg4,
1246 LPARAM arg5)
1247{
1248 dprintf(("USER32: CallWindowProcW(%08xh,%08xh,%08xh,%08xh,%08xh) not properly implemented.\n",
1249 arg1,
1250 arg2,
1251 arg3,
1252 arg4,
1253 arg5));
1254
1255 return CallWindowProcA(arg1,
1256 arg2,
1257 arg3,
1258 arg4,
1259 arg5);
1260}
1261//******************************************************************************
1262//******************************************************************************
1263BOOL WIN32API ChangeClipboardChain( HWND arg1, HWND arg2)
1264{
1265#ifdef DEBUG
1266 WriteLog("USER32: ChangeClipboardChain\n");
1267#endif
1268 return O32_ChangeClipboardChain(arg1, arg2);
1269}
1270//******************************************************************************
1271//******************************************************************************
1272UINT WIN32API ArrangeIconicWindows( HWND arg1)
1273{
1274#ifdef DEBUG
1275 WriteLog("USER32: ArrangeIconicWindows\n");
1276#endif
1277 return O32_ArrangeIconicWindows(arg1);
1278}
1279//******************************************************************************
1280// Not implemented by Open32 (5-31-99 Christoph Bratschi)
1281//******************************************************************************
1282BOOL WIN32API CheckRadioButton( HWND arg1, UINT arg2, UINT arg3, UINT arg4)
1283{
1284#ifdef DEBUG
1285 WriteLog("USER32: CheckRadioButton\n");
1286#endif
1287// return O32_CheckRadioButton(arg1, arg2, arg3, arg4);
1288 if (arg2 > arg3) return (FALSE);
1289 for (UINT x=arg2;x <= arg3;x++)
1290 {
1291 SendDlgItemMessageA(arg1,x,BM_SETCHECK,(x == arg4) ? BST_CHECKED : BST_UNCHECKED,0);
1292 }
1293 return (TRUE);
1294}
1295//******************************************************************************
1296//******************************************************************************
1297HWND WIN32API ChildWindowFromPoint( HWND arg1, POINT arg2)
1298{
1299#ifdef DEBUG
1300 WriteLog("USER32: ChildWindowFromPoint\n");
1301#endif
1302 return O32_ChildWindowFromPoint(arg1, arg2);
1303}
1304//******************************************************************************
1305//******************************************************************************
1306HWND WIN32API ChildWindowFromPointEx(HWND arg1, POINT arg2, UINT uFlags)
1307{
1308#ifdef DEBUG
1309 WriteLog("USER32: ChildWindowFromPointEx, not completely supported!\n");
1310#endif
1311 return O32_ChildWindowFromPoint(arg1, arg2);
1312}
1313//******************************************************************************
1314//******************************************************************************
1315BOOL WIN32API CloseClipboard(void)
1316{
1317#ifdef DEBUG
1318 WriteLog("USER32: CloseClipboard\n");
1319#endif
1320 return O32_CloseClipboard();
1321}
1322//******************************************************************************
1323//******************************************************************************
1324BOOL WIN32API CloseWindow( HWND arg1)
1325{
1326#ifdef DEBUG
1327 WriteLog("USER32: CloseWindow\n");
1328#endif
1329 return O32_CloseWindow(arg1);
1330}
1331//******************************************************************************
1332//******************************************************************************
1333HICON WIN32API CopyIcon( HICON arg1)
1334{
1335#ifdef DEBUG
1336 WriteLog("USER32: CopyIcon\n");
1337#endif
1338 return O32_CopyIcon(arg1);
1339}
1340//******************************************************************************
1341//******************************************************************************
1342int WIN32API CountClipboardFormats(void)
1343{
1344#ifdef DEBUG
1345 WriteLog("USER32: CountClipboardFormats\n");
1346#endif
1347 return O32_CountClipboardFormats();
1348}
1349//******************************************************************************
1350//******************************************************************************
1351HACCEL WIN32API CreateAcceleratorTableA( LPACCEL arg1, int arg2)
1352{
1353#ifdef DEBUG
1354 WriteLog("USER32: CreateAcceleratorTableA\n");
1355#endif
1356 return O32_CreateAcceleratorTable(arg1, arg2);
1357}
1358//******************************************************************************
1359//******************************************************************************
1360HACCEL WIN32API CreateAcceleratorTableW( LPACCEL arg1, int arg2)
1361{
1362#ifdef DEBUG
1363 WriteLog("USER32: CreateAcceleratorTableW\n");
1364#endif
1365 // NOTE: This will not work as is (needs UNICODE support)
1366 return O32_CreateAcceleratorTable(arg1, arg2);
1367}
1368//******************************************************************************
1369//******************************************************************************
1370BOOL WIN32API CreateCaret( HWND arg1, HBITMAP arg2, int arg3, int arg4)
1371{
1372#ifdef DEBUG
1373 WriteLog("USER32: CreateCaret\n");
1374#endif
1375 return O32_CreateCaret(arg1, arg2, arg3, arg4);
1376}
1377//******************************************************************************
1378//******************************************************************************
1379HCURSOR WIN32API CreateCursor( HINSTANCE arg1, int arg2, int arg3, int arg4, int arg5, const VOID * arg6, const VOID * arg7)
1380{
1381#ifdef DEBUG
1382 WriteLog("USER32: CreateCursor\n");
1383#endif
1384 return O32_CreateCursor(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
1385}
1386//******************************************************************************
1387//******************************************************************************
1388HICON WIN32API CreateIcon( HINSTANCE arg1, INT arg2, INT arg3, BYTE arg4, BYTE arg5, LPCVOID arg6, LPCVOID arg7)
1389{
1390#ifdef DEBUG
1391 WriteLog("USER32: CreateIcon\n");
1392#endif
1393 return O32_CreateIcon(arg1, arg2, arg3, arg4, arg5, (const BYTE *)arg6, (const BYTE *)arg7);
1394}
1395//******************************************************************************
1396//ASSERT dwVer == win31 (ok according to SDK docs)
1397//******************************************************************************
1398HICON WIN32API CreateIconFromResource(PBYTE presbits, UINT dwResSize,
1399 BOOL fIcon, DWORD dwVer)
1400{
1401 HICON hicon;
1402 DWORD OS2ResSize = 0;
1403 PBYTE OS2Icon = ConvertWin32Icon(presbits, dwResSize, &OS2ResSize);
1404
1405 hicon = O32_CreateIconFromResource(OS2Icon, OS2ResSize, fIcon, dwVer);
1406#ifdef DEBUG
1407 WriteLog("USER32: CreateIconFromResource returned %X (%X)\n", hicon, GetLastError());
1408#endif
1409 if(OS2Icon)
1410 FreeIcon(OS2Icon);
1411
1412 return(hicon);
1413}
1414//******************************************************************************
1415//******************************************************************************
1416HICON WIN32API CreateIconFromResourceEx(PBYTE presbits, UINT dwResSize,
1417 BOOL fIcon, DWORD dwVer,
1418 int cxDesired, int cyDesired,
1419 UINT Flags)
1420{
1421#ifdef DEBUG
1422 WriteLog("USER32: CreateIconFromResourceEx %X %d %d %X %d %d %X, not completely supported!\n", presbits, dwResSize, fIcon, dwVer, cxDesired, cyDesired, Flags);
1423#endif
1424 return CreateIconFromResource(presbits, dwResSize, fIcon, dwVer);
1425}
1426//******************************************************************************
1427//******************************************************************************
1428HICON WIN32API CreateIconIndirect(LPICONINFO arg1)
1429{
1430#ifdef DEBUG
1431 WriteLog("USER32: CreateIconIndirect\n");
1432#endif
1433 return O32_CreateIconIndirect(arg1);
1434}
1435//******************************************************************************
1436//******************************************************************************
1437HWND WIN32API CreateMDIWindowA(LPCSTR arg1, LPCSTR arg2, DWORD arg3,
1438 int arg4, int arg5, int arg6, int arg7,
1439 HWND arg8, HINSTANCE arg9, LPARAM arg10)
1440{
1441 HWND hwnd;
1442
1443#ifdef DEBUG
1444 WriteLog("USER32: CreateMDIWindowA\n");
1445#endif
1446 Win32WindowProc *window = new Win32WindowProc(arg9, arg1);
1447 hwnd = O32_CreateMDIWindow((LPSTR)arg1, (LPSTR)arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
1448 //SvL: 16-11-'97: window can be already destroyed if hwnd == 0
1449 if(hwnd == 0 && window != 0 && Win32WindowProc::FindWindowProc(window)) {
1450 delete(window);
1451 window = 0;
1452 }
1453
1454#ifdef DEBUG
1455 WriteLog("USER32: CreateMDIWindowA returned %X\n", hwnd);
1456#endif
1457 return hwnd;
1458}
1459//******************************************************************************
1460//******************************************************************************
1461HWND WIN32API CreateMDIWindowW(LPCWSTR arg1, LPCWSTR arg2, DWORD arg3, int arg4,
1462 int arg5, int arg6, int arg7, HWND arg8, HINSTANCE arg9,
1463 LPARAM arg10)
1464{
1465 HWND hwnd;
1466 char *astring1 = NULL, *astring2 = NULL;
1467 Win32WindowProc *window = NULL;
1468
1469 if((int)arg1 >> 16 != 0) {
1470 astring1 = UnicodeToAsciiString((LPWSTR)arg1);
1471 }
1472 else astring1 = (char *)arg2;
1473
1474 astring2 = UnicodeToAsciiString((LPWSTR)arg2);
1475
1476 //Classname might be name of system class, in which case we don't
1477 //need to use our own callback
1478// if(Win32WindowClass::FindClass((LPSTR)astring1) != NULL) {
1479 window = new Win32WindowProc(arg9, astring1);
1480// }
1481 hwnd = O32_CreateMDIWindow(astring1, astring2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
1482 //SvL: 16-11-'97: window can be already destroyed if hwnd == 0
1483 if(hwnd == 0 && window != 0 && Win32WindowProc::FindWindowProc(window)) {
1484 delete(window);
1485 window = 0;
1486 }
1487 if(window) {
1488 window->SetWindowHandle(hwnd);
1489 }
1490
1491 if(astring1) FreeAsciiString(astring1);
1492 FreeAsciiString(astring2);
1493#ifdef DEBUG
1494 WriteLog("USER32: CreateMDIWindowW hwnd = %X\n", hwnd);
1495#endif
1496 return(hwnd);
1497}
1498//******************************************************************************
1499//******************************************************************************
1500HWND WIN32API CreateWindowExW(DWORD arg1,
1501 LPCWSTR arg2,
1502 LPCWSTR arg3,
1503 DWORD dwStyle,
1504 int arg5,
1505 int arg6,
1506 int arg7,
1507 int arg8,
1508 HWND arg9,
1509 HMENU arg10,
1510 HINSTANCE arg11,
1511 PVOID arg12)
1512{
1513 HWND hwnd;
1514 char *astring1 = NULL,
1515 *astring2 = NULL;
1516 Win32WindowProc *window = NULL;
1517
1518 /* @@@PH 98/06/21 changed to call OS2CreateWindowExA */
1519 if((int)arg2 >> 16 != 0)
1520 astring1 = UnicodeToAsciiString((LPWSTR)arg2);
1521 else
1522 astring1 = (char *)arg2;
1523
1524 astring2 = UnicodeToAsciiString((LPWSTR)arg3);
1525
1526#ifdef DEBUG
1527 WriteLog("USER32: CreateWindowExW: dwExStyle = %X\n", arg1);
1528 if((int)arg2 >> 16 != 0)
1529 WriteLog("USER32: CreateWindow: classname = %s\n", astring1);
1530 else WriteLog("USER32: CreateWindow: classname = %X\n", arg2);
1531 WriteLog("USER32: CreateWindow: windowname= %s\n", astring2);
1532 WriteLog("USER32: CreateWindow: dwStyle = %X\n", dwStyle);
1533 WriteLog("USER32: CreateWindow: x = %d\n", arg5);
1534 WriteLog("USER32: CreateWindow: y = %d\n", arg6);
1535 WriteLog("USER32: CreateWindow: nWidth = %d\n", arg7);
1536 WriteLog("USER32: CreateWindow: nHeight = %d\n", arg8);
1537 WriteLog("USER32: CreateWindow: parent = %X\n", arg9);
1538 WriteLog("USER32: CreateWindow: hwmenu = %X\n", arg10);
1539 WriteLog("USER32: CreateWindow: hinstance = %X\n", arg11);
1540 WriteLog("USER32: CreateWindow: param = %X\n", arg12);
1541 #endif
1542
1543 hwnd = CreateWindowExA(arg1,
1544 astring1,
1545 astring2,
1546 dwStyle,
1547 arg5,
1548 arg6,
1549 arg7,
1550 arg8,
1551 arg9,
1552 arg10,
1553 arg11,
1554 arg12);
1555
1556 if(astring1)
1557 FreeAsciiString(astring1);
1558
1559 FreeAsciiString(astring2);
1560
1561#ifdef DEBUG
1562 WriteLog("USER32: ************CreateWindowExW hwnd = %X (%X)\n", hwnd, GetLastError());
1563#endif
1564 return(hwnd);
1565}
1566//******************************************************************************
1567//******************************************************************************
1568HDWP WIN32API DeferWindowPos( HDWP arg1, HWND arg2, HWND arg3, int arg4, int arg5, int arg6, int arg7, UINT arg8)
1569{
1570#ifdef DEBUG
1571 WriteLog("USER32: DeferWindowPos\n");
1572#endif
1573 return O32_DeferWindowPos(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
1574}
1575//******************************************************************************
1576//******************************************************************************
1577BOOL WIN32API DestroyAcceleratorTable( HACCEL arg1)
1578{
1579#ifdef DEBUG
1580 WriteLog("USER32: DestroyAcceleratorTable\n");
1581#endif
1582 return O32_DestroyAcceleratorTable(arg1);
1583}
1584//******************************************************************************
1585//******************************************************************************
1586BOOL WIN32API DestroyCaret(void)
1587{
1588#ifdef DEBUG
1589 WriteLog("USER32: DestroyCaret\n");
1590#endif
1591 return O32_DestroyCaret();
1592}
1593//******************************************************************************
1594//******************************************************************************
1595BOOL WIN32API DestroyCursor( HCURSOR arg1)
1596{
1597#ifdef DEBUG
1598 WriteLog("USER32: DestroyCursor\n");
1599#endif
1600 return O32_DestroyCursor(arg1);
1601}
1602//******************************************************************************
1603//******************************************************************************
1604BOOL WIN32API DestroyIcon( HICON arg1)
1605{
1606#ifdef DEBUG
1607 WriteLog("USER32: DestroyIcon\n");
1608#endif
1609 return O32_DestroyIcon(arg1);
1610}
1611//******************************************************************************
1612//******************************************************************************
1613LONG WIN32API DispatchMessageW( const MSG * arg1)
1614{
1615#ifdef DEBUG
1616 WriteLog("USER32: DispatchMessageW\n");
1617#endif
1618 // NOTE: This will not work as is (needs UNICODE support)
1619 return O32_DispatchMessage(arg1);
1620}
1621//******************************************************************************
1622//******************************************************************************
1623int WIN32API DlgDirListA( HWND arg1, LPSTR arg2, int arg3, int arg4, UINT arg5)
1624{
1625#ifdef DEBUG
1626 WriteLog("USER32: DlgDirListA\n");
1627#endif
1628 return O32_DlgDirList(arg1, arg2, arg3, arg4, arg5);
1629}
1630//******************************************************************************
1631//******************************************************************************
1632int WIN32API DlgDirListComboBoxA( HWND arg1, LPSTR arg2, int arg3, int arg4, UINT arg5)
1633{
1634#ifdef DEBUG
1635 WriteLog("USER32: DlgDirListComboBoxA\n");
1636#endif
1637 return O32_DlgDirListComboBox(arg1, arg2, arg3, arg4, arg5);
1638}
1639//******************************************************************************
1640//******************************************************************************
1641int WIN32API DlgDirListComboBoxW( HWND arg1, LPWSTR arg2, int arg3, int arg4, UINT arg5)
1642{
1643#ifdef DEBUG
1644 WriteLog("USER32: DlgDirListComboBoxW NOT WORKING\n");
1645#endif
1646 // NOTE: This will not work as is (needs UNICODE support)
1647 return 0;
1648// return O32_DlgDirListComboBox(arg1, arg2, arg3, arg4, arg5);
1649}
1650//******************************************************************************
1651//******************************************************************************
1652int WIN32API DlgDirListW( HWND arg1, LPWSTR arg2, int arg3, int arg4, UINT arg5)
1653{
1654#ifdef DEBUG
1655 WriteLog("USER32: DlgDirListW NOT WORKING\n");
1656#endif
1657 // NOTE: This will not work as is (needs UNICODE support)
1658 return 0;
1659// return O32_DlgDirList(arg1, arg2, arg3, arg4, arg5);
1660}
1661//******************************************************************************
1662//******************************************************************************
1663BOOL WIN32API DlgDirSelectComboBoxExA( HWND arg1, LPSTR arg2, int arg3, int arg4)
1664{
1665#ifdef DEBUG
1666 WriteLog("USER32: DlgDirSelectComboBoxExA\n");
1667#endif
1668 return O32_DlgDirSelectComboBoxEx(arg1, arg2, arg3, arg4);
1669}
1670//******************************************************************************
1671//******************************************************************************
1672BOOL WIN32API DlgDirSelectComboBoxExW( HWND arg1, LPWSTR arg2, int arg3, int arg4)
1673{
1674#ifdef DEBUG
1675 WriteLog("USER32: DlgDirSelectComboBoxExW NOT WORKING\n");
1676#endif
1677 // NOTE: This will not work as is (needs UNICODE support)
1678 return 0;
1679// return O32_DlgDirSelectComboBoxEx(arg1, arg2, arg3, arg4);
1680}
1681//******************************************************************************
1682//******************************************************************************
1683BOOL WIN32API DlgDirSelectExA( HWND arg1, LPSTR arg2, int arg3, int arg4)
1684{
1685#ifdef DEBUG
1686 WriteLog("USER32: DlgDirSelectExA\n");
1687#endif
1688 return O32_DlgDirSelectEx(arg1, arg2, arg3, arg4);
1689}
1690//******************************************************************************
1691//******************************************************************************
1692BOOL WIN32API DlgDirSelectExW( HWND arg1, LPWSTR arg2, int arg3, int arg4)
1693{
1694#ifdef DEBUG
1695 WriteLog("USER32: DlgDirSelectExW NOT WORKING\n");
1696#endif
1697 // NOTE: This will not work as is (needs UNICODE support)
1698 return 0;
1699// return O32_DlgDirSelectEx(arg1, arg2, arg3, arg4);
1700}
1701//******************************************************************************
1702//******************************************************************************
1703BOOL WIN32API DrawFocusRect( HDC arg1, const RECT * arg2)
1704{
1705#ifdef DEBUG
1706 WriteLog("USER32: DrawFocusRect\n");
1707#endif
1708 return O32_DrawFocusRect(arg1, arg2);
1709}
1710//******************************************************************************
1711//******************************************************************************
1712BOOL WIN32API DrawIcon( HDC arg1, int arg2, int arg3, HICON arg4)
1713{
1714#ifdef DEBUG
1715 WriteLog("USER32: DrawIcon\n");
1716#endif
1717 return O32_DrawIcon(arg1, arg2, arg3, arg4);
1718}
1719//******************************************************************************
1720//******************************************************************************
1721BOOL WIN32API DrawIconEx(HDC hdc, int xLeft, int xRight, HICON hIcon,
1722 int cxWidth, int cyWidth, UINT istepIfAniCur,
1723 HBRUSH hbrFlickerFreeDraw, UINT diFlags)
1724{
1725#ifdef DEBUG
1726 WriteLog("USER32: DrawIcon, partially implemented\n");
1727#endif
1728 return O32_DrawIcon(hdc, xLeft, xRight, hIcon);
1729}
1730//******************************************************************************
1731//******************************************************************************
1732BOOL WIN32API DrawMenuBar( HWND arg1)
1733{
1734#ifdef DEBUG
1735 WriteLog("USER32: DrawMenuBar\n");
1736#endif
1737 return O32_DrawMenuBar(arg1);
1738}
1739//******************************************************************************
1740//******************************************************************************
1741int WIN32API DrawTextW( HDC arg1, LPCWSTR arg2, int arg3, PRECT arg4, UINT arg5)
1742{
1743 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
1744 int rc;
1745
1746#ifdef DEBUG
1747 WriteLog("USER32: DrawTextW %s\n", astring);
1748#endif
1749 rc = O32_DrawText(arg1, astring, arg3, arg4, arg5);
1750 FreeAsciiString(astring);
1751 return(rc);
1752}
1753//******************************************************************************
1754//******************************************************************************
1755int WIN32API DrawTextExW(HDC arg1, LPCWSTR arg2, int arg3, PRECT arg4, UINT arg5, LPDRAWTEXTPARAMS lpDTParams)
1756{
1757 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
1758 int rc;
1759
1760#ifdef DEBUG
1761 WriteLog("USER32: DrawTextExW (not completely supported) %s\n", astring);
1762#endif
1763 rc = O32_DrawText(arg1, astring, arg3, arg4, arg5);
1764 FreeAsciiString(astring);
1765 return(rc);
1766}
1767//******************************************************************************
1768//******************************************************************************
1769BOOL WIN32API EmptyClipboard(void)
1770{
1771#ifdef DEBUG
1772 WriteLog("USER32: EmptyClipboard\n");
1773#endif
1774 return O32_EmptyClipboard();
1775}
1776//******************************************************************************
1777//******************************************************************************
1778BOOL WIN32API EndDeferWindowPos( HDWP arg1)
1779{
1780#ifdef DEBUG
1781 WriteLog("USER32: EndDeferWindowPos\n");
1782#endif
1783 return O32_EndDeferWindowPos(arg1);
1784}
1785//******************************************************************************
1786//******************************************************************************
1787BOOL WIN32API EnumChildWindows(HWND hwnd, WNDENUMPROC lpfn, LPARAM lParam)
1788{
1789 BOOL rc;
1790 EnumWindowCallback *callback = new EnumWindowCallback(lpfn, lParam);
1791
1792#ifdef DEBUG
1793 WriteLog("USER32: EnumChildWindows\n");
1794#endif
1795 rc = O32_EnumChildWindows(hwnd, callback->GetOS2Callback(), (LPARAM)callback);
1796 if(callback)
1797 delete callback;
1798 return(rc);
1799}
1800//******************************************************************************
1801//******************************************************************************
1802UINT WIN32API EnumClipboardFormats(UINT arg1)
1803{
1804#ifdef DEBUG
1805 WriteLog("USER32: EnumClipboardFormats\n");
1806#endif
1807 return O32_EnumClipboardFormats(arg1);
1808}
1809//******************************************************************************
1810//******************************************************************************
1811int WIN32API EnumPropsA(HWND arg1, PROPENUMPROCA arg2)
1812{
1813#ifdef DEBUG
1814 WriteLog("USER32: EnumPropsA DOES NOT WORK\n");
1815#endif
1816 //calling convention problems
1817 return 0;
1818// return O32_EnumProps(arg1, (PROPENUMPROC_O32)arg2);
1819}
1820//******************************************************************************
1821//******************************************************************************
1822int WIN32API EnumPropsExA( HWND arg1, PROPENUMPROCEXA arg2, LPARAM arg3)
1823{
1824#ifdef DEBUG
1825 WriteLog("USER32: EnumPropsExA DOES NOT WORK\n");
1826#endif
1827 //calling convention problems
1828 return 0;
1829// return O32_EnumPropsEx(arg1, arg2, (PROPENUMPROCEX_O32)arg3);
1830}
1831//******************************************************************************
1832//******************************************************************************
1833int WIN32API EnumPropsExW( HWND arg1, PROPENUMPROCEXW arg2, LPARAM arg3)
1834{
1835#ifdef DEBUG
1836 WriteLog("USER32: EnumPropsExW\n");
1837#endif
1838 // NOTE: This will not work as is (needs UNICODE support)
1839 //calling convention problems
1840 return 0;
1841// return O32_EnumPropsEx(arg1, arg2, arg3);
1842}
1843//******************************************************************************
1844//******************************************************************************
1845int WIN32API EnumPropsW( HWND arg1, PROPENUMPROCW arg2)
1846{
1847#ifdef DEBUG
1848 WriteLog("USER32: EnumPropsW\n");
1849#endif
1850 // NOTE: This will not work as is (needs UNICODE support)
1851 //calling convention problems
1852 return 0;
1853// return O32_EnumProps(arg1, arg2);
1854}
1855//******************************************************************************
1856//******************************************************************************
1857BOOL WIN32API EnumWindows(WNDENUMPROC lpfn, LPARAM lParam)
1858{
1859 BOOL rc;
1860 EnumWindowCallback *callback = new EnumWindowCallback(lpfn, lParam);
1861
1862#ifdef DEBUG
1863 WriteLog("USER32: EnumWindows\n");
1864#endif
1865 rc = O32_EnumWindows(callback->GetOS2Callback(), (LPARAM)callback);
1866 if(callback)
1867 delete callback;
1868 return(rc);
1869}
1870//******************************************************************************
1871//******************************************************************************
1872BOOL WIN32API EqualRect( const RECT * arg1, const RECT * arg2)
1873{
1874#ifdef DEBUG
1875 WriteLog("USER32: EqualRect\n");
1876#endif
1877 return O32_EqualRect(arg1, arg2);
1878}
1879//******************************************************************************
1880//******************************************************************************
1881BOOL WIN32API ExcludeUpdateRgn( HDC arg1, HWND arg2)
1882{
1883#ifdef DEBUG
1884 WriteLog("USER32: ExcludeUpdateRgn\n");
1885#endif
1886 return O32_ExcludeUpdateRgn(arg1, arg2);
1887}
1888//******************************************************************************
1889//******************************************************************************
1890BOOL WIN32API ExitWindowsEx( UINT arg1, DWORD arg2)
1891{
1892#ifdef DEBUG
1893 WriteLog("USER32: ExitWindowsEx\n");
1894#endif
1895 return O32_ExitWindowsEx(arg1, arg2);
1896}
1897//******************************************************************************
1898//******************************************************************************
1899int WIN32API FillRect(HDC arg1, const RECT * arg2, HBRUSH arg3)
1900{
1901#ifdef DEBUG
1902 WriteLog("USER32: FillRect (%d,%d)(%d,%d) brush %X\n", arg2->left, arg2->top, arg2->right, arg2->bottom, arg3);
1903#endif
1904 return O32_FillRect(arg1, arg2, arg3);
1905}
1906//******************************************************************************
1907//******************************************************************************
1908HWND WIN32API FindWindowW( LPCWSTR arg1, LPCWSTR arg2)
1909{
1910 char *astring1 = UnicodeToAsciiString((LPWSTR)arg1);
1911 char *astring2 = UnicodeToAsciiString((LPWSTR)arg2);
1912 HWND rc;
1913
1914#ifdef DEBUG
1915 WriteLog("USER32: FindWindowW\n");
1916#endif
1917 rc = O32_FindWindow(astring1, astring2);
1918 FreeAsciiString(astring1);
1919 FreeAsciiString(astring2);
1920 return rc;
1921}
1922//******************************************************************************
1923//******************************************************************************
1924int WIN32API FrameRect( HDC arg1, const RECT * arg2, HBRUSH arg3)
1925{
1926#ifdef DEBUG
1927 WriteLog("USER32: FrameRect\n");
1928#endif
1929 return O32_FrameRect(arg1, arg2, arg3);
1930}
1931//******************************************************************************
1932//******************************************************************************
1933HWND WIN32API GetCapture(void)
1934{
1935#ifdef DEBUG
1936 WriteLog("USER32: GetCapture\n");
1937#endif
1938 return O32_GetCapture();
1939}
1940//******************************************************************************
1941//******************************************************************************
1942UINT WIN32API GetCaretBlinkTime(void)
1943{
1944#ifdef DEBUG
1945 WriteLog("USER32: GetCaretBlinkTime\n");
1946#endif
1947 return O32_GetCaretBlinkTime();
1948}
1949//******************************************************************************
1950//******************************************************************************
1951BOOL WIN32API GetCaretPos( PPOINT arg1)
1952{
1953#ifdef DEBUG
1954 WriteLog("USER32: GetCaretPos\n");
1955#endif
1956 return O32_GetCaretPos(arg1);
1957}
1958//******************************************************************************
1959//******************************************************************************
1960BOOL WIN32API GetClipCursor( PRECT arg1)
1961{
1962#ifdef DEBUG
1963 WriteLog("USER32: GetClipCursor\n");
1964#endif
1965 return O32_GetClipCursor(arg1);
1966}
1967//******************************************************************************
1968//******************************************************************************
1969HANDLE WIN32API GetClipboardData( UINT arg1)
1970{
1971#ifdef DEBUG
1972 WriteLog("USER32: GetClipboardData\n");
1973#endif
1974 return O32_GetClipboardData(arg1);
1975}
1976//******************************************************************************
1977//******************************************************************************
1978int WIN32API GetClipboardFormatNameA( UINT arg1, LPSTR arg2, int arg3)
1979{
1980#ifdef DEBUG
1981 WriteLog("USER32: GetClipboardFormatNameA %s\n", arg2);
1982#endif
1983 return O32_GetClipboardFormatName(arg1, arg2, arg3);
1984}
1985//******************************************************************************
1986//******************************************************************************
1987int WIN32API GetClipboardFormatNameW(UINT arg1, LPWSTR arg2, int arg3)
1988{
1989 int rc;
1990 char *astring = UnicodeToAsciiString(arg2);
1991
1992#ifdef DEBUG
1993 WriteLog("USER32: GetClipboardFormatNameW %s\n", astring);
1994#endif
1995 rc = O32_GetClipboardFormatName(arg1, astring, arg3);
1996 FreeAsciiString(astring);
1997 return(rc);
1998}
1999//******************************************************************************
2000//******************************************************************************
2001HWND WIN32API GetClipboardOwner(void)
2002{
2003#ifdef DEBUG
2004 WriteLog("USER32: GetClipboardOwner\n");
2005#endif
2006 return O32_GetClipboardOwner();
2007}
2008//******************************************************************************
2009//******************************************************************************
2010HWND WIN32API GetClipboardViewer(void)
2011{
2012#ifdef DEBUG
2013 WriteLog("USER32: GetClipboardViewer\n");
2014#endif
2015 return O32_GetClipboardViewer();
2016}
2017//******************************************************************************
2018//******************************************************************************
2019DWORD WIN32API GetDialogBaseUnits(void)
2020{
2021#ifdef DEBUG
2022 WriteLog("USER32: GetDialogBaseUnits\n");
2023#endif
2024 return O32_GetDialogBaseUnits();
2025}
2026//******************************************************************************
2027//******************************************************************************
2028UINT WIN32API GetDlgItemInt( HWND arg1, int arg2, PBOOL arg3, BOOL arg4)
2029{
2030#ifdef DEBUG
2031 WriteLog("USER32: GetDlgItemInt\n");
2032#endif
2033 return O32_GetDlgItemInt(arg1, arg2, arg3, arg4);
2034}
2035
2036
2037/*****************************************************************************
2038 * Name : UINT WIN32API GetDlgItemTextW
2039 * Purpose : Determine the text of a window control
2040 * Parameters: HWND arg1
2041 * int arg2
2042 * LPWSTR arg3
2043 * UINT arg4
2044 * Variables :
2045 * Result :
2046 * Remark :
2047 * Status : UNTESTED UNKNOWN STUB
2048 *
2049 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2050 *****************************************************************************/
2051
2052UINT WIN32API GetDlgItemTextW(HWND arg1,
2053 int arg2,
2054 LPWSTR arg3,
2055 UINT arg4)
2056{
2057 LPSTR lpBuffer; /* temporary buffer for the ascii result */
2058 UINT uiResult; /* return value of the ascii variant */
2059
2060 dprintf(("USER32: GetDlgItemTextW(%08xh,%08xh,%08xh,%08xh)\n",
2061 arg1,
2062 arg2,
2063 arg3,
2064 arg4));
2065
2066
2067 lpBuffer = (LPSTR)malloc(arg4); /* allocate temporary buffer */
2068 uiResult = GetDlgItemTextA(arg1, /* call ascii variant */
2069 arg2,
2070 lpBuffer,
2071 arg4);
2072
2073 AsciiToUnicodeN(lpBuffer, /* now convert result to unicode */
2074 arg3,
2075 arg4);
2076
2077 free(lpBuffer); /* free the temporary buffer */
2078
2079 return (uiResult); /* OK, that's it */
2080}
2081
2082
2083//******************************************************************************
2084//******************************************************************************
2085UINT WIN32API GetDoubleClickTime(void)
2086{
2087#ifdef DEBUG
2088 WriteLog("USER32: GetDoubleClickTime\n");
2089#endif
2090 return O32_GetDoubleClickTime();
2091}
2092//******************************************************************************
2093//******************************************************************************
2094HWND WIN32API GetForegroundWindow(void)
2095{
2096#ifdef DEBUG
2097 WriteLog("USER32: GetForegroundWindow\n");
2098#endif
2099 return O32_GetForegroundWindow();
2100}
2101//******************************************************************************
2102//******************************************************************************
2103BOOL WIN32API GetIconInfo( HICON arg1, LPICONINFO arg2)
2104{
2105#ifdef DEBUG
2106 WriteLog("USER32: GetIconInfo\n");
2107#endif
2108 return O32_GetIconInfo(arg1, arg2);
2109}
2110//******************************************************************************
2111//******************************************************************************
2112int WIN32API GetKeyNameTextA( LPARAM arg1, LPSTR arg2, int arg3)
2113{
2114#ifdef DEBUG
2115 WriteLog("USER32: GetKeyNameTextA\n");
2116#endif
2117 return O32_GetKeyNameText(arg1, arg2, arg3);
2118}
2119//******************************************************************************
2120//******************************************************************************
2121int WIN32API GetKeyNameTextW( LPARAM arg1, LPWSTR arg2, int arg3)
2122{
2123#ifdef DEBUG
2124 WriteLog("USER32: GetKeyNameTextW DOES NOT WORK\n");
2125#endif
2126 // NOTE: This will not work as is (needs UNICODE support)
2127 return 0;
2128// return O32_GetKeyNameText(arg1, arg2, arg3);
2129}
2130//******************************************************************************
2131//******************************************************************************
2132int WIN32API GetKeyboardType( int arg1)
2133{
2134#ifdef DEBUG
2135 WriteLog("USER32: GetKeyboardType\n");
2136#endif
2137 return O32_GetKeyboardType(arg1);
2138}
2139//******************************************************************************
2140//******************************************************************************
2141HWND WIN32API GetLastActivePopup( HWND arg1)
2142{
2143#ifdef DEBUG
2144 WriteLog("USER32: GetLastActivePopup\n");
2145#endif
2146 return O32_GetLastActivePopup(arg1);
2147}
2148//******************************************************************************
2149//******************************************************************************
2150LONG WIN32API GetMessageExtraInfo(void)
2151{
2152 dprintf(("USER32: GetMessageExtraInfo\n"));
2153 return O32_GetMessageExtraInfo();
2154}
2155//******************************************************************************
2156//******************************************************************************
2157DWORD WIN32API GetMessagePos(void)
2158{
2159 dprintf(("USER32: GetMessagePos\n"));
2160 return O32_GetMessagePos();
2161}
2162//******************************************************************************
2163//******************************************************************************
2164LONG WIN32API GetMessageTime(void)
2165{
2166 dprintf(("USER32: GetMessageTime\n"));
2167 return O32_GetMessageTime();
2168}
2169//******************************************************************************
2170//******************************************************************************
2171BOOL WIN32API GetMessageW(LPMSG arg1, HWND arg2, UINT arg3, UINT arg4)
2172{
2173 BOOL rc;
2174
2175 // NOTE: This will not work as is (needs UNICODE support)
2176 rc = O32_GetMessage(arg1, arg2, arg3, arg4);
2177 dprintf(("USER32: GetMessageW %X returned %d\n", arg2, rc));
2178 return(rc);
2179}
2180//******************************************************************************
2181//******************************************************************************
2182HWND WIN32API GetNextDlgGroupItem( HWND arg1, HWND arg2, BOOL arg3)
2183{
2184#ifdef DEBUG
2185 WriteLog("USER32: GetNextDlgGroupItem\n");
2186#endif
2187 return O32_GetNextDlgGroupItem(arg1, arg2, arg3);
2188}
2189//******************************************************************************
2190//******************************************************************************
2191HWND WIN32API GetOpenClipboardWindow(void)
2192{
2193#ifdef DEBUG
2194 WriteLog("USER32: GetOpenClipboardWindow\n");
2195#endif
2196 return O32_GetOpenClipboardWindow();
2197}
2198//******************************************************************************
2199//******************************************************************************
2200HWND WIN32API GetParent( HWND arg1)
2201{
2202#ifdef DEBUG
2203//// WriteLog("USER32: GetParent\n");
2204#endif
2205 return O32_GetParent(arg1);
2206}
2207//******************************************************************************
2208//******************************************************************************
2209int WIN32API GetPriorityClipboardFormat( PUINT arg1, int arg2)
2210{
2211#ifdef DEBUG
2212 WriteLog("USER32: GetPriorityClipboardFormat\n");
2213#endif
2214 return O32_GetPriorityClipboardFormat(arg1, arg2);
2215}
2216//******************************************************************************
2217//******************************************************************************
2218HANDLE WIN32API GetPropA( HWND arg1, LPCSTR arg2)
2219{
2220#ifdef DEBUG
2221 if((int)arg2 >> 16 != 0)
2222 WriteLog("USER32: GetPropA %s\n", arg2);
2223 else WriteLog("USER32: GetPropA %X\n", arg2);
2224#endif
2225 return O32_GetProp(arg1, arg2);
2226}
2227//******************************************************************************
2228//******************************************************************************
2229HANDLE WIN32API GetPropW(HWND arg1, LPCWSTR arg2)
2230{
2231 BOOL handle;
2232 char *astring;
2233
2234 if((int)arg2 >> 16 != 0)
2235 astring = UnicodeToAsciiString((LPWSTR)arg2);
2236 else astring = (char *)arg2;
2237#ifdef DEBUG
2238 if((int)arg2 >> 16 != 0)
2239 WriteLog("USER32: GetPropW %s\n", astring);
2240 else WriteLog("USER32: GetPropW %X\n", astring);
2241#endif
2242 handle = GetPropA(arg1, (LPCSTR)astring);
2243 if((int)arg2 >> 16 != 0)
2244 FreeAsciiString(astring);
2245
2246 return(handle);
2247}
2248//******************************************************************************
2249//******************************************************************************
2250DWORD WIN32API GetQueueStatus( UINT arg1)
2251{
2252#ifdef DEBUG
2253 WriteLog("USER32: GetQueueStatus\n");
2254#endif
2255 return O32_GetQueueStatus(arg1);
2256}
2257//******************************************************************************
2258//******************************************************************************
2259int WIN32API GetScrollPos(HWND hwnd, int fnBar)
2260{
2261 int pos;
2262
2263 pos = O32_GetScrollPos(hwnd, fnBar);
2264#ifdef DEBUG
2265 WriteLog("USER32: GetScrollPos of %X type %d returned %d\n", hwnd, fnBar, pos);
2266#endif
2267 return(pos);
2268}
2269//******************************************************************************
2270//******************************************************************************
2271BOOL WIN32API GetScrollRange( HWND arg1, int arg2, int * arg3, int * arg4)
2272{
2273#ifdef DEBUG
2274 WriteLog("USER32: GetScrollRange\n");
2275#endif
2276 return O32_GetScrollRange(arg1, arg2, arg3, arg4);
2277}
2278//******************************************************************************
2279//******************************************************************************
2280DWORD WIN32API GetTabbedTextExtentA( HDC arg1, LPCSTR arg2, int arg3, int arg4, int * arg5)
2281{
2282#ifdef DEBUG
2283 WriteLog("USER32: GetTabbedTextExtentA\n");
2284#endif
2285 return O32_GetTabbedTextExtent(arg1, arg2, arg3, arg4, arg5);
2286}
2287//******************************************************************************
2288//******************************************************************************
2289DWORD WIN32API GetTabbedTextExtentW( HDC arg1, LPCWSTR arg2, int arg3, int arg4, int * arg5)
2290{
2291 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
2292 DWORD rc;
2293
2294#ifdef DEBUG
2295 WriteLog("USER32: GetTabbedTextExtentW\n");
2296#endif
2297 rc = O32_GetTabbedTextExtent(arg1, astring, arg3, arg4, arg5);
2298 FreeAsciiString(astring);
2299 return rc;
2300}
2301//******************************************************************************
2302//******************************************************************************
2303HWND WIN32API GetTopWindow( HWND arg1)
2304{
2305#ifdef DEBUG
2306//// WriteLog("USER32: GetTopWindow\n");
2307#endif
2308 return O32_GetTopWindow(arg1);
2309}
2310//******************************************************************************
2311//******************************************************************************
2312int WIN32API GetUpdateRgn( HWND arg1, HRGN arg2, BOOL arg3)
2313{
2314#ifdef DEBUG
2315 WriteLog("USER32: GetUpdateRgn\n");
2316#endif
2317 return O32_GetUpdateRgn(arg1, arg2, arg3);
2318}
2319//******************************************************************************
2320//******************************************************************************
2321LONG WIN32API GetWindowLongW( HWND arg1, int arg2)
2322{
2323#ifdef DEBUG
2324 WriteLog("USER32: GetWindowLongW\n");
2325#endif
2326 return GetWindowLongA(arg1, arg2); //class procedures..
2327}
2328//******************************************************************************
2329//******************************************************************************
2330BOOL WIN32API GetWindowPlacement( HWND arg1, LPWINDOWPLACEMENT arg2)
2331{
2332#ifdef DEBUG
2333 WriteLog("USER32: GetWindowPlacement\n");
2334#endif
2335 return O32_GetWindowPlacement(arg1, arg2);
2336}
2337//******************************************************************************
2338
2339/***********************************************************************
2340 * GetInternalWindowPos (USER32.245)
2341 */
2342UINT WIN32API GetInternalWindowPos(HWND hwnd,
2343 LPRECT rectWnd,
2344 LPPOINT ptIcon )
2345{
2346 WINDOWPLACEMENT wndpl;
2347
2348 dprintf(("USER32: GetInternalWindowPos(%08xh,%08xh,%08xh)\n",
2349 hwnd,
2350 rectWnd,
2351 ptIcon));
2352
2353 if (O32_GetWindowPlacement( hwnd, &wndpl ))
2354 {
2355 if (rectWnd) *rectWnd = wndpl.rcNormalPosition;
2356 if (ptIcon) *ptIcon = wndpl.ptMinPosition;
2357 return wndpl.showCmd;
2358 }
2359 return 0;
2360}
2361
2362
2363//******************************************************************************
2364int WIN32API GetWindowTextLengthW( HWND arg1)
2365{
2366#ifdef DEBUG
2367 WriteLog("USER32: GetWindowTextLengthW\n");
2368#endif
2369 return O32_GetWindowTextLength(arg1);
2370}
2371//******************************************************************************
2372//******************************************************************************
2373int WIN32API GetWindowTextW(HWND hwnd, LPWSTR lpsz, int cch)
2374{
2375 char title[128];
2376 int rc;
2377
2378 rc = O32_GetWindowText(hwnd, title, sizeof(title));
2379#ifdef DEBUG
2380 WriteLog("USER32: GetWindowTextW returned %s\n", title);
2381#endif
2382 if(rc > cch) {
2383 title[cch-1] = 0;
2384 rc = cch;
2385 }
2386 AsciiToUnicode(title, lpsz);
2387 return(rc);
2388}
2389//******************************************************************************
2390//******************************************************************************
2391DWORD WIN32API GetWindowThreadProcessId(HWND arg1, PDWORD arg2)
2392{
2393#ifdef DEBUG
2394 WriteLog("USER32: GetWindowThreadProcessId\n");
2395#endif
2396 return O32_GetWindowThreadProcessId(arg1, arg2);
2397}
2398//******************************************************************************
2399//******************************************************************************
2400WORD WIN32API GetWindowWord( HWND arg1, int arg2)
2401{
2402#ifdef DEBUG
2403 WriteLog("USER32: GetWindowWord\n");
2404#endif
2405 return O32_GetWindowWord(arg1, arg2);
2406}
2407//******************************************************************************
2408//******************************************************************************
2409BOOL WIN32API HideCaret( HWND arg1)
2410{
2411#ifdef DEBUG
2412 WriteLog("USER32: HideCaret\n");
2413#endif
2414 return O32_HideCaret(arg1);
2415}
2416//******************************************************************************
2417//******************************************************************************
2418BOOL WIN32API InSendMessage(void)
2419{
2420#ifdef DEBUG
2421 WriteLog("USER32: InSendMessage\n");
2422#endif
2423 return O32_InSendMessage();
2424}
2425//******************************************************************************
2426//******************************************************************************
2427BOOL WIN32API IntersectRect( PRECT arg1, const RECT * arg2, const RECT * arg3)
2428{
2429#ifdef DEBUG
2430//// WriteLog("USER32: IntersectRect\n");
2431#endif
2432 return O32_IntersectRect(arg1, arg2, arg3);
2433}
2434//******************************************************************************
2435//******************************************************************************
2436BOOL WIN32API InvalidateRgn( HWND arg1, HRGN arg2, BOOL arg3)
2437{
2438#ifdef DEBUG
2439 WriteLog("USER32: InvalidateRgn\n");
2440#endif
2441 return O32_InvalidateRgn(arg1, arg2, arg3);
2442}
2443//******************************************************************************
2444//******************************************************************************
2445BOOL WIN32API InvertRect( HDC arg1, const RECT * arg2)
2446{
2447#ifdef DEBUG
2448 WriteLog("USER32: InvertRect\n");
2449#endif
2450 return O32_InvertRect(arg1, arg2);
2451}
2452//******************************************************************************
2453//******************************************************************************
2454BOOL WIN32API IsChild( HWND arg1, HWND arg2)
2455{
2456#ifdef DEBUG
2457 WriteLog("USER32: IsChild\n");
2458#endif
2459 return O32_IsChild(arg1, arg2);
2460}
2461//******************************************************************************
2462//******************************************************************************
2463BOOL WIN32API IsClipboardFormatAvailable( UINT arg1)
2464{
2465#ifdef DEBUG
2466 WriteLog("USER32: IsClipboardFormatAvailable\n");
2467#endif
2468 return O32_IsClipboardFormatAvailable(arg1);
2469}
2470//******************************************************************************
2471//******************************************************************************
2472BOOL WIN32API IsDialogMessageW( HWND arg1, LPMSG arg2)
2473{
2474#ifdef DEBUG
2475 WriteLog("USER32: IsDialogMessageW\n");
2476#endif
2477 // NOTE: This will not work as is (needs UNICODE support)
2478 return O32_IsDialogMessage(arg1, arg2);
2479}
2480//******************************************************************************
2481//******************************************************************************
2482BOOL WIN32API IsRectEmpty( const RECT * arg1)
2483{
2484#ifdef DEBUG
2485 WriteLog("USER32: IsRectEmpty\n");
2486#endif
2487 return O32_IsRectEmpty(arg1);
2488}
2489//******************************************************************************
2490//******************************************************************************
2491BOOL WIN32API IsWindow( HWND arg1)
2492{
2493#ifdef DEBUG
2494 WriteLog("USER32: IsWindow\n");
2495#endif
2496 return O32_IsWindow(arg1);
2497}
2498//******************************************************************************
2499//******************************************************************************
2500BOOL WIN32API IsWindowEnabled( HWND arg1)
2501{
2502#ifdef DEBUG
2503 WriteLog("USER32: IsWindowEnabled\n");
2504#endif
2505 return O32_IsWindowEnabled(arg1);
2506}
2507//******************************************************************************
2508//******************************************************************************
2509BOOL WIN32API IsWindowVisible( HWND arg1)
2510{
2511#ifdef DEBUG
2512 WriteLog("USER32: IsWindowVisible\n");
2513#endif
2514 return O32_IsWindowVisible(arg1);
2515}
2516//******************************************************************************
2517//******************************************************************************
2518BOOL WIN32API IsZoomed( HWND arg1)
2519{
2520#ifdef DEBUG
2521 WriteLog("USER32: IsZoomed\n");
2522#endif
2523 return O32_IsZoomed(arg1);
2524}
2525//******************************************************************************
2526//******************************************************************************
2527BOOL WIN32API LockWindowUpdate( HWND arg1)
2528{
2529#ifdef DEBUG
2530 WriteLog("USER32: LockWindowUpdate\n");
2531#endif
2532 return O32_LockWindowUpdate(arg1);
2533}
2534//******************************************************************************
2535//******************************************************************************
2536BOOL WIN32API MapDialogRect( HWND arg1, PRECT arg2)
2537{
2538#ifdef DEBUG
2539 WriteLog("USER32: MapDialogRect\n");
2540#endif
2541 return O32_MapDialogRect(arg1, arg2);
2542}
2543//******************************************************************************
2544//******************************************************************************
2545UINT WIN32API MapVirtualKeyA( UINT arg1, UINT arg2)
2546{
2547#ifdef DEBUG
2548 WriteLog("USER32: MapVirtualKeyA\n");
2549#endif
2550 return O32_MapVirtualKey(arg1, arg2);
2551}
2552//******************************************************************************
2553//******************************************************************************
2554UINT WIN32API MapVirtualKeyW( UINT arg1, UINT arg2)
2555{
2556#ifdef DEBUG
2557 WriteLog("USER32: MapVirtualKeyW\n");
2558#endif
2559 // NOTE: This will not work as is (needs UNICODE support)
2560 return O32_MapVirtualKey(arg1, arg2);
2561}
2562//******************************************************************************
2563//******************************************************************************
2564int WIN32API MapWindowPoints( HWND arg1, HWND arg2, LPPOINT arg3, UINT arg4)
2565{
2566#ifdef DEBUG
2567 WriteLog("USER32: MapWindowPoints\n");
2568#endif
2569 return O32_MapWindowPoints(arg1, arg2, arg3, arg4);
2570}
2571//******************************************************************************
2572//******************************************************************************
2573int WIN32API MessageBoxW(HWND arg1, LPCWSTR arg2, LPCWSTR arg3, UINT arg4)
2574{
2575 char *astring1, *astring2;
2576 int rc;
2577
2578 astring1 = UnicodeToAsciiString((LPWSTR)arg2);
2579 astring2 = UnicodeToAsciiString((LPWSTR)arg3);
2580#ifdef DEBUG
2581 WriteLog("USER32: MessageBoxW %s %s\n", astring1, astring2);
2582#endif
2583 rc = O32_MessageBox(arg1, astring1, astring2, arg4);
2584 FreeAsciiString(astring1);
2585 FreeAsciiString(astring2);
2586 return(rc);
2587}
2588//******************************************************************************
2589//******************************************************************************
2590BOOL WIN32API OpenClipboard( HWND arg1)
2591{
2592#ifdef DEBUG
2593 WriteLog("USER32: OpenClipboard\n");
2594#endif
2595 return O32_OpenClipboard(arg1);
2596}
2597//******************************************************************************
2598//******************************************************************************
2599BOOL WIN32API PeekMessageW( LPMSG arg1, HWND arg2, UINT arg3, UINT arg4, UINT arg5)
2600{
2601#ifdef DEBUG
2602 WriteLog("USER32: PeekMessageW\n");
2603#endif
2604 // NOTE: This will not work as is (needs UNICODE support)
2605 return O32_PeekMessage(arg1, arg2, arg3, arg4, arg5);
2606}
2607//******************************************************************************
2608//******************************************************************************
2609// NOTE: Open32 function doesn't have the 'W'.
2610BOOL WIN32API PostMessageW( HWND arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
2611{
2612#ifdef DEBUG
2613 WriteLog("USER32: PostMessageW\n");
2614#endif
2615 // NOTE: This will not work as is (needs UNICODE support)
2616 return O32_PostMessage(arg1, arg2, arg3, arg4);
2617}
2618//******************************************************************************
2619//******************************************************************************
2620BOOL WIN32API PostThreadMessageA( DWORD arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
2621{
2622#ifdef DEBUG
2623 WriteLog("USER32: PostThreadMessageA\n");
2624#endif
2625 return O32_PostThreadMessage(arg1, arg2, arg3, arg4);
2626}
2627//******************************************************************************
2628//******************************************************************************
2629BOOL WIN32API PostThreadMessageW( DWORD arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
2630{
2631#ifdef DEBUG
2632 WriteLog("USER32: PostThreadMessageW\n");
2633#endif
2634 // NOTE: This will not work as is (needs UNICODE support)
2635 return O32_PostThreadMessage(arg1, arg2, arg3, arg4);
2636}
2637//******************************************************************************
2638//******************************************************************************
2639BOOL WIN32API PtInRect( const RECT * arg1, POINT arg2)
2640{
2641#ifdef DEBUG
2642 WriteLog("USER32: PtInRect\n");
2643#endif
2644 return O32_PtInRect(arg1, arg2);
2645}
2646//******************************************************************************
2647//******************************************************************************
2648BOOL WIN32API RedrawWindow( HWND arg1, const RECT * arg2, HRGN arg3, UINT arg4)
2649{
2650 BOOL rc;
2651
2652 rc = O32_RedrawWindow(arg1, arg2, arg3, arg4);
2653#ifdef DEBUG
2654 WriteLog("USER32: RedrawWindow %X , %X, %X, %X returned %d\n", arg1, arg2, arg3, arg4, rc);
2655#endif
2656 InvalidateRect(arg1, arg2, TRUE);
2657 UpdateWindow(arg1);
2658 SendMessageA(arg1, WM_PAINT, 0, 0);
2659 return(rc);
2660}
2661//******************************************************************************
2662//******************************************************************************
2663UINT WIN32API RegisterClipboardFormatA( LPCSTR arg1)
2664{
2665#ifdef DEBUG
2666 WriteLog("USER32: RegisterClipboardFormatA\n");
2667#endif
2668 return O32_RegisterClipboardFormat(arg1);
2669}
2670//******************************************************************************
2671//******************************************************************************
2672UINT WIN32API RegisterClipboardFormatW(LPCWSTR arg1)
2673{
2674 UINT rc;
2675 char *astring = UnicodeToAsciiString((LPWSTR)arg1);
2676
2677#ifdef DEBUG
2678 WriteLog("USER32: RegisterClipboardFormatW %s\n", astring);
2679#endif
2680 rc = O32_RegisterClipboardFormat(astring);
2681 FreeAsciiString(astring);
2682#ifdef DEBUG
2683 WriteLog("USER32: RegisterClipboardFormatW returned %d\n", rc);
2684#endif
2685 return(rc);
2686}
2687//******************************************************************************
2688//******************************************************************************
2689UINT WIN32API RegisterWindowMessageW( LPCWSTR arg1)
2690{
2691 char *astring = UnicodeToAsciiString((LPWSTR)arg1);
2692 UINT rc;
2693
2694#ifdef DEBUG
2695 WriteLog("USER32: RegisterWindowMessageW\n");
2696#endif
2697 rc = O32_RegisterWindowMessage(astring);
2698 FreeAsciiString(astring);
2699 return rc;
2700}
2701//******************************************************************************
2702//******************************************************************************
2703HANDLE WIN32API RemovePropA( HWND arg1, LPCSTR arg2)
2704{
2705#ifdef DEBUG
2706 WriteLog("USER32: RemovePropA\n");
2707#endif
2708 return O32_RemoveProp(arg1, arg2);
2709}
2710//******************************************************************************
2711//******************************************************************************
2712HANDLE WIN32API RemovePropW( HWND arg1, LPCWSTR arg2)
2713{
2714 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
2715 HANDLE rc;
2716
2717#ifdef DEBUG
2718 WriteLog("USER32: RemovePropW\n");
2719#endif
2720 rc = O32_RemoveProp(arg1, astring);
2721 FreeAsciiString(astring);
2722 return rc;
2723}
2724//******************************************************************************
2725//******************************************************************************
2726BOOL WIN32API ReplyMessage( LRESULT arg1)
2727{
2728#ifdef DEBUG
2729 WriteLog("USER32: ReplyMessage\n");
2730#endif
2731 return O32_ReplyMessage(arg1);
2732}
2733//******************************************************************************
2734//******************************************************************************
2735BOOL WIN32API ScreenToClient( HWND arg1, LPPOINT arg2)
2736{
2737#ifdef DEBUG
2738 WriteLog("USER32: ScreenToClient\n");
2739#endif
2740 return O32_ScreenToClient(arg1, arg2);
2741}
2742//******************************************************************************
2743//******************************************************************************
2744BOOL WIN32API ScrollDC( HDC arg1, int arg2, int arg3, const RECT * arg4, const RECT * arg5, HRGN arg6, PRECT arg7)
2745{
2746#ifdef DEBUG
2747 WriteLog("USER32: ScrollDC\n");
2748#endif
2749 return O32_ScrollDC(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
2750}
2751//******************************************************************************
2752//******************************************************************************
2753BOOL WIN32API ScrollWindow( HWND arg1, int arg2, int arg3, const RECT * arg4, const RECT * arg5)
2754{
2755#ifdef DEBUG
2756 WriteLog("USER32: ScrollWindow\n");
2757#endif
2758 return O32_ScrollWindow(arg1, arg2, arg3, arg4, arg5);
2759}
2760//******************************************************************************
2761//******************************************************************************
2762BOOL WIN32API ScrollWindowEx( HWND arg1, int arg2, int arg3, const RECT * arg4, const RECT * arg5, HRGN arg6, PRECT arg7, UINT arg8)
2763{
2764#ifdef DEBUG
2765 WriteLog("USER32: ScrollWindowEx\n");
2766#endif
2767 return O32_ScrollWindowEx(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
2768}
2769//******************************************************************************
2770//******************************************************************************
2771LONG WIN32API SendDlgItemMessageW( HWND arg1, int arg2, UINT arg3, WPARAM arg4, LPARAM arg5)
2772{
2773#ifdef DEBUG
2774 WriteLog("USER32: SendDlgItemMessageW\n");
2775#endif
2776 return O32_SendDlgItemMessage(arg1, arg2, arg3, arg4, arg5);
2777}
2778//******************************************************************************
2779//******************************************************************************
2780LRESULT WIN32API SendMessageW( HWND arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
2781{
2782LRESULT rc;
2783
2784#ifdef DEBUG
2785 WriteLog("USER32: SendMessageW....\n");
2786#endif
2787 rc = O32_SendMessage(arg1, arg2, arg3, arg4);
2788#ifdef DEBUG
2789 WriteLog("USER32: SendMessageW %X %X %X %X returned %d\n", arg1, arg2, arg3, arg4, rc);
2790#endif
2791 return(rc);
2792}
2793//******************************************************************************
2794//******************************************************************************
2795BOOL WIN32API SetCaretBlinkTime( UINT arg1)
2796{
2797#ifdef DEBUG
2798 WriteLog("USER32: SetCaretBlinkTime\n");
2799#endif
2800 return O32_SetCaretBlinkTime(arg1);
2801}
2802//******************************************************************************
2803//******************************************************************************
2804BOOL WIN32API SetCaretPos( int arg1, int arg2)
2805{
2806 dprintf(("USER32: SetCaretPos\n"));
2807 return O32_SetCaretPos(arg1, arg2);
2808}
2809//******************************************************************************
2810//******************************************************************************
2811HANDLE WIN32API SetClipboardData( UINT arg1, HANDLE arg2)
2812{
2813 dprintf(("USER32: SetClipboardData\n"));
2814 return O32_SetClipboardData(arg1, arg2);
2815}
2816//******************************************************************************
2817//******************************************************************************
2818HWND WIN32API SetClipboardViewer( HWND arg1)
2819{
2820 dprintf(("USER32: SetClipboardViewer\n"));
2821 return O32_SetClipboardViewer(arg1);
2822}
2823//******************************************************************************
2824//******************************************************************************
2825BOOL WIN32API SetDlgItemTextW( HWND arg1, int arg2, LPCWSTR arg3)
2826{
2827char *astring = UnicodeToAsciiString((LPWSTR)arg3);
2828BOOL rc;
2829
2830#ifdef DEBUG
2831 WriteLog("USER32: SetDlgItemTextW\n");
2832#endif
2833 // NOTE: This will not work as is (needs UNICODE support)
2834 rc = O32_SetDlgItemText(arg1, arg2, astring);
2835 FreeAsciiString(astring);
2836 return rc;
2837}
2838//******************************************************************************
2839//******************************************************************************
2840BOOL WIN32API SetDoubleClickTime( UINT arg1)
2841{
2842#ifdef DEBUG
2843 WriteLog("USER32: SetDoubleClickTime\n");
2844#endif
2845 return O32_SetDoubleClickTime(arg1);
2846}
2847//******************************************************************************
2848//******************************************************************************
2849HWND WIN32API SetParent( HWND arg1, HWND arg2)
2850{
2851#ifdef DEBUG
2852 WriteLog("USER32: SetParent\n");
2853#endif
2854 return O32_SetParent(arg1, arg2);
2855}
2856//******************************************************************************
2857//******************************************************************************
2858BOOL WIN32API SetPropA( HWND arg1, LPCSTR arg2, HANDLE arg3)
2859{
2860#ifdef DEBUG
2861 if((int)arg2 >> 16 != 0)
2862 WriteLog("USER32: SetPropA %S\n", arg2);
2863 else WriteLog("USER32: SetPropA %X\n", arg2);
2864#endif
2865 return O32_SetProp(arg1, arg2, arg3);
2866}
2867//******************************************************************************
2868//******************************************************************************
2869BOOL WIN32API SetPropW(HWND arg1, LPCWSTR arg2, HANDLE arg3)
2870{
2871 BOOL rc;
2872 char *astring;
2873
2874 if((int)arg2 >> 16 != 0)
2875 astring = UnicodeToAsciiString((LPWSTR)arg2);
2876 else astring = (char *)arg2;
2877
2878#ifdef DEBUG
2879 if((int)arg2 >> 16 != 0)
2880 WriteLog("USER32: SetPropW %S\n", astring);
2881 else WriteLog("USER32: SetPropW %X\n", astring);
2882#endif
2883 rc = O32_SetProp(arg1, astring, arg3);
2884 if((int)astring >> 16 != 0)
2885 FreeAsciiString(astring);
2886 return(rc);
2887}
2888//******************************************************************************
2889//******************************************************************************
2890BOOL WIN32API SetRectEmpty( PRECT arg1)
2891{
2892#ifdef DEBUG
2893 WriteLog("USER32: SetRectEmpty\n");
2894#endif
2895 return O32_SetRectEmpty(arg1);
2896}
2897//******************************************************************************
2898//******************************************************************************
2899int WIN32API SetScrollPos( HWND arg1, int arg2, int arg3, BOOL arg4)
2900{
2901#ifdef DEBUG
2902 WriteLog("USER32: SetScrollPos\n");
2903#endif
2904 return O32_SetScrollPos(arg1, arg2, arg3, arg4);
2905}
2906//******************************************************************************
2907//******************************************************************************
2908BOOL WIN32API SetScrollRange( HWND arg1, int arg2, int arg3, int arg4, BOOL arg5)
2909{
2910#ifdef DEBUG
2911 WriteLog("USER32: SetScrollRange\n");
2912#endif
2913 return O32_SetScrollRange(arg1, arg2, arg3, arg4, arg5);
2914}
2915//******************************************************************************
2916//******************************************************************************
2917LONG WIN32API SetWindowLongA(HWND hwnd, int nIndex, LONG arg3)
2918{
2919 LONG rc;
2920
2921 dprintf(("USER32: SetWindowLongA %X %d %X\n", hwnd, nIndex, arg3));
2922 if(nIndex == GWL_WNDPROC || nIndex == DWL_DLGPROC) {
2923 Win32WindowProc *wndproc = Win32WindowProc::FindProc(hwnd);
2924 if(wndproc == NULL) {//created with system class and app wants to change the handler
2925 dprintf(("USER32: SetWindowLong new WindowProc for system class\n"));
2926 wndproc = new Win32WindowProc((WNDPROC)arg3);
2927 wndproc->SetWindowHandle(hwnd);
2928 rc = O32_GetWindowLong(hwnd, nIndex);
2929 Win32WindowSubProc *subwndproc = new Win32WindowSubProc(hwnd, (WNDPROC_O32)rc);
2930 O32_SetWindowLong(hwnd, nIndex, (LONG)wndproc->GetOS2Callback());
2931 return((LONG)subwndproc->GetWin32Callback());
2932 }
2933 else {
2934 if(!(nIndex == DWL_DLGPROC && wndproc->IsWindow() == TRUE)) {
2935 rc = (LONG)wndproc->GetWin32Callback();
2936 dprintf(("USER32: SetWindowLong change WindowProc %X to %X\n", rc, arg3));
2937 wndproc->SetWin32Callback((WNDPROC)arg3);
2938 return(rc);
2939 }
2940 //else window that accesses it's normal window data
2941 }
2942 }
2943 return O32_SetWindowLong(hwnd, nIndex, arg3);
2944}
2945//******************************************************************************
2946//TODO: Is this always correct? (GWL_ID: window identifier??)
2947//******************************************************************************
2948LONG WIN32API SetWindowLongW(HWND arg1, int arg2, LONG arg3)
2949{
2950 dprintf(("USER32: SetWindowLongW %X %d %X\n", arg1, arg2, arg3));
2951 return SetWindowLongA(arg1, arg2, arg3);
2952}
2953//******************************************************************************
2954//******************************************************************************
2955BOOL WIN32API SetWindowPlacement( HWND arg1, const WINDOWPLACEMENT * arg2)
2956{
2957 dprintf(("USER32: SetWindowPlacement\n"));
2958 return O32_SetWindowPlacement(arg1, arg2);
2959}
2960//******************************************************************************
2961//******************************************************************************
2962BOOL WIN32API SetWindowTextW( HWND arg1, LPCWSTR arg2)
2963{
2964 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
2965 BOOL rc;
2966
2967 rc = SetWindowTextA(arg1, (LPCSTR)astring);
2968 dprintf(("USER32: SetWindowTextW %X %s returned %d\n", arg1, astring, rc));
2969 FreeAsciiString(astring);
2970 return(rc);
2971}
2972//******************************************************************************
2973//******************************************************************************
2974WORD WIN32API SetWindowWord( HWND arg1, int arg2, WORD arg3)
2975{
2976 dprintf(("USER32: SetWindowWord\n"));
2977 return O32_SetWindowWord(arg1, arg2, arg3);
2978}
2979//******************************************************************************
2980//******************************************************************************
2981BOOL WIN32API ShowCaret( HWND arg1)
2982{
2983 dprintf(("USER32: ShowCaret\n"));
2984 return O32_ShowCaret(arg1);
2985}
2986//******************************************************************************
2987//******************************************************************************
2988BOOL WIN32API ShowOwnedPopups( HWND arg1, BOOL arg2)
2989{
2990 dprintf(("USER32: ShowOwnedPopups\n"));
2991 return O32_ShowOwnedPopups(arg1, arg2);
2992}
2993//******************************************************************************
2994//******************************************************************************
2995BOOL WIN32API ShowScrollBar( HWND arg1, int arg2, BOOL arg3)
2996{
2997#ifdef DEBUG
2998 WriteLog("USER32: ShowScrollBar\n");
2999#endif
3000 return O32_ShowScrollBar(arg1, arg2, arg3);
3001}
3002//******************************************************************************
3003//******************************************************************************
3004BOOL WIN32API SwapMouseButton( BOOL arg1)
3005{
3006#ifdef DEBUG
3007 WriteLog("USER32: SwapMouseButton\n");
3008#endif
3009 return O32_SwapMouseButton(arg1);
3010}
3011//******************************************************************************
3012//******************************************************************************
3013BOOL WIN32API SystemParametersInfoA(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni)
3014{
3015 BOOL rc;
3016 NONCLIENTMETRICSA *cmetric = (NONCLIENTMETRICSA *)pvParam;
3017
3018 switch(uiAction) {
3019 case SPI_SCREENSAVERRUNNING:
3020 *(BOOL *)pvParam = FALSE;
3021 rc = TRUE;
3022 break;
3023 case SPI_GETDRAGFULLWINDOWS:
3024 *(BOOL *)pvParam = FALSE;
3025 rc = TRUE;
3026 break;
3027 case SPI_GETNONCLIENTMETRICS:
3028 memset(cmetric, 0, sizeof(NONCLIENTMETRICSA));
3029 cmetric->cbSize = sizeof(NONCLIENTMETRICSA);
3030 O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfCaptionFont),0);
3031 O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfMenuFont),0);
3032 O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfStatusFont),0);
3033 O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfMessageFont),0);
3034 cmetric->iBorderWidth = GetSystemMetrics(SM_CXBORDER);
3035 cmetric->iScrollWidth = GetSystemMetrics(SM_CXHSCROLL);
3036 cmetric->iScrollHeight = GetSystemMetrics(SM_CYHSCROLL);
3037 cmetric->iCaptionWidth = 32; //TODO
3038 cmetric->iCaptionHeight = 16; //TODO
3039 cmetric->iSmCaptionWidth = GetSystemMetrics(SM_CXSMSIZE);
3040 cmetric->iSmCaptionHeight = GetSystemMetrics(SM_CYSMSIZE);
3041 cmetric->iMenuWidth = 32; //TODO
3042 cmetric->iMenuHeight = GetSystemMetrics(SM_CYMENU);
3043 rc = TRUE;
3044 break;
3045 case 104: //TODO: Undocumented
3046 rc = 16;
3047 break;
3048 default:
3049 rc = O32_SystemParametersInfo(uiAction, uiParam, pvParam, fWinIni);
3050 break;
3051 }
3052#ifdef DEBUG
3053 WriteLog("USER32: SystemParametersInfoA %d, returned %d\n", uiAction, rc);
3054#endif
3055 return(rc);
3056}
3057//******************************************************************************
3058//TODO: Check for more options that have different structs for Unicode!!!!
3059//******************************************************************************
3060BOOL WIN32API SystemParametersInfoW(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni)
3061{
3062 BOOL rc;
3063 NONCLIENTMETRICSW *clientMetricsW = (NONCLIENTMETRICSW *)pvParam;
3064 NONCLIENTMETRICSA clientMetricsA = {0};
3065 PVOID pvParamA;
3066 UINT uiParamA;
3067
3068 switch(uiAction) {
3069 case SPI_SETNONCLIENTMETRICS:
3070 clientMetricsA.cbSize = sizeof(NONCLIENTMETRICSA);
3071 clientMetricsA.iBorderWidth = clientMetricsW->iBorderWidth;
3072 clientMetricsA.iScrollWidth = clientMetricsW->iScrollWidth;
3073 clientMetricsA.iScrollHeight = clientMetricsW->iScrollHeight;
3074 clientMetricsA.iCaptionWidth = clientMetricsW->iCaptionWidth;
3075 clientMetricsA.iCaptionHeight = clientMetricsW->iCaptionHeight;
3076 ConvertFontWA(&clientMetricsW->lfCaptionFont, &clientMetricsA.lfCaptionFont);
3077 clientMetricsA.iSmCaptionWidth = clientMetricsW->iSmCaptionWidth;
3078 clientMetricsA.iSmCaptionHeight = clientMetricsW->iSmCaptionHeight;
3079 ConvertFontWA(&clientMetricsW->lfSmCaptionFont, &clientMetricsA.lfSmCaptionFont);
3080 clientMetricsA.iMenuWidth = clientMetricsW->iMenuWidth;
3081 clientMetricsA.iMenuHeight = clientMetricsW->iMenuHeight;
3082 ConvertFontWA(&clientMetricsW->lfMenuFont, &clientMetricsA.lfMenuFont);
3083 ConvertFontWA(&clientMetricsW->lfStatusFont, &clientMetricsA.lfStatusFont);
3084 ConvertFontWA(&clientMetricsW->lfMessageFont, &clientMetricsA.lfMessageFont);
3085 //no break
3086 case SPI_GETNONCLIENTMETRICS:
3087 uiParamA = sizeof(NONCLIENTMETRICSA);
3088 pvParamA = &clientMetricsA;
3089 break;
3090 default:
3091 pvParamA = pvParam;
3092 uiParamA = uiParam;
3093 break;
3094 }
3095 rc = SystemParametersInfoA(uiAction, uiParamA, pvParamA, fWinIni);
3096
3097 switch(uiAction) {
3098 case SPI_GETNONCLIENTMETRICS:
3099 clientMetricsW->cbSize = sizeof(*clientMetricsW);
3100 clientMetricsW->iBorderWidth = clientMetricsA.iBorderWidth;
3101 clientMetricsW->iScrollWidth = clientMetricsA.iScrollWidth;
3102 clientMetricsW->iScrollHeight = clientMetricsA.iScrollHeight;
3103 clientMetricsW->iCaptionWidth = clientMetricsA.iCaptionWidth;
3104 clientMetricsW->iCaptionHeight = clientMetricsA.iCaptionHeight;
3105 ConvertFontAW(&clientMetricsA.lfCaptionFont, &clientMetricsW->lfCaptionFont);
3106
3107 clientMetricsW->iSmCaptionWidth = clientMetricsA.iSmCaptionWidth;
3108 clientMetricsW->iSmCaptionHeight = clientMetricsA.iSmCaptionHeight;
3109 ConvertFontAW(&clientMetricsA.lfSmCaptionFont, &clientMetricsW->lfSmCaptionFont);
3110
3111 clientMetricsW->iMenuWidth = clientMetricsA.iMenuWidth;
3112 clientMetricsW->iMenuHeight = clientMetricsA.iMenuHeight;
3113 ConvertFontAW(&clientMetricsA.lfMenuFont, &clientMetricsW->lfMenuFont);
3114 ConvertFontAW(&clientMetricsA.lfStatusFont, &clientMetricsW->lfStatusFont);
3115 ConvertFontAW(&clientMetricsA.lfMessageFont, &clientMetricsW->lfMessageFont);
3116 break;
3117 }
3118#ifdef DEBUG
3119 WriteLog("USER32: SystemParametersInfoW %d, returned %d\n", uiAction, rc);
3120#endif
3121 return(rc);
3122}
3123//******************************************************************************
3124//******************************************************************************
3125LONG WIN32API TabbedTextOutA( HDC arg1, int arg2, int arg3, LPCSTR arg4, int arg5, int arg6, int * arg7, int arg8)
3126{
3127#ifdef DEBUG
3128 WriteLog("USER32: TabbedTextOutA\n");
3129#endif
3130 return O32_TabbedTextOut(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
3131}
3132//******************************************************************************
3133//******************************************************************************
3134LONG WIN32API TabbedTextOutW( HDC arg1, int arg2, int arg3, LPCWSTR arg4, int arg5, int arg6, int * arg7, int arg8)
3135{
3136 char *astring = UnicodeToAsciiString((LPWSTR)arg4);
3137 LONG rc;
3138
3139#ifdef DEBUG
3140 WriteLog("USER32: TabbedTextOutW\n");
3141#endif
3142 rc = O32_TabbedTextOut(arg1, arg2, arg3, astring, arg5, arg6, arg7, arg8);
3143 FreeAsciiString(astring);
3144 return rc;
3145}
3146//******************************************************************************
3147//******************************************************************************
3148int WIN32API TranslateAccelerator( HWND arg1, HACCEL arg2, LPMSG arg3)
3149{
3150#ifdef DEBUG
3151 WriteLog("USER32: TranslateAccelerator\n");
3152#endif
3153 return O32_TranslateAccelerator(arg1, arg2, arg3);
3154}
3155//******************************************************************************
3156//******************************************************************************
3157int WIN32API TranslateAcceleratorW( HWND arg1, HACCEL arg2, LPMSG arg3)
3158{
3159#ifdef DEBUG
3160 WriteLog("USER32: TranslateAcceleratorW\n");
3161#endif
3162 // NOTE: This will not work as is (needs UNICODE support)
3163 return O32_TranslateAccelerator(arg1, arg2, arg3);
3164}
3165//******************************************************************************
3166//******************************************************************************
3167BOOL WIN32API TranslateMDISysAccel( HWND arg1, LPMSG arg2)
3168{
3169#ifdef DEBUG
3170//// WriteLog("USER32: TranslateMDISysAccel\n");
3171#endif
3172 return O32_TranslateMDISysAccel(arg1, arg2);
3173}
3174//******************************************************************************
3175//******************************************************************************
3176BOOL WIN32API UnionRect( PRECT arg1, const RECT * arg2, const RECT * arg3)
3177{
3178#ifdef DEBUG
3179 WriteLog("USER32: UnionRect\n");
3180#endif
3181 return O32_UnionRect(arg1, arg2, arg3);
3182}
3183//******************************************************************************
3184//******************************************************************************
3185BOOL WIN32API ValidateRect( HWND arg1, const RECT * arg2)
3186{
3187#ifdef DEBUG
3188 WriteLog("USER32: ValidateRect\n");
3189#endif
3190 return O32_ValidateRect(arg1, arg2);
3191}
3192//******************************************************************************
3193//******************************************************************************
3194BOOL WIN32API ValidateRgn( HWND arg1, HRGN arg2)
3195{
3196#ifdef DEBUG
3197 WriteLog("USER32: ValidateRgn\n");
3198#endif
3199 return O32_ValidateRgn(arg1, arg2);
3200}
3201//******************************************************************************
3202//******************************************************************************
3203WORD WIN32API VkKeyScanW( WCHAR arg1)
3204{
3205#ifdef DEBUG
3206 WriteLog("USER32: VkKeyScanW\n");
3207#endif
3208 // NOTE: This will not work as is (needs UNICODE support)
3209 return O32_VkKeyScan((char)arg1);
3210}
3211//******************************************************************************
3212//******************************************************************************
3213BOOL WIN32API WaitMessage(void)
3214{
3215#ifdef DEBUG
3216 WriteLog("USER32: WaitMessage\n");
3217#endif
3218 return O32_WaitMessage();
3219}
3220//******************************************************************************
3221//******************************************************************************
3222BOOL WIN32API WinHelpW( HWND arg1, LPCWSTR arg2, UINT arg3, DWORD arg4)
3223{
3224 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
3225 BOOL rc;
3226
3227#ifdef DEBUG
3228 WriteLog("USER32: WinHelpW\n");
3229#endif
3230 rc = WinHelpA(arg1, astring, arg3, arg4);
3231 FreeAsciiString(astring);
3232 return rc;
3233}
3234//******************************************************************************
3235//******************************************************************************
3236HWND WIN32API WindowFromDC( HDC arg1)
3237{
3238#ifdef DEBUG
3239 WriteLog("USER32: WindowFromDC\n");
3240#endif
3241 return O32_WindowFromDC(arg1);
3242}
3243//******************************************************************************
3244//******************************************************************************
3245HWND WIN32API WindowFromPoint( POINT arg1)
3246{
3247#ifdef DEBUG
3248 WriteLog("USER32: WindowFromPoint\n");
3249#endif
3250 return O32_WindowFromPoint(arg1);
3251}
3252//******************************************************************************
3253//******************************************************************************
3254int WIN32API wvsprintfA( LPSTR arg1, LPCSTR arg2, va_list arg3)
3255{
3256#ifdef DEBUG
3257 WriteLog("USER32: wvsprintfA\n");
3258#endif
3259 return O32_wvsprintf(arg1, arg2, (LPCVOID *)arg3);
3260}
3261//******************************************************************************
3262//******************************************************************************
3263int WIN32API wvsprintfW(LPWSTR lpOut, LPCWSTR lpFmt, va_list argptr)
3264{
3265 int rc;
3266 char szOut[256];
3267 char *lpFmtA;
3268
3269 lpFmtA = UnicodeToAsciiString((LPWSTR)lpFmt);
3270#ifdef DEBUG
3271 WriteLog("USER32: wvsprintfW, DOES NOT HANDLE UNICODE STRINGS!\n");
3272 WriteLog("USER32: %s\n", lpFmt);
3273#endif
3274 rc = O32_wvsprintf(szOut, lpFmtA, (LPCVOID)argptr);
3275
3276 AsciiToUnicode(szOut, lpOut);
3277#ifdef DEBUG
3278 WriteLog("USER32: %s\n", lpOut);
3279#endif
3280 FreeAsciiString(lpFmtA);
3281 return(rc);
3282}
3283//******************************************************************************
3284//No need to support this
3285//******************************************************************************
3286BOOL WIN32API SetMessageQueue(int cMessagesMax)
3287{
3288#ifdef DEBUG
3289 WriteLog("USER32: SetMessageQueue\n");
3290#endif
3291 return(TRUE);
3292}
3293//******************************************************************************
3294//TODO: Not complete
3295//******************************************************************************
3296BOOL WIN32API GetScrollInfo(HWND hwnd, int fnBar, LPSCROLLINFO lpsi)
3297{
3298#ifdef DEBUG
3299 WriteLog("USER32: GetScrollInfo\n");
3300#endif
3301 if(lpsi == NULL)
3302 return(FALSE);
3303
3304 if(lpsi->fMask & SIF_POS)
3305 lpsi->nPos = GetScrollPos(hwnd, fnBar);
3306 if(lpsi->fMask & SIF_RANGE)
3307 GetScrollRange(hwnd, fnBar, &lpsi->nMin, &lpsi->nMax);
3308 if(lpsi->fMask & SIF_PAGE) {
3309#ifdef DEBUG
3310 WriteLog("USER32: GetScrollInfo, page info not implemented\n");
3311#endif
3312 lpsi->nPage = 25;
3313 }
3314 return(TRUE);
3315}
3316//******************************************************************************
3317//TODO: Not complete
3318//******************************************************************************
3319INT WIN32API SetScrollInfo(HWND hwnd, INT fnBar, const SCROLLINFO *lpsi, BOOL fRedraw)
3320{
3321 int smin, smax;
3322
3323#ifdef DEBUG
3324 WriteLog("USER32: SetScrollInfo\n");
3325#endif
3326 if(lpsi == NULL)
3327 return(FALSE);
3328
3329 if(lpsi->fMask & SIF_POS)
3330 SetScrollPos(hwnd, fnBar, lpsi->nPos, fRedraw);
3331 if(lpsi->fMask & SIF_RANGE)
3332 SetScrollRange(hwnd, fnBar, lpsi->nMin, lpsi->nMax, fRedraw);
3333 if(lpsi->fMask & SIF_PAGE) {
3334#ifdef DEBUG
3335 WriteLog("USER32: GetScrollInfo, page info not implemented\n");
3336#endif
3337 }
3338 if(lpsi->fMask & SIF_DISABLENOSCROLL) {
3339#ifdef DEBUG
3340 WriteLog("USER32: GetScrollInfo, disable scrollbar not yet implemented\n");
3341#endif
3342 }
3343 return(TRUE);
3344}
3345//******************************************************************************
3346//******************************************************************************
3347BOOL WIN32API GrayStringA(HDC hdc, HBRUSH hBrush, GRAYSTRINGPROC lpOutputFunc,
3348 LPARAM lpData, int nCount, int X, int Y, int nWidth,
3349 int nHeight)
3350{
3351 BOOL rc;
3352 COLORREF curclr;
3353
3354#ifdef DEBUG
3355 WriteLog("USER32: GrayStringA, not completely implemented\n");
3356#endif
3357 if(lpOutputFunc == NULL && lpData == NULL) {
3358#ifdef DEBUG
3359 WriteLog("USER32: lpOutputFunc == NULL && lpData == NULL\n");
3360#endif
3361 return(FALSE);
3362 }
3363 if(lpOutputFunc) {
3364 return(lpOutputFunc(hdc, lpData, nCount));
3365 }
3366 curclr = SetTextColor(hdc, GetSysColor(COLOR_GRAYTEXT));
3367 rc = TextOutA(hdc, X, Y, (char *)lpData, nCount);
3368 SetTextColor(hdc, curclr);
3369
3370 return(rc);
3371}
3372//******************************************************************************
3373//******************************************************************************
3374BOOL WIN32API GrayStringW(HDC hdc, HBRUSH hBrush, GRAYSTRINGPROC lpOutputFunc,
3375 LPARAM lpData, int nCount, int X, int Y, int nWidth,
3376 int nHeight)
3377{
3378 BOOL rc;
3379 char *astring;
3380 COLORREF curclr;
3381
3382#ifdef DEBUG
3383 WriteLog("USER32: GrayStringW, not completely implemented\n");
3384#endif
3385
3386 if(lpOutputFunc == NULL && lpData == NULL) {
3387#ifdef DEBUG
3388 WriteLog("USER32: lpOutputFunc == NULL && lpData == NULL\n");
3389#endif
3390 return(FALSE);
3391 }
3392 if(nCount == 0)
3393 nCount = UniStrlen((UniChar*)lpData);
3394
3395 if(lpOutputFunc) {
3396 return(lpOutputFunc(hdc, lpData, nCount));
3397 }
3398 astring = UnicodeToAsciiString((LPWSTR)lpData);
3399
3400 curclr = SetTextColor(hdc, GetSysColor(COLOR_GRAYTEXT));
3401 rc = TextOutA(hdc, X, Y, astring, nCount);
3402 SetTextColor(hdc, curclr);
3403
3404 FreeAsciiString(astring);
3405 return(rc);
3406}
3407//******************************************************************************
3408//TODO:
3409//******************************************************************************
3410int WIN32API CopyAcceleratorTableA(HACCEL hAccelSrc, LPACCEL lpAccelDest,
3411 int cAccelEntries)
3412{
3413#ifdef DEBUG
3414 WriteLog("USER32: CopyAcceleratorTableA, not implemented\n");
3415#endif
3416 return(0);
3417}
3418//******************************************************************************
3419//TODO:
3420//******************************************************************************
3421int WIN32API CopyAcceleratorTableW(HACCEL hAccelSrc, LPACCEL lpAccelDest,
3422 int cAccelEntries)
3423{
3424#ifdef DEBUG
3425 WriteLog("USER32: CopyAcceleratorTableW, not implemented\n");
3426#endif
3427 return(0);
3428}
3429//******************************************************************************
3430//Stolen from Wine (controls\uitools.c)
3431//******************************************************************************
3432BOOL DrawEdgeDiag(HDC hdc, RECT *rect, UINT edge, UINT flags)
3433{
3434 HPEN facePen, shadowPen, lightPen, blackPen, grayPen, nullPen;
3435 HPEN iPen, oPen, oldPen;
3436 HBRUSH oldBrush, faceBrush;
3437 int cl, cr, ct, cb;
3438 BOOL mainDiag;
3439 POINT tp;
3440 RECT r;
3441
3442 /* If both rasied and sunken is specified, they anihilate one another */
3443 if( !((flags & BF_MONO) || (flags & BF_FLAT)) ){
3444 if( (edge & BDR_RAISEDOUTER) && (edge & BDR_SUNKENOUTER) )
3445 return FALSE;
3446 if( (edge & BDR_RAISEDINNER) && (edge & BDR_SUNKENINNER) )
3447 return FALSE;
3448 }
3449
3450 /* Create/get the tools of the trade... */
3451 facePen = CreatePen(PS_SOLID, 0, GetSysColor(COLOR_BTNFACE));
3452 shadowPen = CreatePen(PS_SOLID, 0, GetSysColor(COLOR_BTNSHADOW));
3453 lightPen = CreatePen(PS_SOLID, 0, GetSysColor(COLOR_BTNHILIGHT));
3454 grayPen = CreatePen(PS_SOLID, 0, RGB(168, 152, 144));
3455 blackPen = GetStockObject(BLACK_PEN);
3456 nullPen = GetStockObject(NULL_PEN);
3457 faceBrush = GetSysColorBrush(COLOR_BTNFACE);
3458 oldPen = SelectObject(hdc, nullPen);
3459 oldBrush = SelectObject(hdc, faceBrush);
3460
3461 /* this is my working rectangle */
3462 r = *rect;
3463
3464 if(flags & BF_MONO){
3465 oPen = blackPen;
3466 iPen = nullPen;
3467 }else if(flags & BF_FLAT){
3468 oPen = shadowPen;
3469 iPen = facePen;
3470 }else {
3471 if(flags & BF_SOFT){
3472 if(flags & BF_BOTTOM){
3473 oPen = (edge & BDR_RAISEDOUTER) ? blackPen : lightPen;
3474 iPen = (edge & BDR_RAISEDINNER) ? shadowPen : grayPen;
3475 }
3476 else{
3477 oPen = (edge & BDR_RAISEDOUTER) ? lightPen : blackPen;
3478 iPen = (edge & BDR_RAISEDINNER) ? grayPen : shadowPen;
3479 }
3480 }
3481 else{
3482 if(flags & BF_BOTTOM){
3483 oPen = (edge & BDR_RAISEDOUTER) ? blackPen : lightPen;
3484 iPen = (edge & BDR_RAISEDINNER) ? shadowPen : grayPen;
3485 }
3486 else{
3487 oPen = (edge & BDR_RAISEDOUTER) ? grayPen : shadowPen;
3488 iPen = (edge & BDR_RAISEDINNER) ? lightPen : blackPen;
3489 }
3490 }
3491 }
3492
3493 if(flags & BF_BOTTOM){
3494 if(flags & BF_LEFT){
3495 cr = -1; cl = 0;
3496 ct = 0; cb = -1;
3497 mainDiag = TRUE;
3498 tp.x = r.left; tp.y = r.top;
3499 }
3500 else{ /* RIGHT */
3501 cr = -1; cl = 0;
3502 ct = 1; cb = 0;
3503 tp.x = r.left; tp.y = r.bottom-1;
3504 mainDiag = FALSE;
3505 }
3506 }
3507 else{ /* TOP */
3508 if(flags & BF_LEFT){
3509 cr = 0; cl = 1;
3510 ct = 0; cb = -1;
3511 mainDiag = FALSE;
3512 tp.x = r.right; tp.y = r.top;
3513 }
3514 else{ /* RIGHT */
3515 cr = 0; cl = 1;
3516 ct = 1; cb = 0;
3517 tp.x = r.right; tp.y = r.bottom-1;
3518 mainDiag = TRUE;
3519 }
3520 }
3521
3522 /* if it has external edge, draw it */
3523 if(edge & BDR_OUTER){
3524 SelectObject(hdc, oPen);
3525 MoveToEx(hdc, r.left, mainDiag ? r.bottom-1 : r.top, 0);
3526 LineTo(hdc, r.right, mainDiag ? r.top-1 : r.bottom);
3527 r.left += cl; r.right += cr; r.top += ct; r.bottom += cb;
3528 }
3529
3530 /* if it has internal edge, draw it */
3531 if(edge & BDR_INNER){
3532 SelectObject(hdc, iPen);
3533 MoveToEx(hdc, r.left, mainDiag ? r.bottom-1 : r.top, 0);
3534 LineTo(hdc, r.right, mainDiag ? r.top-1 : r.bottom);
3535 r.left += cl; r.right += cr; r.top += ct; r.bottom += cb;
3536 }
3537
3538 if((flags & BF_MIDDLE) && !(flags & BF_MONO)){
3539 POINT p[3];
3540 p[0].x = mainDiag ? r.right: r.left;
3541 p[0].y = r.top;
3542 p[1].x = mainDiag ? r.left : r.right;
3543 p[1].y = r.bottom;
3544 p[2].x = tp.x;
3545 p[2].y = tp.y;
3546 SelectObject(hdc, nullPen);
3547 SelectObject(hdc, faceBrush);
3548 Polygon(hdc, p, 3);
3549 }
3550
3551 if(flags & BF_ADJUST)
3552 *rect = r;
3553
3554 /* Restore the DC */
3555 SelectObject(hdc, oldPen);
3556 SelectObject(hdc, oldBrush);
3557
3558 /* Clean-up */
3559 DeleteObject(facePen);
3560 DeleteObject(shadowPen);
3561 DeleteObject(lightPen);
3562 DeleteObject(grayPen);
3563
3564 return TRUE;
3565}
3566//******************************************************************************
3567//Stolen from Wine (controls\uitools.c)
3568//******************************************************************************
3569BOOL WIN32API DrawEdge(HDC hdc, LPRECT rect, UINT edge, UINT flags)
3570{
3571 HBRUSH faceBrush, shadowBrush, lightBrush, blackBrush, grayBrush, nullBrush;
3572 HBRUSH iNBrush, iSBrush, iEBrush, iWBrush;
3573 HBRUSH oNBrush, oSBrush, oEBrush, oWBrush;
3574 HBRUSH oldBrush;
3575 POINT point[2];
3576 RECT r;
3577
3578#ifdef DEBUG
3579 WriteLog("USER32: DrawEdge %X %X, partially implemented\n", edge, flags);
3580 WriteLog("USER32: DrawEdge (%d,%d) (%d,%d)\n", rect->left, rect->top, rect->right, rect->bottom);
3581#endif
3582
3583 if(flags & BF_DIAGONAL) {
3584 return DrawEdgeDiag(hdc, rect, edge, flags);
3585 }
3586 /* If both rasied and sunken is specified, they anihilate one another */
3587 if( !((flags & BF_MONO) || (flags & BF_FLAT)) ){
3588 if( (edge & BDR_RAISEDOUTER) && (edge & BDR_SUNKENOUTER) )
3589 return FALSE;
3590 if( (edge & BDR_RAISEDINNER) && (edge & BDR_SUNKENINNER) )
3591 return FALSE;
3592 }
3593
3594 faceBrush = GetSysColorBrush(COLOR_BTNFACE);
3595 shadowBrush = GetSysColorBrush(COLOR_BTNSHADOW);
3596 lightBrush = GetSysColorBrush(COLOR_BTNHILIGHT);
3597 blackBrush = GetStockObject(BLACK_BRUSH);
3598 grayBrush = GetStockObject(LTGRAY_BRUSH);
3599 nullBrush = GetStockObject(NULL_BRUSH);
3600 oldBrush = SelectObject(hdc, nullBrush);
3601
3602 /* this is my working rectangle */
3603 r = *rect;
3604
3605 if(flags & BF_MONO){
3606 oNBrush = oSBrush = oEBrush = oWBrush = blackBrush;
3607 iNBrush = iSBrush = iEBrush = iWBrush = nullBrush;
3608 }else if(flags & BF_FLAT){
3609 oNBrush = oSBrush = oEBrush = oWBrush = shadowBrush;
3610 iNBrush = iSBrush = iEBrush = iWBrush = faceBrush;
3611 }else {
3612 if(flags & BF_SOFT){
3613 oNBrush = oWBrush = (edge & BDR_RAISEDOUTER) ? lightBrush : blackBrush;
3614 oSBrush = oEBrush = (edge & BDR_RAISEDOUTER) ? blackBrush : lightBrush;
3615 iNBrush = iWBrush = (edge & BDR_RAISEDINNER) ? grayBrush : shadowBrush;
3616 iSBrush = iEBrush = (edge & BDR_RAISEDINNER) ? shadowBrush : grayBrush;
3617 }
3618 else{
3619 oNBrush = oWBrush = (edge & BDR_RAISEDOUTER) ? grayBrush : shadowBrush;
3620 oSBrush = oEBrush = (edge & BDR_RAISEDOUTER) ? blackBrush : lightBrush;
3621 iNBrush = iWBrush = (edge & BDR_RAISEDINNER) ? lightBrush : blackBrush;
3622 iSBrush = iEBrush = (edge & BDR_RAISEDINNER) ? shadowBrush : grayBrush;
3623 }
3624 }
3625
3626 /* if it has external edge, draw it */
3627 if(edge & BDR_OUTER){
3628 if(flags & BF_RIGHT){
3629 SelectObject(hdc, oEBrush);
3630 PatBlt(hdc, r.right-1, r.top, 1, r.bottom - r.top, PATCOPY);
3631 r.right--;
3632 }
3633 if(flags & BF_BOTTOM){
3634 SelectObject(hdc, oSBrush);
3635 PatBlt(hdc, r.left, r.bottom-1, r.right-r.left, 1, PATCOPY);
3636 r.bottom--;
3637 }
3638 if(flags & BF_LEFT){
3639 SelectObject(hdc, oWBrush);
3640 PatBlt(hdc, r.left, r.top, 1, r.bottom - r.top, PATCOPY);
3641 r.left++;
3642 }
3643 if(flags & BF_TOP){
3644 SelectObject(hdc, oNBrush);
3645 PatBlt(hdc, r.left, r.top, r.right-r.left, 1, PATCOPY);
3646 r.top++;
3647 }
3648 }
3649
3650 /* if it has internal edge, draw it */
3651 if(edge & BDR_INNER){
3652 if(flags & BF_RIGHT){
3653 SelectObject(hdc, iEBrush);
3654 PatBlt(hdc, r.right-1, r.top, 1, r.bottom - r.top, PATCOPY);
3655 r.right--;
3656 }
3657 if(flags & BF_BOTTOM){
3658 SelectObject(hdc, iSBrush);
3659 PatBlt(hdc, r.left, r.bottom-1, r.right-r.left, 1, PATCOPY);
3660 r.bottom--;
3661 }
3662 if(flags & BF_LEFT){
3663 SelectObject(hdc, iWBrush);
3664 PatBlt(hdc, r.left, r.top, 1, r.bottom - r.top, PATCOPY);
3665 r.left++;
3666 }
3667 if(flags & BF_TOP){
3668 SelectObject(hdc, iNBrush);
3669 PatBlt(hdc, r.left, r.top, r.right-r.left, 1, PATCOPY);
3670 r.top++;
3671 }
3672 }
3673
3674 /* if we got to fill the middle, to it now */
3675 if((flags & BF_MIDDLE) && !(flags & BF_MONO))
3676 FillRect(hdc, &r, faceBrush);
3677
3678 /* adjust the rectangle if required */
3679 if(flags & BF_ADJUST)
3680 *rect = r;
3681
3682 /* Restore the DC */
3683 SelectObject(hdc, oldBrush);
3684
3685 return TRUE;
3686}
3687//******************************************************************************
3688//******************************************************************************
3689LRESULT WIN32API SendMessageTimeoutA(HWND hwnd, UINT Msg, WPARAM wParam,
3690 LPARAM lParam, UINT fuFlags, UINT uTimeOut,
3691 LPDWORD lpdwResult)
3692{
3693#ifdef DEBUG
3694 WriteLog("USER32: SendMessageTimeoutA, partially implemented\n");
3695#endif
3696 //ignore fuFlags & wTimeOut
3697 *lpdwResult = SendMessageA(hwnd, Msg, wParam, lParam);
3698 return(TRUE);
3699}
3700//******************************************************************************
3701//******************************************************************************
3702LRESULT WIN32API SendMessageTimeoutW(HWND hwnd, UINT Msg, WPARAM wParam,
3703 LPARAM lParam, UINT fuFlags, UINT uTimeOut,
3704 LPDWORD lpdwResult)
3705{
3706#ifdef DEBUG
3707 WriteLog("USER32: SendMessageTimeoutW, partially implemented\n");
3708#endif
3709 return(SendMessageTimeoutA(hwnd, Msg, wParam, lParam, fuFlags, uTimeOut, lpdwResult));
3710}
3711//******************************************************************************
3712//******************************************************************************
3713HANDLE WIN32API CopyImage(HANDLE hImage, UINT uType, int cxDesired, int cyDesired, UINT fuFlags)
3714{
3715#ifdef DEBUG
3716 WriteLog("USER32: CopyImage, not implemented\n");
3717#endif
3718 switch(uType) {
3719 case IMAGE_BITMAP:
3720 case IMAGE_CURSOR:
3721 case IMAGE_ICON:
3722 default:
3723#ifdef DEBUG
3724 WriteLog("USER32: CopyImage, unknown type\n");
3725#endif
3726 return(NULL);
3727 }
3728 return(NULL);
3729}
3730//******************************************************************************
3731//******************************************************************************
3732BOOL WIN32API GetKeyboardState(PBYTE lpKeyState)
3733{
3734#ifdef DEBUG
3735 WriteLog("USER32: GetKeyboardState, not properly implemented\n");
3736#endif
3737 memset(lpKeyState, 0, 256);
3738 return(TRUE);
3739}
3740//******************************************************************************
3741//******************************************************************************
3742BOOL WIN32API SetKeyboardState(PBYTE lpKeyState)
3743{
3744#ifdef DEBUG
3745 WriteLog("USER32: SetKeyboardState, not implemented\n");
3746#endif
3747 return(TRUE);
3748}
3749//******************************************************************************
3750//******************************************************************************
3751BOOL WIN32API DrawFrameControl(HDC hdc, LPRECT lprc, UINT uType, UINT uState)
3752{
3753#ifdef DEBUG
3754 WriteLog("USER32: DrawFrameControl, not implemented\n");
3755#endif
3756 return(TRUE);
3757}
3758//******************************************************************************
3759//******************************************************************************
3760BOOL WIN32API SendNotifyMessageA(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)
3761{
3762#ifdef DEBUG
3763 WriteLog("USER32: SendNotifyMessageA, not completely implemented\n");
3764#endif
3765 return(SendMessageA(hwnd, Msg, wParam, lParam));
3766}
3767//******************************************************************************
3768//******************************************************************************
3769BOOL WIN32API SendNotifyMessageW(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)
3770{
3771#ifdef DEBUG
3772 WriteLog("USER32: SendNotifyMessageW, not completely implemented\n");
3773#endif
3774 return(SendMessageA(hwnd, Msg, wParam, lParam));
3775}
3776//******************************************************************************
3777//2nd parameter not used according to SDK (yet?)
3778//******************************************************************************
3779VOID WIN32API SetLastErrorEx(DWORD dwErrCode, DWORD dwType)
3780{
3781#ifdef DEBUG
3782 WriteLog("USER32: SetLastErrorEx\n");
3783#endif
3784 SetLastError(dwErrCode);
3785}
3786//******************************************************************************
3787//******************************************************************************
3788LPARAM WIN32API SetMessageExtraInfo(LPARAM lParam)
3789{
3790#ifdef DEBUG
3791 WriteLog("USER32: SetMessageExtraInfo, not implemented\n");
3792#endif
3793 return(0);
3794}
3795//******************************************************************************
3796//******************************************************************************
3797BOOL WIN32API ActivateKeyboardLayout(HKL hkl, UINT fuFlags)
3798{
3799#ifdef DEBUG
3800 WriteLog("USER32: ActivateKeyboardLayout, not implemented\n");
3801#endif
3802 return(TRUE);
3803}
3804//******************************************************************************
3805//******************************************************************************
3806int WIN32API GetKeyboardLayoutList(int nBuff, HKL *lpList)
3807{
3808#ifdef DEBUG
3809 WriteLog("USER32: GetKeyboardLayoutList, not implemented\n");
3810#endif
3811 return(0);
3812}
3813//******************************************************************************
3814//******************************************************************************
3815HKL WIN32API GetKeyboardLayout(DWORD dwLayout)
3816{
3817#ifdef DEBUG
3818 WriteLog("USER32: GetKeyboardLayout, not implemented\n");
3819#endif
3820 return(0);
3821}
3822//******************************************************************************
3823//******************************************************************************
3824int WIN32API LookupIconIdFromDirectory(PBYTE presbits, BOOL fIcon)
3825{
3826#ifdef DEBUG
3827 WriteLog("USER32: LookupIconIdFromDirectory, not implemented\n");
3828#endif
3829 return(0);
3830}
3831//******************************************************************************
3832//******************************************************************************
3833int WIN32API LookupIconIdFromDirectoryEx(PBYTE presbits, BOOL fIcon,
3834 int cxDesired, int cyDesired,
3835 UINT Flags)
3836{
3837#ifdef DEBUG
3838 WriteLog("USER32: LookupIconIdFromDirectoryEx, not implemented\n");
3839#endif
3840 return(0);
3841}
3842//******************************************************************************
3843//DWORD idAttach; /* thread to attach */
3844//DWORD idAttachTo; /* thread to attach to */
3845//BOOL fAttach; /* attach or detach */
3846//******************************************************************************
3847BOOL WIN32API AttachThreadInput(DWORD idAttach, DWORD idAttachTo, BOOL fAttach)
3848{
3849#ifdef DEBUG
3850 WriteLog("USER32: AttachThreadInput, not implemented\n");
3851#endif
3852 return(TRUE);
3853}
3854//******************************************************************************
3855//******************************************************************************
3856BOOL WIN32API RegisterHotKey(HWND hwnd, int idHotKey, UINT fuModifiers, UINT uVirtKey)
3857{
3858#ifdef DEBUG
3859 WriteLog("USER32: RegisterHotKey, not implemented\n");
3860#endif
3861 return(TRUE);
3862}
3863//******************************************************************************
3864//******************************************************************************
3865BOOL WIN32API UnregisterHotKey(HWND hwnd, int idHotKey)
3866{
3867#ifdef DEBUG
3868 WriteLog("USER32: UnregisterHotKey, not implemented\n");
3869#endif
3870 return(TRUE);
3871}
3872//******************************************************************************
3873//******************************************************************************
3874BOOL WIN32API DrawStateA(HDC hdc, HBRUSH hbc, DRAWSTATEPROC lpOutputFunc,
3875 LPARAM lData, WPARAM wData, int x, int y, int cx,
3876 int cy, UINT fuFlags)
3877{
3878#ifdef DEBUG
3879 WriteLog("USER32: DrawStateA, not implemented\n");
3880#endif
3881 return(TRUE);
3882}
3883//******************************************************************************
3884//******************************************************************************
3885//******************************************************************************
3886//******************************************************************************
3887BOOL WIN32API SetWindowContextHelpId(HWND hwnd, DWORD dwContextHelpId)
3888{
3889#ifdef DEBUG
3890 WriteLog("USER32: SetWindowContextHelpId, not implemented\n");
3891#endif
3892 return(TRUE);
3893}
3894//******************************************************************************
3895//******************************************************************************
3896DWORD WIN32API GetWindowContextHelpId(HWND hwnd)
3897{
3898#ifdef DEBUG
3899 WriteLog("USER32: GetWindowContextHelpId, not implemented\n");
3900#endif
3901 return(0);
3902}
3903//******************************************************************************
3904//restores iconized window to previous size/position
3905//******************************************************************************
3906BOOL WIN32API OpenIcon(HWND hwnd)
3907{
3908#ifdef DEBUG
3909 WriteLog("USER32: OpenIcon\n");
3910#endif
3911 if(!IsIconic(hwnd))
3912 return FALSE;
3913 ShowWindow(hwnd, SW_SHOWNORMAL);
3914 return TRUE;
3915}
3916//******************************************************************************
3917//******************************************************************************
3918BOOL WIN32API IsWindowUnicode(HWND hwnd)
3919{
3920#ifdef DEBUG
3921 WriteLog("USER32: IsWindowUnicode, not implemented\n");
3922#endif
3923 return(FALSE);
3924}
3925//******************************************************************************
3926//******************************************************************************
3927BOOL WIN32API GetMonitorInfoA(HMONITOR,LPMONITORINFO)
3928{
3929#ifdef DEBUG
3930 WriteLog("USER32: GetMonitorInfoA not supported!!\n");
3931#endif
3932 return(FALSE);
3933}
3934//******************************************************************************
3935//******************************************************************************
3936BOOL WIN32API GetMonitorInfoW(HMONITOR,LPMONITORINFO)
3937{
3938#ifdef DEBUG
3939 WriteLog("USER32: GetMonitorInfoW not supported!!\n");
3940#endif
3941 return(FALSE);
3942}
3943//******************************************************************************
3944//******************************************************************************
3945HMONITOR WIN32API MonitorFromWindow(HWND hwnd, DWORD dwFlags)
3946{
3947#ifdef DEBUG
3948 WriteLog("USER32: MonitorFromWindow not correctly supported??\n");
3949#endif
3950 return(0);
3951}
3952//******************************************************************************
3953//******************************************************************************
3954HMONITOR WIN32API MonitorFromRect(LPRECT rect, DWORD dwFlags)
3955{
3956#ifdef DEBUG
3957 WriteLog("USER32: MonitorFromRect not correctly supported??\n");
3958#endif
3959 return(0);
3960}
3961//******************************************************************************
3962//******************************************************************************
3963HMONITOR WIN32API MonitorFromPoint(POINT point, DWORD dwflags)
3964{
3965#ifdef DEBUG
3966 WriteLog("USER32: MonitorFromPoint not correctly supported??\n");
3967#endif
3968 return(0);
3969}
3970//******************************************************************************
3971//******************************************************************************
3972BOOL WIN32API EnumDisplayMonitors(HDC,LPRECT,MONITORENUMPROC,LPARAM)
3973{
3974#ifdef DEBUG
3975 WriteLog("USER32: EnumDisplayMonitors not supported??\n");
3976#endif
3977 return(FALSE);
3978}
3979//******************************************************************************
3980//******************************************************************************
3981BOOL WIN32API EnumDisplaySettingsA(LPCSTR lpszDeviceName, DWORD iModeNum,
3982 LPDEVMODEA lpDevMode)
3983{
3984#ifdef DEBUG
3985 WriteLog("USER32: EnumDisplaySettingsA FAKED\n");
3986#endif
3987 switch(iModeNum) {
3988 case 0:
3989 lpDevMode->dmBitsPerPel = 16;
3990 lpDevMode->dmPelsWidth = 768;
3991 lpDevMode->dmPelsHeight = 1024;
3992 lpDevMode->dmDisplayFlags = 0;
3993 lpDevMode->dmDisplayFrequency = 70;
3994 break;
3995 case 1:
3996 lpDevMode->dmBitsPerPel = 16;
3997 lpDevMode->dmPelsWidth = 640;
3998 lpDevMode->dmPelsHeight = 480;
3999 lpDevMode->dmDisplayFlags = 0;
4000 lpDevMode->dmDisplayFrequency = 70;
4001 break;
4002 default:
4003 return(FALSE);
4004 }
4005 return(TRUE);
4006}
4007//******************************************************************************
4008//******************************************************************************
4009LONG WIN32API ChangeDisplaySettingsA(LPDEVMODEA lpDevMode, DWORD dwFlags)
4010{
4011#ifdef DEBUG
4012 if(lpDevMode) {
4013 WriteLog("USER32: ChangeDisplaySettingsA FAKED %X\n", dwFlags);
4014 WriteLog("USER32: ChangeDisplaySettingsA lpDevMode->dmBitsPerPel %d\n", lpDevMode->dmBitsPerPel);
4015 WriteLog("USER32: ChangeDisplaySettingsA lpDevMode->dmPelsWidth %d\n", lpDevMode->dmPelsWidth);
4016 WriteLog("USER32: ChangeDisplaySettingsA lpDevMode->dmPelsHeight %d\n", lpDevMode->dmPelsHeight);
4017 }
4018#endif
4019 return(DISP_CHANGE_SUCCESSFUL);
4020}
4021//******************************************************************************
4022//******************************************************************************
4023
4024
4025/*****************************************************************************
4026 * Name : BOOL WIN32API AnyPopup
4027 * Purpose : The AnyPopup function indicates whether an owned, visible,
4028 * top-level pop-up, or overlapped window exists on the screen. The
4029 * function searches the entire Windows screen, not just the calling
4030 * application's client area.
4031 * Parameters: VOID
4032 * Variables :
4033 * Result : If a pop-up window exists, the return value is TRUE even if the
4034 * pop-up window is completely covered by other windows. Otherwise,
4035 * it is FALSE.
4036 * Remark : AnyPopup is a Windows version 1.x function and is retained for
4037 * compatibility purposes. It is generally not useful.
4038 * Status : UNTESTED STUB
4039 *
4040 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4041 *****************************************************************************/
4042
4043BOOL WIN32API AnyPopup(VOID)
4044{
4045 dprintf(("USER32:AnyPopup() not implemented.\n"));
4046
4047 return (FALSE);
4048}
4049
4050
4051/*****************************************************************************
4052 * Name : long WIN32API BroadcastSystemMessage
4053 * Purpose : The BroadcastSystemMessage function sends a message to the given
4054 * recipients. The recipients can be applications, installable
4055 * drivers, Windows-based network drivers, system-level device
4056 * drivers, or any combination of these system components.
4057 * Parameters: DWORD dwFlags,
4058 LPDWORD lpdwRecipients,
4059 UINT uiMessage,
4060 WPARAM wParam,
4061 LPARAM lParam
4062 * Variables :
4063 * Result : If the function succeeds, the return value is a positive value.
4064 * If the function is unable to broadcast the message, the return value is -1.
4065 * If the dwFlags parameter is BSF_QUERY and at least one recipient returned FALSE to the corresponding message, the return value is zero.
4066 * Remark :
4067 * Status : UNTESTED STUB
4068 *
4069 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4070 *****************************************************************************/
4071
4072long WIN32API BroadcastSystemMessage(DWORD dwFlags,
4073 LPDWORD lpdwRecipients,
4074 UINT uiMessage,
4075 WPARAM wParam,
4076 LPARAM lParam)
4077{
4078 dprintf(("USER32:BroadcastSystemMessage(%08xh,%08xh,%08xh,%08xh,%08x) not implemented.\n",
4079 dwFlags,
4080 lpdwRecipients,
4081 uiMessage,
4082 wParam,
4083 lParam));
4084
4085 return (-1);
4086}
4087
4088
4089/*****************************************************************************
4090 * Name : WORD WIN32API CascadeWindows
4091 * Purpose : The CascadeWindows function cascades the specified windows or
4092 * the child windows of the specified parent window.
4093 * Parameters: HWND hwndParent handle of parent window
4094 * UINT wHow types of windows not to arrange
4095 * CONST RECT * lpRect rectangle to arrange windows in
4096 * UINT cKids number of windows to arrange
4097 * const HWND FAR * lpKids array of window handles
4098 * Variables :
4099 * Result : If the function succeeds, the return value is the number of windows arranged.
4100 * If the function fails, the return value is zero.
4101 * Remark :
4102 * Status : UNTESTED STUB
4103 *
4104 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4105 *****************************************************************************/
4106
4107WORD WIN32API CascadeWindows(HWND hwndParent,
4108 UINT wHow,
4109 CONST LPRECT lpRect,
4110 UINT cKids,
4111 const HWND *lpKids)
4112{
4113 dprintf(("USER32:CascadeWindows(%08xh,%u,%08xh,%u,%08x) not implemented.\n",
4114 hwndParent,
4115 wHow,
4116 lpRect,
4117 cKids,
4118 lpKids));
4119
4120 return (0);
4121}
4122
4123
4124/*****************************************************************************
4125 * Name : LONG WIN32API ChangeDisplaySettingsW
4126 * Purpose : The ChangeDisplaySettings function changes the display settings
4127 * to the specified graphics mode.
4128 * Parameters: LPDEVMODEW lpDevModeW
4129 * DWORD dwFlags
4130 * Variables :
4131 * Result : DISP_CHANGE_SUCCESSFUL The settings change was successful.
4132 * DISP_CHANGE_RESTART The computer must be restarted in order for the graphics mode to work.
4133 * DISP_CHANGE_BADFLAGS An invalid set of flags was passed in.
4134 * DISP_CHANGE_FAILED The display driver failed the specified graphics mode.
4135 * DISP_CHANGE_BADMODE The graphics mode is not supported.
4136 * DISP_CHANGE_NOTUPDATED Unable to write settings to the registry.
4137 * Remark :
4138 * Status : UNTESTED STUB
4139 *
4140 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4141 *****************************************************************************/
4142
4143LONG WIN32API ChangeDisplaySettingsW(LPDEVMODEW lpDevMode,
4144 DWORD dwFlags)
4145{
4146 dprintf(("USER32:ChangeDisplaySettingsW(%08xh,%08x) not implemented.\n",
4147 lpDevMode,
4148 dwFlags));
4149
4150 return (ChangeDisplaySettingsA((LPDEVMODEA)lpDevMode,
4151 dwFlags));
4152}
4153
4154/*****************************************************************************
4155 * Name : BOOL WIN32API CloseDesktop
4156 * Purpose : The CloseDesktop function closes an open handle of a desktop
4157 * object. A desktop is a secure object contained within a window
4158 * station object. A desktop has a logical display surface and
4159 * contains windows, menus and hooks.
4160 * Parameters: HDESK hDesktop
4161 * Variables :
4162 * Result : If the function succeeds, the return value is TRUE.
4163 * If the functions fails, the return value is FALSE. To get
4164 * extended error information, call GetLastError.
4165 * Remark :
4166 * Status : UNTESTED STUB
4167 *
4168 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4169 *****************************************************************************/
4170
4171BOOL WIN32API CloseDesktop(HDESK hDesktop)
4172{
4173 dprintf(("USER32:CloseDesktop(%08x) not implemented.\n",
4174 hDesktop));
4175
4176 return (FALSE);
4177}
4178
4179
4180/*****************************************************************************
4181 * Name : BOOL WIN32API CloseWindowStation
4182 * Purpose : The CloseWindowStation function closes an open window station handle.
4183 * Parameters: HWINSTA hWinSta
4184 * Variables :
4185 * Result :
4186 * Remark : If the function succeeds, the return value is TRUE.
4187 * If the functions fails, the return value is FALSE. To get
4188 * extended error information, call GetLastError.
4189 * Status : UNTESTED STUB
4190 *
4191 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4192 *****************************************************************************/
4193
4194BOOL WIN32API CloseWindowStation(HWINSTA hWinSta)
4195{
4196 dprintf(("USER32:CloseWindowStation(%08x) not implemented.\n",
4197 hWinSta));
4198
4199 return (FALSE);
4200}
4201
4202
4203/*****************************************************************************
4204 * Name : HDESK WIN32API CreateDesktopA
4205 * Purpose : The CreateDesktop function creates a new desktop on the window
4206 * station associated with the calling process.
4207 * Parameters: LPCTSTR lpszDesktop name of the new desktop
4208 * LPCTSTR lpszDevice name of display device to assign to the desktop
4209 * LPDEVMODE pDevMode reserved; must be NULL
4210 * DWORD dwFlags flags to control interaction with other applications
4211 * DWORD dwDesiredAccess specifies access of returned handle
4212 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the desktop
4213 * Variables :
4214 * Result : If the function succeeds, the return value is a handle of the
4215 * newly created desktop.
4216 * If the function fails, the return value is NULL. To get extended
4217 * error information, call GetLastError.
4218 * Remark :
4219 * Status : UNTESTED STUB
4220 *
4221 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4222 *****************************************************************************/
4223
4224HDESK WIN32API CreateDesktopA(LPCTSTR lpszDesktop,
4225 LPCTSTR lpszDevice,
4226 LPDEVMODEA pDevMode,
4227 DWORD dwFlags,
4228 DWORD dwDesiredAccess,
4229 LPSECURITY_ATTRIBUTES lpsa)
4230{
4231 dprintf(("USER32:CreateDesktopA(%s,%s,%08xh,%08xh,%08xh,%08x) not implemented.\n",
4232 lpszDesktop,
4233 lpszDevice,
4234 pDevMode,
4235 dwFlags,
4236 dwDesiredAccess,
4237 lpsa));
4238
4239 return (NULL);
4240}
4241
4242
4243/*****************************************************************************
4244 * Name : HDESK WIN32API CreateDesktopW
4245 * Purpose : The CreateDesktop function creates a new desktop on the window
4246 * station associated with the calling process.
4247 * Parameters: LPCTSTR lpszDesktop name of the new desktop
4248 * LPCTSTR lpszDevice name of display device to assign to the desktop
4249 * LPDEVMODE pDevMode reserved; must be NULL
4250 * DWORD dwFlags flags to control interaction with other applications
4251 * DWORD dwDesiredAccess specifies access of returned handle
4252 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the desktop
4253 * Variables :
4254 * Result : If the function succeeds, the return value is a handle of the
4255 * newly created desktop.
4256 * If the function fails, the return value is NULL. To get extended
4257 * error information, call GetLastError.
4258 * Remark :
4259 * Status : UNTESTED STUB
4260 *
4261 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4262 *****************************************************************************/
4263
4264HDESK WIN32API CreateDesktopW(LPCTSTR lpszDesktop,
4265 LPCTSTR lpszDevice,
4266 LPDEVMODEW pDevMode,
4267 DWORD dwFlags,
4268 DWORD dwDesiredAccess,
4269 LPSECURITY_ATTRIBUTES lpsa)
4270{
4271 dprintf(("USER32:CreateDesktopW(%s,%s,%08xh,%08xh,%08xh,%08x) not implemented.\n",
4272 lpszDesktop,
4273 lpszDevice,
4274 pDevMode,
4275 dwFlags,
4276 dwDesiredAccess,
4277 lpsa));
4278
4279 return (NULL);
4280}
4281
4282
4283/*****************************************************************************
4284 * Name : HWINSTA WIN32API CreateWindowStationA
4285 * Purpose : The CreateWindowStation function creates a window station object.
4286 * It returns a handle that can be used to access the window station.
4287 * A window station is a secure object that contains a set of global
4288 * atoms, a clipboard, and a set of desktop objects.
4289 * Parameters: LPTSTR lpwinsta name of the new window station
4290 * DWORD dwReserved reserved; must be NULL
4291 * DWORD dwDesiredAccess specifies access of returned handle
4292 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the window station
4293 * Variables :
4294 * Result : If the function succeeds, the return value is the handle to the
4295 * newly created window station.
4296 * If the function fails, the return value is NULL. To get extended
4297 * error information, call GetLastError.
4298 * Remark :
4299 * Status : UNTESTED STUB
4300 *
4301 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4302 *****************************************************************************/
4303
4304HWINSTA WIN32API CreateWindowStationA(LPTSTR lpWinSta,
4305 DWORD dwReserved,
4306 DWORD dwDesiredAccess,
4307 LPSECURITY_ATTRIBUTES lpsa)
4308{
4309 dprintf(("USER32:CreateWindowStationA(%s,%08xh,%08xh,%08x) not implemented.\n",
4310 lpWinSta,
4311 dwReserved,
4312 dwDesiredAccess,
4313 lpsa));
4314
4315 return (NULL);
4316}
4317
4318
4319/*****************************************************************************
4320 * Name : HWINSTA WIN32API CreateWindowStationW
4321 * Purpose : The CreateWindowStation function creates a window station object.
4322 * It returns a handle that can be used to access the window station.
4323 * A window station is a secure object that contains a set of global
4324 * atoms, a clipboard, and a set of desktop objects.
4325 * Parameters: LPTSTR lpwinsta name of the new window station
4326 * DWORD dwReserved reserved; must be NULL
4327 * DWORD dwDesiredAccess specifies access of returned handle
4328 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the window station
4329 * Variables :
4330 * Result : If the function succeeds, the return value is the handle to the
4331 * newly created window station.
4332 * If the function fails, the return value is NULL. To get extended
4333 * error information, call GetLastError.
4334 * Remark :
4335 * Status : UNTESTED STUB
4336 *
4337 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4338 *****************************************************************************/
4339
4340HWINSTA WIN32API CreateWindowStationW(LPWSTR lpWinSta,
4341 DWORD dwReserved,
4342 DWORD dwDesiredAccess,
4343 LPSECURITY_ATTRIBUTES lpsa)
4344{
4345 dprintf(("USER32:CreateWindowStationW(%s,%08xh,%08xh,%08x) not implemented.\n",
4346 lpWinSta,
4347 dwReserved,
4348 dwDesiredAccess,
4349 lpsa));
4350
4351 return (NULL);
4352}
4353
4354/*****************************************************************************
4355 * Name : BOOL WIN32API DragDetect
4356 * Purpose : The DragDetect function captures the mouse and tracks its movement
4357 * Parameters: HWND hwnd
4358 * POINT pt
4359 * Variables :
4360 * Result : If the user moved the mouse outside of the drag rectangle while
4361 * holding the left button down, the return value is TRUE.
4362 * If the user did not move the mouse outside of the drag rectangle
4363 * while holding the left button down, the return value is FALSE.
4364 * Remark :
4365 * Status : UNTESTED STUB
4366 *
4367 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4368 *****************************************************************************/
4369
4370BOOL WIN32API DragDetect(HWND hwnd,
4371 POINT pt)
4372{
4373 dprintf(("USER32:DragDetect(%08xh,...) not implemented.\n",
4374 hwnd));
4375
4376 return (FALSE);
4377}
4378
4379
4380/*****************************************************************************
4381 * Name : BOOL WIN32API DrawAnimatedRects
4382 * Purpose : The DrawAnimatedRects function draws a wire-frame rectangle
4383 * and animates it to indicate the opening of an icon or the
4384 * minimizing or maximizing of a window.
4385 * Parameters: HWND hwnd handle of clipping window
4386 * int idAni type of animation
4387 * CONST RECT * lprcFrom address of rectangle coordinates (minimized)
4388 * CONST RECT * lprcTo address of rectangle coordinates (restored)
4389 * Variables :
4390 * Result : If the function succeeds, the return value is TRUE.
4391 * If the function fails, the return value is FALSE.
4392 * Remark :
4393 * Status : UNTESTED STUB
4394 *
4395 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4396 *****************************************************************************/
4397
4398BOOL WIN32API DrawAnimatedRects(HWND hwnd,
4399 int idAni,
4400 CONST RECT *lprcFrom,
4401 CONST RECT *lprcTo)
4402{
4403 dprintf(("USER32:DrawAnimatedRects (%08xh,%u,%08xh,%08x) not implemented.\n",
4404 hwnd,
4405 idAni,
4406 lprcFrom,
4407 lprcTo));
4408
4409 return (TRUE);
4410}
4411
4412
4413/*****************************************************************************
4414 * Name : VOID WIN32API DrawCaption
4415 * Purpose : The DrawCaption function draws a window caption.
4416 * Parameters: HDC hdc handle of device context
4417 * LPRECT lprc address of bounding rectangle coordinates
4418 * HFONT hfont handle of font for caption
4419 * HICON hicon handle of icon in caption
4420 * LPSTR lpszText address of caption string
4421 * WORD wFlags drawing options
4422 * Variables :
4423 * Result :
4424 * Remark :
4425 * Status : UNTESTED STUB
4426 *
4427 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4428 *****************************************************************************/
4429
4430BOOL WIN32API DrawCaption (HWND hwnd,
4431 HDC hdc,
4432 const RECT *lprc,
4433 UINT wFlags)
4434{
4435 dprintf(("USER32:DrawCaption (%08xh,%08xh,%08xh,%08xh) not implemented.\n",
4436 hwnd,
4437 hdc,
4438 lprc,
4439 wFlags));
4440
4441 return FALSE;
4442}
4443
4444
4445/*****************************************************************************
4446 * Name :
4447 * Purpose :
4448 * Parameters:
4449 * Variables :
4450 * Result :
4451 * Remark :
4452 * Status : UNTESTED STUB
4453 *
4454 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4455 *****************************************************************************/
4456
4457BOOL WIN32API DrawStateW(HDC hdc,
4458 HBRUSH hBrush,
4459 DRAWSTATEPROC lpOutputFunc,
4460 LPARAM lParam,
4461 WPARAM wParam,
4462 int x,
4463 int y,
4464 int cx,
4465 int cy,
4466 UINT fuFlags)
4467{
4468 dprintf(("USER32:DrawStateW (%08xh,%08xh,%08xh,%08xh,%08xh,%d,%d,%d,%d,%08x) not implemented.\n",
4469 hdc,
4470 hBrush,
4471 lpOutputFunc,
4472 lParam,
4473 wParam,
4474 x,
4475 y,
4476 cx,
4477 cy,
4478 fuFlags));
4479
4480 return(DrawStateA(hdc,
4481 hBrush,
4482 lpOutputFunc,
4483 lParam,
4484 wParam,
4485 x,
4486 y,
4487 cx,
4488 cy,
4489 fuFlags));
4490}
4491
4492
4493/*****************************************************************************
4494 * Name : BOOL WIN32API EnumDesktopWindows
4495 * Purpose : The EnumDesktopWindows function enumerates all windows in a
4496 * desktop by passing the handle of each window, in turn, to an
4497 * application-defined callback function.
4498 * Parameters: HDESK hDesktop handle of desktop to enumerate
4499 * WNDENUMPROC lpfn points to application's callback function
4500 * LPARAM lParam 32-bit value to pass to the callback function
4501 * Variables :
4502 * Result : If the function succeeds, the return value is TRUE.
4503 * If the function fails, the return value is FALSE. To get
4504 * extended error information, call GetLastError.
4505 * Remark :
4506 * Status : UNTESTED STUB
4507 *
4508 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4509 *****************************************************************************/
4510
4511BOOL WIN32API EnumDesktopWindows(HDESK hDesktop,
4512 WNDENUMPROC lpfn,
4513 LPARAM lParam)
4514{
4515 dprintf(("USER32:EnumDesktopWindows (%08xh,%08xh,%08x) not implemented.\n",
4516 hDesktop,
4517 lpfn,
4518 lParam));
4519
4520 return (FALSE);
4521}
4522
4523
4524/*****************************************************************************
4525 * Name : BOOL WIN32API EnumDesktopsA
4526 * Purpose : The EnumDesktops function enumerates all desktops in the window
4527 * station assigned to the calling process. The function does so by
4528 * passing the name of each desktop, in turn, to an application-
4529 * defined callback function.
4530 * Parameters: HWINSTA hwinsta handle of window station to enumerate
4531 * DESKTOPENUMPROC lpEnumFunc points to application's callback function
4532 * LPARAM lParam 32-bit value to pass to the callback function
4533 * Variables :
4534 * Result : If the function succeeds, the return value is TRUE.
4535 * If the function fails, the return value is FALSE. To get extended
4536 * error information, call GetLastError.
4537 * Remark :
4538 * Status : UNTESTED STUB
4539 *
4540 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4541 *****************************************************************************/
4542
4543BOOL WIN32API EnumDesktopsA(HWINSTA hWinSta,
4544 DESKTOPENUMPROCA lpEnumFunc,
4545 LPARAM lParam)
4546{
4547 dprintf(("USER32:EnumDesktopsA (%08xh,%08xh,%08x) not implemented.\n",
4548 hWinSta,
4549 lpEnumFunc,
4550 lParam));
4551
4552 return (FALSE);
4553}
4554
4555
4556/*****************************************************************************
4557 * Name : BOOL WIN32API EnumDesktopsW
4558 * Purpose : The EnumDesktops function enumerates all desktops in the window
4559 * station assigned to the calling process. The function does so by
4560 * passing the name of each desktop, in turn, to an application-
4561 * defined callback function.
4562 * Parameters: HWINSTA hwinsta handle of window station to enumerate
4563 * DESKTOPENUMPROC lpEnumFunc points to application's callback function
4564 * LPARAM lParam 32-bit value to pass to the callback function
4565 * Variables :
4566 * Result : If the function succeeds, the return value is TRUE.
4567 * If the function fails, the return value is FALSE. To get extended
4568 * error information, call GetLastError.
4569 * Remark :
4570 * Status : UNTESTED STUB
4571 *
4572 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4573 *****************************************************************************/
4574
4575BOOL WIN32API EnumDesktopsW(HWINSTA hWinSta,
4576 DESKTOPENUMPROCW lpEnumFunc,
4577 LPARAM lParam)
4578{
4579 dprintf(("USER32:EnumDesktopsW (%08xh,%08xh,%08x) not implemented.\n",
4580 hWinSta,
4581 lpEnumFunc,
4582 lParam));
4583
4584 return (FALSE);
4585}
4586
4587
4588
4589/*****************************************************************************
4590 * Name : BOOL WIN32API EnumDisplaySettingsW
4591 * Purpose : The EnumDisplaySettings function obtains information about one
4592 * of a display device's graphics modes. You can obtain information
4593 * for all of a display device's graphics modes by making a series
4594 * of calls to this function.
4595 * Parameters: LPCTSTR lpszDeviceName specifies the display device
4596 * DWORD iModeNum specifies the graphics mode
4597 * LPDEVMODE lpDevMode points to structure to receive settings
4598 * Variables :
4599 * Result : If the function succeeds, the return value is TRUE.
4600 * If the function fails, the return value is FALSE.
4601 * Remark :
4602 * Status : UNTESTED STUB
4603 *
4604 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4605 *****************************************************************************/
4606
4607BOOL WIN32API EnumDisplaySettingsW(LPCSTR lpszDeviceName,
4608 DWORD iModeNum,
4609 LPDEVMODEW lpDevMode)
4610{
4611 dprintf(("USER32:EnumDisplaySettingsW (%s,%08xh,%08x) not implemented.\n",
4612 lpszDeviceName,
4613 iModeNum,
4614 lpDevMode));
4615
4616 return (EnumDisplaySettingsA(lpszDeviceName,
4617 iModeNum,
4618 (LPDEVMODEA)lpDevMode));
4619}
4620
4621
4622/*****************************************************************************
4623 * Name : BOOL WIN32API EnumWindowStationsA
4624 * Purpose : The EnumWindowStations function enumerates all windowstations
4625 * in the system by passing the name of each window station, in
4626 * turn, to an application-defined callback function.
4627 * Parameters:
4628 * Variables : WINSTAENUMPROC lpEnumFunc points to application's callback function
4629 * LPARAM lParam 32-bit value to pass to the callback function
4630 * Result : If the function succeeds, the return value is TRUE.
4631 * If the function fails the return value is FALSE. To get extended
4632 * error information, call GetLastError.
4633 * Remark :
4634 * Status : UNTESTED STUB
4635 *
4636 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4637 *****************************************************************************/
4638
4639BOOL WIN32API EnumWindowStationsA(WINSTAENUMPROCA lpEnumFunc,
4640 LPARAM lParam)
4641{
4642 dprintf(("USER32:EnumWindowStationsA (%08xh,%08x) not implemented.\n",
4643 lpEnumFunc,
4644 lParam));
4645
4646 return (FALSE);
4647}
4648
4649
4650/*****************************************************************************
4651 * Name : BOOL WIN32API EnumWindowStationsW
4652 * Purpose : The EnumWindowStations function enumerates all windowstations
4653 * in the system by passing the name of each window station, in
4654 * turn, to an application-defined callback function.
4655 * Parameters:
4656 * Variables : WINSTAENUMPROC lpEnumFunc points to application's callback function
4657 * LPARAM lParam 32-bit value to pass to the callback function
4658 * Result : If the function succeeds, the return value is TRUE.
4659 * If the function fails the return value is FALSE. To get extended
4660 * error information, call GetLastError.
4661 * Remark :
4662 * Status : UNTESTED STUB
4663 *
4664 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4665 *****************************************************************************/
4666
4667BOOL WIN32API EnumWindowStationsW(WINSTAENUMPROCW lpEnumFunc,
4668 LPARAM lParam)
4669{
4670 dprintf(("USER32:EnumWindowStationsW (%08xh,%08x) not implemented.\n",
4671 lpEnumFunc,
4672 lParam));
4673
4674 return (FALSE);
4675}
4676
4677
4678/*****************************************************************************
4679 * Name : HWND WIN32API FindWindowExW
4680 * Purpose : The FindWindowEx function retrieves the handle of a window whose
4681 * class name and window name match the specified strings. The
4682 * function searches child windows, beginning with the one following
4683 * the given child window.
4684 * Parameters: HWND hwndParent handle of parent window
4685 * HWND hwndChildAfter handle of a child window
4686 * LPCTSTR lpszClass address of class name
4687 * LPCTSTR lpszWindow address of window name
4688 * Variables :
4689 * Result : If the function succeeds, the return value is the handle of the
4690 * window that has the specified class and window names.
4691 * If the function fails, the return value is NULL. To get extended
4692 * error information, call GetLastError.
4693 * Remark :
4694 * Status : UNTESTED STUB
4695 *
4696 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4697 *****************************************************************************/
4698
4699HWND WIN32API FindWindowExW(HWND hwndParent,
4700 HWND hwndChildAfter,
4701 LPCWSTR lpszClass,
4702 LPCWSTR lpszWindow)
4703{
4704 dprintf(("USER32:FindWindowExW (%08xh,%08xh,%s,%s) not implemented.\n",
4705 hwndParent,
4706 hwndChildAfter,
4707 lpszClass,
4708 lpszWindow));
4709
4710 return (NULL);
4711}
4712
4713/*****************************************************************************
4714 * Name : BOOL WIN32API GetInputState
4715 * Purpose : The GetInputState function determines whether there are
4716 * mouse-button or keyboard messages in the calling thread's message queue.
4717 * Parameters:
4718 * Variables :
4719 * Result : If the queue contains one or more new mouse-button or keyboard
4720 * messages, the return value is TRUE.
4721 * If the function fails, the return value is FALSE.
4722 * Remark :
4723 * Status : UNTESTED STUB
4724 *
4725 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4726 *****************************************************************************/
4727
4728BOOL WIN32API GetInputState(VOID)
4729{
4730 dprintf(("USER32:GetInputState () not implemented.\n"));
4731
4732 return (FALSE);
4733}
4734
4735
4736/*****************************************************************************
4737 * Name : UINT WIN32API GetKBCodePage
4738 * Purpose : The GetKBCodePage function is provided for compatibility with
4739 * earlier versions of Windows. In the Win32 application programming
4740 * interface (API) it just calls the GetOEMCP function.
4741 * Parameters:
4742 * Variables :
4743 * Result : If the function succeeds, the return value is an OEM code-page
4744 * identifier, or it is the default identifier if the registry
4745 * value is not readable. For a list of OEM code-page identifiers,
4746 * see GetOEMCP.
4747 * Remark :
4748 * Status : UNTESTED
4749 *
4750 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4751 *****************************************************************************/
4752
4753UINT WIN32API GetKBCodePage(VOID)
4754{
4755 return (GetOEMCP());
4756}
4757
4758
4759/*****************************************************************************
4760 * Name : BOOL WIN32API GetKeyboardLayoutNameA
4761 * Purpose : The GetKeyboardLayoutName function retrieves the name of the
4762 * active keyboard layout.
4763 * Parameters: LPTSTR pwszKLID address of buffer for layout name
4764 * Variables :
4765 * Result : If the function succeeds, the return value is TRUE.
4766 * If the function fails, the return value is FALSE. To get extended
4767 * error information, call GetLastError.
4768 * Remark :
4769 * Status : UNTESTED STUB
4770 *
4771 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4772 *****************************************************************************/
4773
4774BOOL WIN32API GetKeyboardLayoutNameA(LPTSTR pwszKLID)
4775{
4776 dprintf(("USER32:GetKeyboardLayoutNameA (%08x) not implemented.",
4777 pwszKLID));
4778
4779 return(FALSE);
4780}
4781
4782
4783/*****************************************************************************
4784 * Name : BOOL WIN32API GetKeyboardLayoutNameW
4785 * Purpose : The GetKeyboardLayoutName function retrieves the name of the
4786 * active keyboard layout.
4787 * Parameters: LPTSTR pwszKLID address of buffer for layout name
4788 * Variables :
4789 * Result : If the function succeeds, the return value is TRUE.
4790 * If the function fails, the return value is FALSE. To get extended
4791 * error information, call GetLastError.
4792 * Remark :
4793 * Status : UNTESTED STUB
4794 *
4795 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4796 *****************************************************************************/
4797
4798BOOL WIN32API GetKeyboardLayoutNameW(LPWSTR pwszKLID)
4799{
4800 dprintf(("USER32:GetKeyboardLayoutNameW (%08x) not implemented.",
4801 pwszKLID));
4802
4803 return(FALSE);
4804}
4805
4806
4807
4808
4809/*****************************************************************************
4810 * Name : HWINSTA WIN32API GetProcessWindowStation
4811 * Purpose : The GetProcessWindowStation function returns a handle of the
4812 * window station associated with the calling process.
4813 * Parameters:
4814 * Variables :
4815 * Result : If the function succeeds, the return value is a handle of the
4816 * window station associated with the calling process.
4817 * If the function fails, the return value is NULL. This can occur
4818 * if the calling process is not an application written for Windows
4819 * NT. To get extended error information, call GetLastError.
4820 * Remark :
4821 * Status : UNTESTED STUB
4822 *
4823 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4824 *****************************************************************************/
4825
4826HWINSTA WIN32API GetProcessWindowStation(VOID)
4827{
4828 dprintf(("USER32:GetProcessWindowStation () not implemented.\n"));
4829
4830 return (NULL);
4831}
4832
4833
4834
4835/*****************************************************************************
4836 * Name : HDESK WIN32API GetThreadDesktop
4837 * Purpose : The GetThreadDesktop function returns a handle to the desktop
4838 * associated with a specified thread.
4839 * Parameters: DWORD dwThreadId thread identifier
4840 * Variables :
4841 * Result : If the function succeeds, the return value is the handle of the
4842 * desktop associated with the specified thread.
4843 * Remark :
4844 * Status : UNTESTED STUB
4845 *
4846 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4847 *****************************************************************************/
4848
4849HDESK WIN32API GetThreadDesktop(DWORD dwThreadId)
4850{
4851 dprintf(("USER32:GetThreadDesktop (%u) not implemented.\n",
4852 dwThreadId));
4853
4854 return (NULL);
4855}
4856
4857
4858/*****************************************************************************
4859 * Name : BOOL WIN32API GetUserObjectInformationA
4860 * Purpose : The GetUserObjectInformation function returns information about
4861 * a window station or desktop object.
4862 * Parameters: HANDLE hObj handle of object to get information for
4863 * int nIndex type of information to get
4864 * PVOID pvInfo points to buffer that receives the information
4865 * DWORD nLength size, in bytes, of pvInfo buffer
4866 * LPDWORD lpnLengthNeeded receives required size, in bytes, of pvInfo buffer
4867 * Variables :
4868 * Result : If the function succeeds, the return value is TRUE.
4869 * If the function fails, the return value is FALSE. To get extended
4870 * error information, call GetLastError.
4871 * Remark :
4872 * Status : UNTESTED STUB
4873 *
4874 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4875 *****************************************************************************/
4876
4877BOOL WIN32API GetUserObjectInformationA(HANDLE hObj,
4878 int nIndex,
4879 PVOID pvInfo,
4880 DWORD nLength,
4881 LPDWORD lpnLengthNeeded)
4882{
4883 dprintf(("USER32:GetUserObjectInformationA (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
4884 hObj,
4885 nIndex,
4886 pvInfo,
4887 nLength,
4888 lpnLengthNeeded));
4889
4890 return (FALSE);
4891}
4892
4893
4894/*****************************************************************************
4895 * Name : BOOL WIN32API GetUserObjectInformationW
4896 * Purpose : The GetUserObjectInformation function returns information about
4897 * a window station or desktop object.
4898 * Parameters: HANDLE hObj handle of object to get information for
4899 * int nIndex type of information to get
4900 * PVOID pvInfo points to buffer that receives the information
4901 * DWORD nLength size, in bytes, of pvInfo buffer
4902 * LPDWORD lpnLengthNeeded receives required size, in bytes, of pvInfo buffer
4903 * Variables :
4904 * Result : If the function succeeds, the return value is TRUE.
4905 * If the function fails, the return value is FALSE. To get extended
4906 * error information, call GetLastError.
4907 * Remark :
4908 * Status : UNTESTED STUB
4909 *
4910 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4911 *****************************************************************************/
4912
4913BOOL WIN32API GetUserObjectInformationW(HANDLE hObj,
4914 int nIndex,
4915 PVOID pvInfo,
4916 DWORD nLength,
4917 LPDWORD lpnLengthNeeded)
4918{
4919 dprintf(("USER32:GetUserObjectInformationW (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
4920 hObj,
4921 nIndex,
4922 pvInfo,
4923 nLength,
4924 lpnLengthNeeded));
4925
4926 return (FALSE);
4927}
4928
4929
4930/*****************************************************************************
4931 * Name : BOOL WIN32API GetUserObjectSecurity
4932 * Purpose : The GetUserObjectSecurity function retrieves security information
4933 * for the specified user object.
4934 * Parameters: HANDLE hObj handle of user object
4935 * SECURITY_INFORMATION * pSIRequested address of requested security information
4936 * LPSECURITY_DESCRIPTOR pSID address of security descriptor
4937 * DWORD nLength size of buffer for security descriptor
4938 * LPDWORD lpnLengthNeeded address of required size of buffer
4939 * Variables :
4940 * Result : If the function succeeds, the return value is TRUE.
4941 * If the function fails, the return value is FALSE. To get extended
4942 * error information, call GetLastError.
4943 * Remark :
4944 * Status : UNTESTED STUB
4945 *
4946 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4947 *****************************************************************************/
4948
4949BOOL WIN32API GetUserObjectSecurity(HANDLE hObj,
4950 SECURITY_INFORMATION * pSIRequested,
4951 LPSECURITY_DESCRIPTOR pSID,
4952 DWORD nLength,
4953 LPDWORD lpnLengthNeeded)
4954{
4955 dprintf(("USER32:GetUserObjectSecurity (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
4956 hObj,
4957 pSIRequested,
4958 pSID,
4959 nLength,
4960 lpnLengthNeeded));
4961
4962 return (FALSE);
4963}
4964
4965
4966
4967/*****************************************************************************
4968 * Name : int WIN32API GetWindowRgn
4969 * Purpose : The GetWindowRgn function obtains a copy of the window region of a window.
4970 * Parameters: HWND hWnd handle to window whose window region is to be obtained
4971 * HRGN hRgn handle to region that receives a copy of the window region
4972 * Variables :
4973 * Result : NULLREGION, SIMPLEREGION, COMPLEXREGION, ERROR
4974 * Remark :
4975 * Status : UNTESTED STUB
4976 *
4977 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4978 *****************************************************************************/
4979
4980int WIN32API GetWindowRgn (HWND hWnd,
4981 HRGN hRgn)
4982{
4983 dprintf(("USER32:GetWindowRgn (%08xh,%08x) not implemented.\n",
4984 hWnd,
4985 hRgn));
4986
4987 return (NULLREGION);
4988}
4989
4990
4991
4992/*****************************************************************************
4993 * Name : HCURSOR WIN32API LoadCursorFromFileA
4994 * Purpose : The LoadCursorFromFile function creates a cursor based on data
4995 * contained in a file. The file is specified by its name or by a
4996 * system cursor identifier. The function returns a handle to the
4997 * newly created cursor. Files containing cursor data may be in
4998 * either cursor (.CUR) or animated cursor (.ANI) format.
4999 * Parameters: LPCTSTR lpFileName pointer to cursor file, or system cursor id
5000 * Variables :
5001 * Result : If the function is successful, the return value is a handle to
5002 * the new cursor.
5003 * If the function fails, the return value is NULL. To get extended
5004 * error information, call GetLastError. GetLastError may return
5005 * the following
5006 * Remark :
5007 * Status : UNTESTED STUB
5008 *
5009 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5010 *****************************************************************************/
5011
5012HCURSOR WIN32API LoadCursorFromFileA(LPCTSTR lpFileName)
5013{
5014 dprintf(("USER32:LoadCursorFromFileA (%s) not implemented.\n",
5015 lpFileName));
5016
5017 return (NULL);
5018}
5019
5020
5021/*****************************************************************************
5022 * Name : HCURSOR WIN32API LoadCursorFromFileW
5023 * Purpose : The LoadCursorFromFile function creates a cursor based on data
5024 * contained in a file. The file is specified by its name or by a
5025 * system cursor identifier. The function returns a handle to the
5026 * newly created cursor. Files containing cursor data may be in
5027 * either cursor (.CUR) or animated cursor (.ANI) format.
5028 * Parameters: LPCTSTR lpFileName pointer to cursor file, or system cursor id
5029 * Variables :
5030 * Result : If the function is successful, the return value is a handle to
5031 * the new cursor.
5032 * If the function fails, the return value is NULL. To get extended
5033 * error information, call GetLastError. GetLastError may return
5034 * the following
5035 * Remark :
5036 * Status : UNTESTED STUB
5037 *
5038 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5039 *****************************************************************************/
5040
5041HCURSOR WIN32API LoadCursorFromFileW(LPCWSTR lpFileName)
5042{
5043 dprintf(("USER32:LoadCursorFromFileW (%s) not implemented.\n",
5044 lpFileName));
5045
5046 return (NULL);
5047}
5048
5049
5050/*****************************************************************************
5051 * Name : HLK WIN32API LoadKeyboardLayoutA
5052 * Purpose : The LoadKeyboardLayout function loads a new keyboard layout into
5053 * the system. Several keyboard layouts can be loaded at a time, but
5054 * only one per process is active at a time. Loading multiple keyboard
5055 * layouts makes it possible to rapidly switch between layouts.
5056 * Parameters:
5057 * Variables :
5058 * Result : If the function succeeds, the return value is the handle of the
5059 * keyboard layout.
5060 * If the function fails, the return value is NULL. To get extended
5061 * error information, call GetLastError.
5062 * Remark :
5063 * Status : UNTESTED STUB
5064 *
5065 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5066 *****************************************************************************/
5067
5068HKL WIN32API LoadKeyboardLayoutA(LPCTSTR pwszKLID,
5069 UINT Flags)
5070{
5071 dprintf(("USER32:LeadKeyboardLayoutA (%s,%u) not implemented.\n",
5072 pwszKLID,
5073 Flags));
5074
5075 return (NULL);
5076}
5077
5078
5079/*****************************************************************************
5080 * Name : HLK WIN32API LoadKeyboardLayoutW
5081 * Purpose : The LoadKeyboardLayout function loads a new keyboard layout into
5082 * the system. Several keyboard layouts can be loaded at a time, but
5083 * only one per process is active at a time. Loading multiple keyboard
5084 * layouts makes it possible to rapidly switch between layouts.
5085 * Parameters:
5086 * Variables :
5087 * Result : If the function succeeds, the return value is the handle of the
5088 * keyboard layout.
5089 * If the function fails, the return value is NULL. To get extended
5090 * error information, call GetLastError.
5091 * Remark :
5092 * Status : UNTESTED STUB
5093 *
5094 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5095 *****************************************************************************/
5096
5097HKL WIN32API LoadKeyboardLayoutW(LPCWSTR pwszKLID,
5098 UINT Flags)
5099{
5100 dprintf(("USER32:LeadKeyboardLayoutW (%s,%u) not implemented.\n",
5101 pwszKLID,
5102 Flags));
5103
5104 return (NULL);
5105}
5106
5107
5108/*****************************************************************************
5109 * Name : UINT WIN32API MapVirtualKeyExA
5110 * Purpose : The MapVirtualKeyEx function translates (maps) a virtual-key
5111 * code into a scan code or character value, or translates a scan
5112 * code into a virtual-key code. The function translates the codes
5113 * using the input language and physical keyboard layout identified
5114 * by the given keyboard layout handle.
5115 * Parameters:
5116 * Variables :
5117 * Result : The return value is either a scan code, a virtual-key code, or
5118 * a character value, depending on the value of uCode and uMapType.
5119 * If there is no translation, the return value is zero.
5120 * Remark :
5121 * Status : UNTESTED STUB
5122 *
5123 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5124 *****************************************************************************/
5125
5126UINT WIN32API MapVirtualKeyExA(UINT uCode,
5127 UINT uMapType,
5128 HKL dwhkl)
5129{
5130 dprintf(("USER32:MapVirtualKeyExA (%u,%u,%08x) not implemented.\n",
5131 uCode,
5132 uMapType,
5133 dwhkl));
5134
5135 return (0);
5136}
5137
5138
5139/*****************************************************************************
5140 * Name : UINT WIN32API MapVirtualKeyExW
5141 * Purpose : The MapVirtualKeyEx function translates (maps) a virtual-key
5142 * code into a scan code or character value, or translates a scan
5143 * code into a virtual-key code. The function translates the codes
5144 * using the input language and physical keyboard layout identified
5145 * by the given keyboard layout handle.
5146 * Parameters:
5147 * Variables :
5148 * Result : The return value is either a scan code, a virtual-key code, or
5149 * a character value, depending on the value of uCode and uMapType.
5150 * If there is no translation, the return value is zero.
5151 * Remark :
5152 * Status : UNTESTED STUB
5153 *
5154 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5155 *****************************************************************************/
5156
5157UINT WIN32API MapVirtualKeyExW(UINT uCode,
5158 UINT uMapType,
5159 HKL dwhkl)
5160{
5161 dprintf(("USER32:MapVirtualKeyExW (%u,%u,%08x) not implemented.\n",
5162 uCode,
5163 uMapType,
5164 dwhkl));
5165
5166 return (0);
5167}
5168
5169
5170/*****************************************************************************
5171 * Name : int WIN32API MessageBoxExA
5172 * Purpose : The MessageBoxEx function creates, displays, and operates a message box.
5173 * Parameters: HWND hWnd handle of owner window
5174 * LPCTSTR lpText address of text in message box
5175 * LPCTSTR lpCaption address of title of message box
5176 * UINT uType style of message box
5177 * WORD wLanguageId language identifier
5178 * Variables :
5179 * Result : If the function succeeds, the return value is a nonzero menu-item
5180 * value returned by the dialog box.
5181 * Remark :
5182 * Status : UNTESTED STUB
5183 *
5184 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5185 *****************************************************************************/
5186
5187int WIN32API MessageBoxExA(HWND hWnd,
5188 LPCTSTR lpText,
5189 LPCTSTR lpCaption,
5190 UINT uType,
5191 WORD wLanguageId)
5192{
5193 dprintf(("USER32:MessageBoxExA (%08xh,%s,%s,%u,%08w) not implemented.\n",
5194 hWnd,
5195 lpText,
5196 lpCaption,
5197 uType,
5198 wLanguageId));
5199
5200 return (MessageBoxA(hWnd,
5201 lpText,
5202 lpCaption,
5203 uType));
5204}
5205
5206
5207/*****************************************************************************
5208 * Name : int WIN32API MessageBoxExW
5209 * Purpose : The MessageBoxEx function creates, displays, and operates a message box.
5210 * Parameters: HWND hWnd handle of owner window
5211 * LPCTSTR lpText address of text in message box
5212 * LPCTSTR lpCaption address of title of message box
5213 * UINT uType style of message box
5214 * WORD wLanguageId language identifier
5215 * Variables :
5216 * Result : If the function succeeds, the return value is a nonzero menu-item
5217 * value returned by the dialog box.
5218 * Remark :
5219 * Status : UNTESTED STUB
5220 *
5221 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5222 *****************************************************************************/
5223
5224int WIN32API MessageBoxExW(HWND hWnd,
5225 LPCWSTR lpText,
5226 LPCWSTR lpCaption,
5227 UINT uType,
5228 WORD wLanguageId)
5229{
5230
5231 dprintf(("USER32:MessageBoxExW (%08xh,%x,%x,%u,%08w) not implemented.\n",
5232 hWnd,
5233 lpText,
5234 lpCaption,
5235 uType,
5236 wLanguageId));
5237
5238 return MessageBoxW(hWnd, lpText, lpCaption, uType);
5239}
5240
5241
5242/*****************************************************************************
5243 * Name : BOOL WIN32API MessageBoxIndirectW
5244 * Purpose : The MessageBoxIndirect function creates, displays, and operates
5245 * a message box. The message box contains application-defined
5246 * message text and title, any icon, and any combination of
5247 * predefined push buttons.
5248 * Parameters:
5249 * Variables :
5250 * Result :
5251 * Remark :
5252 * Status : UNTESTED STUB
5253 *
5254 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5255 *****************************************************************************/
5256
5257BOOL WIN32API MessageBoxIndirectW(LPMSGBOXPARAMSW lpMsgBoxParams)
5258{
5259 dprintf(("USER32:MessageBoxIndirectW (%08x) not implemented.\n",
5260 lpMsgBoxParams));
5261
5262 return (FALSE);
5263}
5264
5265
5266/*****************************************************************************
5267 * Name : BOOL WIN32API MessageBoxIndirectA
5268 * Purpose : The MessageBoxIndirect function creates, displays, and operates
5269 * a message box. The message box contains application-defined
5270 * message text and title, any icon, and any combination of
5271 * predefined push buttons.
5272 * Parameters:
5273 * Variables :
5274 * Result :
5275 * Remark :
5276 * Status : UNTESTED STUB
5277 *
5278 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5279 *****************************************************************************/
5280
5281BOOL WIN32API MessageBoxIndirectA(LPMSGBOXPARAMSA lpMsgBoxParams)
5282{
5283 dprintf(("USER32:MessageBoxIndirectA (%08x) not implemented.\n",
5284 lpMsgBoxParams));
5285
5286 return (FALSE);
5287}
5288
5289
5290/*****************************************************************************
5291 * Name : DWORD WIN32API OemKeyScan
5292 * Purpose : The OemKeyScan function maps OEM ASCII codes 0 through 0x0FF
5293 * into the OEM scan codes and shift states. The function provides
5294 * information that allows a program to send OEM text to another
5295 * program by simulating keyboard input.
5296 * Parameters:
5297 * Variables :
5298 * Result :
5299 * Remark :
5300 * Status : UNTESTED STUB
5301 *
5302 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5303 *****************************************************************************/
5304
5305DWORD WIN32API OemKeyScan(WORD wOemChar)
5306{
5307 dprintf(("USER32:OemKeyScan (%u) not implemented.\n",
5308 wOemChar));
5309
5310 return (wOemChar);
5311}
5312
5313
5314/*****************************************************************************
5315 * Name : HDESK WIN32API OpenDesktopA
5316 * Purpose : The OpenDesktop function returns a handle to an existing desktop.
5317 * A desktop is a secure object contained within a window station
5318 * object. A desktop has a logical display surface and contains
5319 * windows, menus and hooks.
5320 * Parameters: LPCTSTR lpszDesktopName name of the desktop to open
5321 * DWORD dwFlags flags to control interaction with other applications
5322 * BOOL fInherit specifies whether returned handle is inheritable
5323 * DWORD dwDesiredAccess specifies access of returned handle
5324 * Variables :
5325 * Result : If the function succeeds, the return value is the handle to the
5326 * opened desktop.
5327 * If the function fails, the return value is NULL. To get extended
5328 * error information, call GetLastError.
5329 * Remark :
5330 * Status : UNTESTED STUB
5331 *
5332 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5333 *****************************************************************************/
5334
5335HDESK WIN32API OpenDesktopA(LPCTSTR lpszDesktopName,
5336 DWORD dwFlags,
5337 BOOL fInherit,
5338 DWORD dwDesiredAccess)
5339{
5340 dprintf(("USER32:OpenDesktopA (%s,%08xh,%08xh,%08x) not implemented.\n",
5341 lpszDesktopName,
5342 dwFlags,
5343 fInherit,
5344 dwDesiredAccess));
5345
5346 return (NULL);
5347}
5348
5349
5350/*****************************************************************************
5351 * Name : HDESK WIN32API OpenDesktopW
5352 * Purpose : The OpenDesktop function returns a handle to an existing desktop.
5353 * A desktop is a secure object contained within a window station
5354 * object. A desktop has a logical display surface and contains
5355 * windows, menus and hooks.
5356 * Parameters: LPCTSTR lpszDesktopName name of the desktop to open
5357 * DWORD dwFlags flags to control interaction with other applications
5358 * BOOL fInherit specifies whether returned handle is inheritable
5359 * DWORD dwDesiredAccess specifies access of returned handle
5360 * Variables :
5361 * Result : If the function succeeds, the return value is the handle to the
5362 * opened desktop.
5363 * If the function fails, the return value is NULL. To get extended
5364 * error information, call GetLastError.
5365 * Remark :
5366 * Status : UNTESTED STUB
5367 *
5368 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5369 *****************************************************************************/
5370
5371HDESK WIN32API OpenDesktopW(LPCTSTR lpszDesktopName,
5372 DWORD dwFlags,
5373 BOOL fInherit,
5374 DWORD dwDesiredAccess)
5375{
5376 dprintf(("USER32:OpenDesktopW (%s,%08xh,%08xh,%08x) not implemented.\n",
5377 lpszDesktopName,
5378 dwFlags,
5379 fInherit,
5380 dwDesiredAccess));
5381
5382 return (NULL);
5383}
5384
5385
5386/*****************************************************************************
5387 * Name : HDESK WIN32API OpenInputDesktop
5388 * Purpose : The OpenInputDesktop function returns a handle to the desktop
5389 * that receives user input. The input desktop is a desktop on the
5390 * window station associated with the logged-on user.
5391 * Parameters: DWORD dwFlags flags to control interaction with other applications
5392 * BOOL fInherit specifies whether returned handle is inheritable
5393 * DWORD dwDesiredAccess specifies access of returned handle
5394 * Variables :
5395 * Result : If the function succeeds, the return value is a handle of the
5396 * desktop that receives user input.
5397 * If the function fails, the return value is NULL. To get extended
5398 * error information, call GetLastError.
5399 * Remark :
5400 * Status : UNTESTED STUB
5401 *
5402 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5403 *****************************************************************************/
5404
5405HDESK WIN32API OpenInputDesktop(DWORD dwFlags,
5406 BOOL fInherit,
5407 DWORD dwDesiredAccess)
5408{
5409 dprintf(("USER32:OpenInputDesktop (%08xh,%08xh,%08x) not implemented.\n",
5410 dwFlags,
5411 fInherit,
5412 dwDesiredAccess));
5413
5414 return (NULL);
5415}
5416
5417
5418/*****************************************************************************
5419 * Name : HWINSTA WIN32API OpenWindowStationA
5420 * Purpose : The OpenWindowStation function returns a handle to an existing
5421 * window station.
5422 * Parameters: LPCTSTR lpszWinStaName name of the window station to open
5423 * BOOL fInherit specifies whether returned handle is inheritable
5424 * DWORD dwDesiredAccess specifies access of returned handle
5425 * Variables :
5426 * Result : If the function succeeds, the return value is the handle to the
5427 * specified window station.
5428 * If the function fails, the return value is NULL. To get extended
5429 * error information, call GetLastError.
5430 * Remark :
5431 * Status : UNTESTED STUB
5432 *
5433 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5434 *****************************************************************************/
5435
5436HWINSTA WIN32API OpenWindowStationA(LPCTSTR lpszWinStaName,
5437 BOOL fInherit,
5438 DWORD dwDesiredAccess)
5439{
5440 dprintf(("USER32:OpenWindowStatieonA (%s,%08xh,%08x) not implemented.\n",
5441 lpszWinStaName,
5442 fInherit,
5443 dwDesiredAccess));
5444
5445 return (NULL);
5446}
5447
5448
5449/*****************************************************************************
5450 * Name : HWINSTA WIN32API OpenWindowStationW
5451 * Purpose : The OpenWindowStation function returns a handle to an existing
5452 * window station.
5453 * Parameters: LPCTSTR lpszWinStaName name of the window station to open
5454 * BOOL fInherit specifies whether returned handle is inheritable
5455 * DWORD dwDesiredAccess specifies access of returned handle
5456 * Variables :
5457 * Result : If the function succeeds, the return value is the handle to the
5458 * specified window station.
5459 * If the function fails, the return value is NULL. To get extended
5460 * error information, call GetLastError.
5461
5462 * Remark :
5463 * Status : UNTESTED STUB
5464 *
5465 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5466 *****************************************************************************/
5467
5468HWINSTA WIN32API OpenWindowStationW(LPCTSTR lpszWinStaName,
5469 BOOL fInherit,
5470 DWORD dwDesiredAccess)
5471{
5472 dprintf(("USER32:OpenWindowStatieonW (%s,%08xh,%08x) not implemented.\n",
5473 lpszWinStaName,
5474 fInherit,
5475 dwDesiredAccess));
5476
5477 return (NULL);
5478}
5479
5480
5481/*****************************************************************************
5482 * Name : BOOL WIN32API PaintDesktop
5483 * Purpose : The PaintDesktop function fills the clipping region in the
5484 * specified device context with the desktop pattern or wallpaper.
5485 * The function is provided primarily for shell desktops.
5486 * Parameters:
5487 * Variables :
5488 * Result : If the function succeeds, the return value is TRUE.
5489 * If the function fails, the return value is FALSE.
5490 * Remark :
5491 * Status : UNTESTED STUB
5492 *
5493 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5494 *****************************************************************************/
5495
5496BOOL WIN32API PaintDesktop(HDC hdc)
5497{
5498 dprintf(("USER32:PaintDesktop (%08x) not implemented.\n",
5499 hdc));
5500
5501 return (FALSE);
5502}
5503
5504
5505/*****************************************************************************
5506 * Name : BOOL WIN32API SendMessageCallbackA
5507 * Purpose : The SendMessageCallback function sends the specified message to
5508 * a window or windows. The function calls the window procedure for
5509 * the specified window and returns immediately. After the window
5510 * procedure processes the message, the system calls the specified
5511 * callback function, passing the result of the message processing
5512 * and an application-defined value to the callback function.
5513 * Parameters: HWND hwnd handle of destination window
5514 * UINT uMsg message to send
5515 * WPARAM wParam first message parameter
5516 * LPARAM lParam second message parameter
5517 * SENDASYNCPROC lpResultCallBack function to receive message value
5518 * DWORD dwData value to pass to callback function
5519 * Variables :
5520 * Result : If the function succeeds, the return value is TRUE.
5521 * If the function fails, the return value is FALSE. To get extended
5522 * error information, call GetLastError.
5523 * Remark :
5524 * Status : UNTESTED STUB
5525 *
5526 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5527 *****************************************************************************/
5528
5529BOOL WIN32API SendMessageCallbackA(HWND hWnd,
5530 UINT uMsg,
5531 WPARAM wParam,
5532 LPARAM lParam,
5533 SENDASYNCPROC lpResultCallBack,
5534 DWORD dwData)
5535{
5536 dprintf(("USER32:SendMessageCallBackA (%08xh,%08xh,%08xh,%08xh,%08xh,%08x) not implemented.\n",
5537 hWnd,
5538 uMsg,
5539 wParam,
5540 lParam,
5541 lpResultCallBack,
5542 dwData));
5543
5544 return (FALSE);
5545}
5546
5547
5548/*****************************************************************************
5549 * Name : BOOL WIN32API SendMessageCallbackW
5550 * Purpose : The SendMessageCallback function sends the specified message to
5551 * a window or windows. The function calls the window procedure for
5552 * the specified window and returns immediately. After the window
5553 * procedure processes the message, the system calls the specified
5554 * callback function, passing the result of the message processing
5555 * and an application-defined value to the callback function.
5556 * Parameters: HWND hwnd handle of destination window
5557 * UINT uMsg message to send
5558 * WPARAM wParam first message parameter
5559 * LPARAM lParam second message parameter
5560 * SENDASYNCPROC lpResultCallBack function to receive message value
5561 * DWORD dwData value to pass to callback function
5562 * Variables :
5563 * Result : If the function succeeds, the return value is TRUE.
5564 * If the function fails, the return value is FALSE. To get extended
5565 * error information, call GetLastError.
5566 * Remark :
5567 * Status : UNTESTED STUB
5568 *
5569 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5570 *****************************************************************************/
5571
5572BOOL WIN32API SendMessageCallbackW(HWND hWnd,
5573 UINT uMsg,
5574 WPARAM wParam,
5575 LPARAM lParam,
5576 SENDASYNCPROC lpResultCallBack,
5577 DWORD dwData)
5578{
5579 dprintf(("USER32:SendMessageCallBackW (%08xh,%08xh,%08xh,%08xh,%08xh,%08x) not implemented.\n",
5580 hWnd,
5581 uMsg,
5582 wParam,
5583 lParam,
5584 lpResultCallBack,
5585 dwData));
5586
5587 return (FALSE);
5588}
5589
5590
5591/*****************************************************************************
5592 * Name : VOID WIN32API SetDebugErrorLevel
5593 * Purpose : The SetDebugErrorLevel function sets the minimum error level at
5594 * which Windows will generate debugging events and pass them to a debugger.
5595 * Parameters: DWORD dwLevel debugging error level
5596 * Variables :
5597 * Result :
5598 * Remark :
5599 * Status : UNTESTED STUB
5600 *
5601 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5602 *****************************************************************************/
5603
5604VOID WIN32API SetDebugErrorLevel(DWORD dwLevel)
5605{
5606 dprintf(("USER32:SetDebugErrorLevel (%08x) not implemented.\n",
5607 dwLevel));
5608}
5609
5610
5611/*****************************************************************************
5612 * Name : BOOL WIN32API SetProcessWindowStation
5613 * Purpose : The SetProcessWindowStation function assigns a window station
5614 * to the calling process. This enables the process to access
5615 * objects in the window station such as desktops, the clipboard,
5616 * and global atoms. All subsequent operations on the window station
5617 * use the access rights granted to hWinSta.
5618 * Parameters:
5619 * Variables :
5620 * Result : If the function succeeds, the return value is TRUE.
5621 * If the function fails, the return value is FALSE. To get extended
5622 * error information, call GetLastError.
5623 * Remark :
5624 * Status : UNTESTED STUB
5625 *
5626 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5627 *****************************************************************************/
5628
5629BOOL WIN32API SetProcessWindowStation(HWINSTA hWinSta)
5630{
5631 dprintf(("USER32:SetProcessWindowStation (%08x) not implemented.\n",
5632 hWinSta));
5633
5634 return (FALSE);
5635}
5636
5637
5638/*****************************************************************************
5639 * Name : BOOL WIN32API SetSystemCursor
5640 * Purpose : The SetSystemCursor function replaces the contents of the system
5641 * cursor specified by dwCursorId with the contents of the cursor
5642 * specified by hCursor, and then destroys hCursor. This function
5643 * lets an application customize the system cursors.
5644 * Parameters: HCURSOR hCursor set specified system cursor to this cursor's
5645 * contents, then destroy this
5646 * DWORD dwCursorID system cursor specified by its identifier
5647 * Variables :
5648 * Result : If the function succeeds, the return value is TRUE.
5649 * If the function fails, the return value is FALSE. To get extended
5650 * error information, call GetLastError.
5651 * Remark :
5652 * Status : UNTESTED STUB
5653 *
5654 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5655 *****************************************************************************/
5656
5657BOOL WIN32API SetSystemCursor(HCURSOR hCursor,
5658 DWORD dwCursorId)
5659{
5660 dprintf(("USER32:SetSystemCursor (%08xh,%08x) not implemented.\n",
5661 hCursor,
5662 dwCursorId));
5663
5664 return (FALSE);
5665}
5666
5667
5668/*****************************************************************************
5669 * Name : BOOL WIN32API SetThreadDesktop
5670 * Purpose : The SetThreadDesktop function assigns a desktop to the calling
5671 * thread. All subsequent operations on the desktop use the access
5672 * rights granted to hDesk.
5673 * Parameters: HDESK hDesk handle of the desktop to assign to this thread
5674 * Variables :
5675 * Result : If the function succeeds, the return value is TRUE.
5676 * If the function fails, the return value is FALSE. To get extended
5677 * error information, call GetLastError.
5678 * Remark :
5679 * Status : UNTESTED STUB
5680 *
5681 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5682 *****************************************************************************/
5683
5684BOOL WIN32API SetThreadDesktop(HDESK hDesktop)
5685{
5686 dprintf(("USER32:SetThreadDesktop (%08x) not implemented.\n",
5687 hDesktop));
5688
5689 return (FALSE);
5690}
5691
5692
5693/*****************************************************************************
5694 * Name : BOOL WIN32API SetUserObjectInformationA
5695 * Purpose : The SetUserObjectInformation function sets information about a
5696 * window station or desktop object.
5697 * Parameters: HANDLE hObject handle of the object for which to set information
5698 * int nIndex type of information to set
5699 * PVOID lpvInfo points to a buffer that contains the information
5700 * DWORD cbInfo size, in bytes, of lpvInfo buffer
5701 * Variables :
5702 * Result : If the function succeeds, the return value is TRUE.
5703 * If the function fails the return value is FALSE. To get extended
5704 * error information, call GetLastError.
5705 * Remark :
5706 * Status : UNTESTED STUB
5707 *
5708 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5709 *****************************************************************************/
5710
5711BOOL WIN32API SetUserObjectInformationA(HANDLE hObject,
5712 int nIndex,
5713 PVOID lpvInfo,
5714 DWORD cbInfo)
5715{
5716 dprintf(("USER32:SetUserObjectInformationA (%08xh,%u,%08xh,%08x) not implemented.\n",
5717 hObject,
5718 nIndex,
5719 lpvInfo,
5720 cbInfo));
5721
5722 return (FALSE);
5723}
5724
5725
5726/*****************************************************************************
5727 * Name : BOOL WIN32API SetUserObjectInformationW
5728 * Purpose : The SetUserObjectInformation function sets information about a
5729 * window station or desktop object.
5730 * Parameters: HANDLE hObject handle of the object for which to set information
5731 * int nIndex type of information to set
5732 * PVOID lpvInfo points to a buffer that contains the information
5733 * DWORD cbInfo size, in bytes, of lpvInfo buffer
5734 * Variables :
5735 * Result : If the function succeeds, the return value is TRUE.
5736 * If the function fails the return value is FALSE. To get extended
5737 * error information, call GetLastError.
5738 * Remark :
5739 * Status : UNTESTED STUB
5740 *
5741 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5742 *****************************************************************************/
5743
5744BOOL WIN32API SetUserObjectInformationW(HANDLE hObject,
5745 int nIndex,
5746 PVOID lpvInfo,
5747 DWORD cbInfo)
5748{
5749 dprintf(("USER32:SetUserObjectInformationW (%08xh,%u,%08xh,%08x) not implemented.\n",
5750 hObject,
5751 nIndex,
5752 lpvInfo,
5753 cbInfo));
5754
5755 return (FALSE);
5756}
5757
5758
5759/*****************************************************************************
5760 * Name : BOOL WIN32API SetUserObjectSecurity
5761 * Purpose : The SetUserObjectSecurity function sets the security of a user
5762 * object. This can be, for example, a window or a DDE conversation
5763 * Parameters: HANDLE hObject handle of user object
5764 * SECURITY_INFORMATION * psi address of security information
5765 * LPSECURITY_DESCRIPTOR psd address of security descriptor
5766 * Variables :
5767 * Result : If the function succeeds, the return value is TRUE.
5768 * If the function fails, the return value is FALSE. To get extended
5769 * error information, call GetLastError.
5770 * Remark :
5771 * Status : UNTESTED STUB
5772 *
5773 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5774 *****************************************************************************/
5775
5776BOOL WIN32API SetUserObjectSecurity(HANDLE hObject,
5777 SECURITY_INFORMATION * psi,
5778 LPSECURITY_DESCRIPTOR psd)
5779{
5780 dprintf(("USER32:SetUserObjectSecuroty (%08xh,%08xh,%08x) not implemented.\n",
5781 hObject,
5782 psi,
5783 psd));
5784
5785 return (FALSE);
5786}
5787
5788
5789/*****************************************************************************
5790 * Name : int WIN32API SetWindowRgn
5791 * Purpose : The SetWindowRgn function sets the window region of a window. The
5792 * window region determines the area within the window where the
5793 * operating system permits drawing. The operating system does not
5794 * display any portion of a window that lies outside of the window region
5795 * Parameters: HWND hWnd handle to window whose window region is to be set
5796 * HRGN hRgn handle to region
5797 * BOOL bRedraw window redraw flag
5798 * Variables :
5799 * Result : If the function succeeds, the return value is non-zero.
5800 * If the function fails, the return value is zero.
5801 * Remark :
5802 * Status : UNTESTED STUB
5803 *
5804 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5805 *****************************************************************************/
5806
5807int WIN32API SetWindowRgn(HWND hWnd,
5808 HRGN hRgn,
5809 BOOL bRedraw)
5810{
5811 dprintf(("USER32:SetWindowRgn (%08xh,%08xh,%u) not implemented.\n",
5812 hWnd,
5813 hRgn,
5814 bRedraw));
5815
5816 return (0);
5817}
5818
5819
5820/*****************************************************************************
5821 * Name : BOOL WIN32API SetWindowsHookW
5822 * Purpose : The SetWindowsHook function is not implemented in the Win32 API.
5823 * Win32-based applications should use the SetWindowsHookEx function.
5824 * Parameters:
5825 * Variables :
5826 * Result :
5827 * Remark : ARGH ! MICROSOFT !
5828 * Status : UNTESTED STUB
5829 *
5830 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5831 *****************************************************************************/
5832
5833HHOOK WIN32API SetWindowsHookW(int nFilterType, HOOKPROC pfnFilterProc)
5834
5835{
5836 return (FALSE);
5837}
5838
5839
5840/*****************************************************************************
5841 * Name : BOOL WIN32API ShowWindowAsync
5842 * Purpose : The ShowWindowAsync function sets the show state of a window
5843 * created by a different thread.
5844 * Parameters: HWND hwnd handle of window
5845 * int nCmdShow show state of window
5846 * Variables :
5847 * Result : If the window was previously visible, the return value is TRUE.
5848 * If the window was previously hidden, the return value is FALSE.
5849 * Remark :
5850 * Status : UNTESTED STUB
5851 *
5852 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5853 *****************************************************************************/
5854
5855BOOL WIN32API ShowWindowAsync (HWND hWnd,
5856 int nCmdShow)
5857{
5858 dprintf(("USER32:ShowWindowAsync (%08xh,%08x) not implemented.\n",
5859 hWnd,
5860 nCmdShow));
5861
5862 return (FALSE);
5863}
5864
5865
5866/*****************************************************************************
5867 * Name : BOOL WIN32API SwitchDesktop
5868 * Purpose : The SwitchDesktop function makes a desktop visible and activates
5869 * it. This enables the desktop to receive input from the user. The
5870 * calling process must have DESKTOP_SWITCHDESKTOP access to the
5871 * desktop for the SwitchDesktop function to succeed.
5872 * Parameters:
5873 * Variables :
5874 * Result : If the function succeeds, the return value is TRUE.
5875 * If the function fails, the return value is FALSE. To get extended
5876 * error information, call GetLastError.
5877 * Remark :
5878 * Status : UNTESTED STUB
5879 *
5880 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5881 *****************************************************************************/
5882
5883BOOL WIN32API SwitchDesktop(HDESK hDesktop)
5884{
5885 dprintf(("USER32:SwitchDesktop (%08x) not implemented.\n",
5886 hDesktop));
5887
5888 return (FALSE);
5889}
5890
5891
5892/*****************************************************************************
5893 * Name : WORD WIN32API TileWindows
5894 * Purpose : The TileWindows function tiles the specified windows, or the child
5895 * windows of the specified parent window.
5896 * Parameters: HWND hwndParent handle of parent window
5897 * WORD wFlags types of windows not to arrange
5898 * LPCRECT lpRect rectangle to arrange windows in
5899 * WORD cChildrenb number of windows to arrange
5900 * const HWND *ahwndChildren array of window handles
5901 * Variables :
5902 * Result : If the function succeeds, the return value is the number of
5903 * windows arranged.
5904 * If the function fails, the return value is zero.
5905 * Remark :
5906 * Status : UNTESTED STUB
5907 *
5908 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5909 *****************************************************************************/
5910
5911WORD WIN32API TileWindows(HWND hwndParent,
5912 UINT wFlags,
5913 const LPRECT lpRect,
5914 UINT cChildrenb,
5915 const HWND *ahwndChildren)
5916{
5917 dprintf(("USER32:TileWindows (%08xh,%08xh,%08xh,%08xh,%08x) not implemented.\n",
5918 hwndParent,
5919 wFlags,
5920 lpRect,
5921 cChildrenb,
5922 ahwndChildren));
5923
5924 return (0);
5925}
5926
5927
5928/*****************************************************************************
5929 * Name : int WIN32API ToAscii
5930 * Purpose : The ToAscii function translates the specified virtual-key code
5931 * and keyboard state to the corresponding Windows character or characters.
5932 * Parameters: UINT uVirtKey virtual-key code
5933 * UINT uScanCode scan code
5934 * PBYTE lpbKeyState address of key-state array
5935 * LPWORD lpwTransKey buffer for translated key
5936 * UINT fuState active-menu flag
5937 * Variables :
5938 * Result : 0 The specified virtual key has no translation for the current
5939 * state of the keyboard.
5940 * 1 One Windows character was copied to the buffer.
5941 * 2 Two characters were copied to the buffer. This usually happens
5942 * when a dead-key character (accent or diacritic) stored in the
5943 * keyboard layout cannot be composed with the specified virtual
5944 * key to form a single character.
5945 * Remark :
5946 * Status : UNTESTED STUB
5947 *
5948 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5949 *****************************************************************************/
5950
5951int WIN32API ToAscii(UINT uVirtKey,
5952 UINT uScanCode,
5953 PBYTE lpbKeyState,
5954 LPWORD lpwTransKey,
5955 UINT fuState)
5956{
5957 dprintf(("USER32:ToAscii (%u,%u,%08xh,%08xh,%u) not implemented.\n",
5958 uVirtKey,
5959 uScanCode,
5960 lpbKeyState,
5961 lpwTransKey,
5962 fuState));
5963
5964 return (0);
5965}
5966
5967
5968/*****************************************************************************
5969 * Name : int WIN32API ToAsciiEx
5970 * Purpose : The ToAscii function translates the specified virtual-key code
5971 * and keyboard state to the corresponding Windows character or characters.
5972 * Parameters: UINT uVirtKey virtual-key code
5973 * UINT uScanCode scan code
5974 * PBYTE lpbKeyState address of key-state array
5975 * LPWORD lpwTransKey buffer for translated key
5976 * UINT fuState active-menu flag
5977 * HLK hlk keyboard layout handle
5978 * Variables :
5979 * Result : 0 The specified virtual key has no translation for the current
5980 * state of the keyboard.
5981 * 1 One Windows character was copied to the buffer.
5982 * 2 Two characters were copied to the buffer. This usually happens
5983 * when a dead-key character (accent or diacritic) stored in the
5984 * keyboard layout cannot be composed with the specified virtual
5985 * key to form a single character.
5986 * Remark :
5987 * Status : UNTESTED STUB
5988 *
5989 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5990 *****************************************************************************/
5991
5992int WIN32API ToAsciiEx(UINT uVirtKey,
5993 UINT uScanCode,
5994 PBYTE lpbKeyState,
5995 LPWORD lpwTransKey,
5996 UINT fuState,
5997 HKL hkl)
5998{
5999 dprintf(("USER32:ToAsciiEx (%u,%u,%08xh,%08xh,%u,%08x) not implemented.\n",
6000 uVirtKey,
6001 uScanCode,
6002 lpbKeyState,
6003 lpwTransKey,
6004 fuState,
6005 hkl));
6006
6007 return (0);
6008}
6009
6010
6011/*****************************************************************************
6012 * Name : int WIN32API ToUnicode
6013 * Purpose : The ToUnicode function translates the specified virtual-key code
6014 * and keyboard state to the corresponding Unicode character or characters.
6015 * Parameters: UINT wVirtKey virtual-key code
6016 * UINT wScanCode scan code
6017 * PBYTE lpKeyState address of key-state array
6018 * LPWSTR pwszBuff buffer for translated key
6019 * int cchBuff size of translated key buffer
6020 * UINT wFlags set of function-conditioning flags
6021 * Variables :
6022 * Result : - 1 The specified virtual key is a dead-key character (accent or
6023 * diacritic). This value is returned regardless of the keyboard
6024 * layout, even if several characters have been typed and are
6025 * stored in the keyboard state. If possible, even with Unicode
6026 * keyboard layouts, the function has written a spacing version of
6027 * the dead-key character to the buffer specified by pwszBuffer.
6028 * For example, the function writes the character SPACING ACUTE
6029 * (0x00B4), rather than the character NON_SPACING ACUTE (0x0301).
6030 * 0 The specified virtual key has no translation for the current
6031 * state of the keyboard. Nothing was written to the buffer
6032 * specified by pwszBuffer.
6033 * 1 One character was written to the buffer specified by pwszBuffer.
6034 * 2 or more Two or more characters were written to the buffer specified by
6035 * pwszBuff. The most common cause for this is that a dead-key
6036 * character (accent or diacritic) stored in the keyboard layout
6037 * could not be combined with the specified virtual key to form a
6038 * single character.
6039 * Remark :
6040 * Status : UNTESTED STUB
6041 *
6042 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
6043 *****************************************************************************/
6044
6045int WIN32API ToUnicode(UINT uVirtKey,
6046 UINT uScanCode,
6047 PBYTE lpKeyState,
6048 LPWSTR pwszBuff,
6049 int cchBuff,
6050 UINT wFlags)
6051{
6052 dprintf(("USER32:ToUnicode (%u,%u,%08xh,%08xh,%u,%08x) not implemented.\n",
6053 uVirtKey,
6054 uScanCode,
6055 lpKeyState,
6056 pwszBuff,
6057 cchBuff,
6058 wFlags));
6059
6060 return (0);
6061}
6062
6063
6064/*****************************************************************************
6065 * Name : BOOL WIN32API UnloadKeyboardLayout
6066 * Purpose : The UnloadKeyboardLayout function removes a keyboard layout.
6067 * Parameters: HKL hkl handle of keyboard layout
6068 * Variables :
6069 * Result : If the function succeeds, the return value is the handle of the
6070 * keyboard layout; otherwise, it is NULL. To get extended error
6071 * information, use the GetLastError function.
6072 * Remark :
6073 * Status : UNTESTED STUB
6074 *
6075 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
6076 *****************************************************************************/
6077
6078BOOL WIN32API UnloadKeyboardLayout (HKL hkl)
6079{
6080 dprintf(("USER32:UnloadKeyboardLayout (%08x) not implemented.\n",
6081 hkl));
6082
6083 return (0);
6084}
6085
6086
6087/*****************************************************************************
6088 * Name : SHORT WIN32API VkKeyScanExW
6089 * Purpose : The VkKeyScanEx function translates a character to the
6090 * corresponding virtual-key code and shift state. The function
6091 * translates the character using the input language and physical
6092 * keyboard layout identified by the given keyboard layout handle.
6093 * Parameters: UINT uChar character to translate
6094 * HKL hkl keyboard layout handle
6095 * Variables :
6096 * Result : see docs
6097 * Remark :
6098 * Status : UNTESTED STUB
6099 *
6100 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
6101 *****************************************************************************/
6102
6103WORD WIN32API VkKeyScanExW(WCHAR uChar,
6104 HKL hkl)
6105{
6106 dprintf(("USER32:VkKeyScanExW (%u,%08x) not implemented.\n",
6107 uChar,
6108 hkl));
6109
6110 return (uChar);
6111}
6112
6113
6114/*****************************************************************************
6115 * Name : SHORT WIN32API VkKeyScanExA
6116 * Purpose : The VkKeyScanEx function translates a character to the
6117 * corresponding virtual-key code and shift state. The function
6118 * translates the character using the input language and physical
6119 * keyboard layout identified by the given keyboard layout handle.
6120 * Parameters: UINT uChar character to translate
6121 * HKL hkl keyboard layout handle
6122 * Variables :
6123 * Result : see docs
6124 * Remark :
6125 * Status : UNTESTED STUB
6126 *
6127 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
6128 *****************************************************************************/
6129
6130WORD WIN32API VkKeyScanExA(CHAR uChar,
6131 HKL hkl)
6132{
6133 dprintf(("USER32:VkKeyScanExA (%u,%08x) not implemented.\n",
6134 uChar,
6135 hkl));
6136
6137 return (uChar);
6138}
6139
6140
6141/*****************************************************************************
6142 * Name : VOID WIN32API keybd_event
6143 * Purpose : The keybd_event function synthesizes a keystroke. The system
6144 * can use such a synthesized keystroke to generate a WM_KEYUP or
6145 * WM_KEYDOWN message. The keyboard driver's interrupt handler calls
6146 * the keybd_event function.
6147 * Parameters: BYTE bVk virtual-key code
6148
6149 * BYTE bScan hardware scan code
6150 * DWORD dwFlags flags specifying various function options
6151 * DWORD dwExtraInfo additional data associated with keystroke
6152 * Variables :
6153 * Result :
6154 * Remark :
6155 * Status : UNTESTED STUB
6156 *
6157 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
6158 *****************************************************************************/
6159
6160VOID WIN32API keybd_event (BYTE bVk,
6161 BYTE bScan,
6162 DWORD dwFlags,
6163 DWORD dwExtraInfo)
6164{
6165 dprintf(("USER32:keybd_event (%u,%u,%08xh,%08x) not implemented.\n",
6166 bVk,
6167 bScan,
6168 dwFlags,
6169 dwExtraInfo));
6170}
6171
6172
6173/*****************************************************************************
6174 * Name : VOID WIN32API mouse_event
6175 * Purpose : The mouse_event function synthesizes mouse motion and button clicks.
6176 * Parameters: DWORD dwFlags flags specifying various motion/click variants
6177 * DWORD dx horizontal mouse position or position change
6178 * DWORD dy vertical mouse position or position change
6179 * DWORD cButtons unused, reserved for future use, set to zero
6180 * DWORD dwExtraInfo 32 bits of application-defined information
6181 * Variables :
6182 * Result :
6183 * Remark :
6184 * Status : UNTESTED STUB
6185 *
6186 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
6187 *****************************************************************************/
6188
6189VOID WIN32API mouse_event(DWORD dwFlags,
6190 DWORD dx,
6191 DWORD dy,
6192 DWORD cButtons,
6193 DWORD dwExtraInfo)
6194{
6195 dprintf(("USER32:mouse_event (%08xh,%u,%u,%u,%08x) not implemented.\n",
6196 dwFlags,
6197 dx,
6198 dy,
6199 cButtons,
6200 dwExtraInfo));
6201}
6202
6203
6204/*****************************************************************************
6205 * Name : BOOL WIN32API SetShellWindow
6206 * Purpose : Unknown
6207 * Parameters: Unknown
6208 * Variables :
6209 * Result :
6210 * Remark :
6211 * Status : UNTESTED UNKNOWN STUB
6212 *
6213 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6214 *****************************************************************************/
6215
6216BOOL WIN32API SetShellWindow(DWORD x1)
6217{
6218 dprintf(("USER32: SetShellWindow(%08x) not implemented.\n",
6219 x1));
6220
6221 return (FALSE); /* default */
6222}
6223
6224
6225/*****************************************************************************
6226 * Name : BOOL WIN32API PlaySoundEvent
6227 * Purpose : Unknown
6228 * Parameters: Unknown
6229 * Variables :
6230 * Result :
6231 * Remark :
6232 * Status : UNTESTED UNKNOWN STUB
6233 *
6234 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6235 *****************************************************************************/
6236
6237BOOL WIN32API PlaySoundEvent(DWORD x1)
6238{
6239 dprintf(("USER32: PlaySoundEvent(%08x) not implemented.\n",
6240 x1));
6241
6242 return (FALSE); /* default */
6243}
6244
6245
6246/*****************************************************************************
6247 * Name : BOOL WIN32API TileChildWindows
6248 * Purpose : Unknown
6249 * Parameters: Unknown
6250 * Variables :
6251 * Result :
6252 * Remark :
6253 * Status : UNTESTED UNKNOWN STUB
6254 *
6255 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6256 *****************************************************************************/
6257
6258BOOL WIN32API TileChildWindows(DWORD x1,
6259 DWORD x2)
6260{
6261 dprintf(("USER32: TileChildWindows(%08xh,%08xh) not implemented.\n",
6262 x1,
6263 x2));
6264
6265 return (FALSE); /* default */
6266}
6267
6268
6269/*****************************************************************************
6270 * Name : BOOL WIN32API SetSysColorsTemp
6271 * Purpose : Unknown
6272 * Parameters: Unknown
6273 * Variables :
6274 * Result :
6275 * Remark :
6276 * Status : UNTESTED UNKNOWN STUB
6277 *
6278 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6279 *****************************************************************************/
6280
6281BOOL WIN32API SetSysColorsTemp(void)
6282{
6283 dprintf(("USER32: SetSysColorsTemp() not implemented.\n"));
6284
6285 return (FALSE); /* default */
6286}
6287
6288
6289/*****************************************************************************
6290 * Name : BOOL WIN32API RegisterNetworkCapabilities
6291 * Purpose : Unknown
6292 * Parameters: Unknown
6293 * Variables :
6294 * Result :
6295 * Remark :
6296 * Status : UNTESTED UNKNOWN STUB
6297 *
6298 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6299 *****************************************************************************/
6300
6301BOOL WIN32API RegisterNetworkCapabilities(DWORD x1,
6302 DWORD x2)
6303{
6304 dprintf(("USER32: RegisterNetworkCapabilities(%08xh,%08xh) not implemented.\n",
6305 x1,
6306 x2));
6307
6308 return (FALSE); /* default */
6309}
6310
6311
6312/*****************************************************************************
6313 * Name : BOOL WIN32API EndTask
6314 * Purpose : Unknown
6315 * Parameters: Unknown
6316 * Variables :
6317 * Result :
6318 * Remark :
6319 * Status : UNTESTED UNKNOWN STUB
6320 *
6321 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6322 *****************************************************************************/
6323
6324BOOL WIN32API EndTask(DWORD x1,
6325 DWORD x2,
6326 DWORD x3)
6327{
6328 dprintf(("USER32: EndTask(%08xh,%08xh,%08xh) not implemented.\n",
6329 x1,
6330 x2,
6331 x3));
6332
6333 return (FALSE); /* default */
6334}
6335
6336
6337/*****************************************************************************
6338 * Name : BOOL WIN32API SwitchToThisWindow
6339 * Purpose : Unknown
6340 * Parameters: Unknown
6341 * Variables :
6342 * Result :
6343 * Remark :
6344 * Status : UNTESTED UNKNOWN STUB
6345 *
6346 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6347 *****************************************************************************/
6348
6349BOOL WIN32API SwitchToThisWindow(HWND hwnd,
6350 BOOL x2)
6351{
6352 dprintf(("USER32: SwitchToThisWindow(%08xh,%08xh) not implemented.\n",
6353 hwnd,
6354 x2));
6355
6356 return (FALSE); /* default */
6357}
6358
6359
6360/*****************************************************************************
6361 * Name : BOOL WIN32API GetNextQueueWindow
6362 * Purpose : Unknown
6363 * Parameters: Unknown
6364 * Variables :
6365 * Result :
6366 * Remark :
6367 * Status : UNTESTED UNKNOWN STUB
6368 *
6369 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6370 *****************************************************************************/
6371
6372BOOL WIN32API GetNextQueueWindow(DWORD x1,
6373 DWORD x2)
6374{
6375 dprintf(("USER32: GetNextQueueWindow(%08xh,%08xh) not implemented.\n",
6376 x1,
6377 x2));
6378
6379 return (FALSE); /* default */
6380}
6381
6382
6383/*****************************************************************************
6384 * Name : BOOL WIN32API YieldTask
6385 * Purpose : Unknown
6386 * Parameters: Unknown
6387 * Variables :
6388 * Result :
6389 * Remark :
6390 * Status : UNTESTED UNKNOWN STUB
6391 *
6392 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6393 *****************************************************************************/
6394
6395BOOL WIN32API YieldTask(void)
6396{
6397 dprintf(("USER32: YieldTask() not implemented.\n"));
6398
6399 return (FALSE); /* default */
6400}
6401
6402
6403/*****************************************************************************
6404 * Name : BOOL WIN32API WinOldAppHackoMatic
6405 * Purpose : Unknown
6406 * Parameters: Unknown
6407 * Variables :
6408 * Result :
6409 * Remark :
6410 * Status : UNTESTED UNKNOWN STUB
6411 *
6412 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6413 *****************************************************************************/
6414
6415BOOL WIN32API WinOldAppHackoMatic(DWORD x1)
6416{
6417 dprintf(("USER32: WinOldAppHackoMatic(%08x) not implemented.\n",
6418 x1));
6419
6420 return (FALSE); /* default */
6421}
6422
6423
6424/*****************************************************************************
6425 * Name : BOOL WIN32API DragObject
6426 * Purpose : Unknown
6427 * Parameters: Unknown
6428 * Variables :
6429 * Result :
6430 * Remark :
6431 * Status : UNTESTED UNKNOWN STUB
6432 *
6433 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6434 *****************************************************************************/
6435
6436DWORD WIN32API DragObject(HWND x1,HWND x2,UINT x3,DWORD x4,HCURSOR x5)
6437{
6438 dprintf(("USER32: DragObject(%08x,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
6439 x1,
6440 x2,
6441 x3,
6442 x4,
6443 x5));
6444
6445 return (FALSE); /* default */
6446}
6447
6448
6449/*****************************************************************************
6450 * Name : BOOL WIN32API CascadeChildWindows
6451 * Purpose : Unknown
6452 * Parameters: Unknown
6453 * Variables :
6454 * Result :
6455 * Remark :
6456 * Status : UNTESTED UNKNOWN STUB
6457 *
6458 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6459 *****************************************************************************/
6460
6461BOOL WIN32API CascadeChildWindows(DWORD x1,
6462 DWORD x2)
6463{
6464 dprintf(("USER32: CascadeChildWindows(%08xh,%08xh) not implemented.\n",
6465 x1,
6466 x2));
6467
6468 return (FALSE); /* default */
6469}
6470
6471
6472/*****************************************************************************
6473 * Name : BOOL WIN32API RegisterSystemThread
6474 * Purpose : Unknown
6475 * Parameters: Unknown
6476 * Variables :
6477 * Result :
6478 * Remark :
6479 * Status : UNTESTED UNKNOWN STUB
6480 *
6481 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6482 *****************************************************************************/
6483
6484BOOL WIN32API RegisterSystemThread(DWORD x1,
6485 DWORD x2)
6486{
6487 dprintf(("USER32: RegisterSystemThread(%08xh,%08xh) not implemented.\n",
6488 x1,
6489 x2));
6490
6491 return (FALSE); /* default */
6492}
6493
6494
6495/*****************************************************************************
6496 * Name : BOOL WIN32API IsHungThread
6497 * Purpose : Unknown
6498 * Parameters: Unknown
6499 * Variables :
6500 * Result :
6501 * Remark :
6502 * Status : UNTESTED UNKNOWN STUB
6503 *
6504 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6505 *****************************************************************************/
6506
6507BOOL WIN32API IsHungThread(DWORD x1)
6508{
6509 dprintf(("USER32: IsHungThread(%08xh) not implemented.\n",
6510 x1));
6511
6512 return (FALSE); /* default */
6513}
6514
6515
6516/*****************************************************************************
6517 * Name : BOOL WIN32API SysErrorBox
6518 * Purpose : Unknown
6519 * Parameters: Unknown
6520 * Variables :
6521 * Result :
6522 * Remark : HARDERR like ?
6523 * Status : UNTESTED UNKNOWN STUB
6524 *
6525 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6526 *****************************************************************************/
6527
6528BOOL WIN32API SysErrorBox(DWORD x1,
6529 DWORD x2,
6530 DWORD x3)
6531{
6532 dprintf(("USER32: SysErrorBox(%08xh,%08xh,%08xh) not implemented.\n",
6533 x1,
6534 x2,
6535 x3));
6536
6537 return (FALSE); /* default */
6538}
6539
6540
6541/*****************************************************************************
6542 * Name : BOOL WIN32API UserSignalProc
6543 * Purpose : Unknown
6544 * Parameters: Unknown
6545 * Variables :
6546 * Result :
6547 * Remark :
6548 * Status : UNTESTED UNKNOWN STUB
6549 *
6550 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6551 *****************************************************************************/
6552
6553BOOL WIN32API UserSignalProc(DWORD x1,
6554 DWORD x2,
6555 DWORD x3,
6556 DWORD x4)
6557{
6558 dprintf(("USER32: SysErrorBox(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
6559 x1,
6560 x2,
6561 x3,
6562 x4));
6563
6564 return (FALSE); /* default */
6565}
6566
6567
6568/*****************************************************************************
6569 * Name : BOOL WIN32API GetShellWindow
6570 * Purpose : Unknown
6571 * Parameters: Unknown
6572 * Variables :
6573 * Result :
6574 * Remark :
6575 * Status : UNTESTED UNKNOWN STUB
6576 *
6577 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6578 *****************************************************************************/
6579
6580HWND WIN32API GetShellWindow(void)
6581{
6582 dprintf(("USER32: GetShellWindow() not implemented.\n"));
6583
6584 return (0); /* default */
6585}
6586
6587
6588/***********************************************************************
6589 * RegisterTasklist32 [USER32.436]
6590 */
6591DWORD WIN32API RegisterTasklist (DWORD x)
6592{
6593 dprintf(("USER32: RegisterTasklist(%08xh) not implemented.\n",
6594 x));
6595
6596 return TRUE;
6597}
6598
6599
6600/***********************************************************************
6601 * DrawCaptionTemp32A [USER32.599]
6602 *
6603 * PARAMS
6604 *
6605 * RETURNS
6606 * Success:
6607 * Failure:
6608 */
6609
6610BOOL WIN32API DrawCaptionTempA(HWND hwnd,
6611 HDC hdc,
6612 const RECT *rect,
6613 HFONT hFont,
6614 HICON hIcon,
6615 LPCSTR str,
6616 UINT uFlags)
6617{
6618 RECT rc = *rect;
6619
6620 dprintf(("USER32: DrawCaptionTempA(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh)\n",
6621 hwnd,
6622 hdc,
6623 rect,
6624 hFont,
6625 hIcon,
6626 str,
6627 uFlags));
6628
6629 /* drawing background */
6630 if (uFlags & DC_INBUTTON)
6631 {
6632 O32_FillRect (hdc,
6633 &rc,
6634 GetSysColorBrush (COLOR_3DFACE));
6635
6636 if (uFlags & DC_ACTIVE)
6637 {
6638 HBRUSH hbr = O32_SelectObject (hdc,
6639 GetSysColorBrush (COLOR_ACTIVECAPTION));
6640 O32_PatBlt (hdc,
6641 rc.left,
6642 rc.top,
6643 rc.right - rc.left,
6644 rc.bottom - rc.top,
6645 0xFA0089);
6646
6647 O32_SelectObject (hdc,
6648 hbr);
6649 }
6650 }
6651 else
6652 {
6653 O32_FillRect (hdc,
6654 &rc,
6655 GetSysColorBrush ((uFlags & DC_ACTIVE) ?
6656 COLOR_ACTIVECAPTION : COLOR_INACTIVECAPTION));
6657 }
6658
6659
6660 /* drawing icon */
6661 if ((uFlags & DC_ICON) && !(uFlags & DC_SMALLCAP))
6662 {
6663 POINT pt;
6664
6665 pt.x = rc.left + 2;
6666 pt.y = (rc.bottom + rc.top - O32_GetSystemMetrics(SM_CYSMICON)) / 2;
6667
6668 if (hIcon)
6669 {
6670 DrawIconEx (hdc,
6671 pt.x,
6672 pt.y,
6673 hIcon,
6674 O32_GetSystemMetrics(SM_CXSMICON),
6675 O32_GetSystemMetrics(SM_CYSMICON),
6676 0,
6677 0,
6678 DI_NORMAL);
6679 }
6680 else
6681 {
6682 /* @@@PH 1999/06/08 not ported yet, just don't draw any icon
6683 WND *wndPtr = WIN_FindWndPtr(hwnd);
6684 HICON hAppIcon = 0;
6685
6686 if (wndPtr->class->hIconSm)
6687 hAppIcon = wndPtr->class->hIconSm;
6688 else
6689 if (wndPtr->class->hIcon)
6690 hAppIcon = wndPtr->class->hIcon;
6691
6692 DrawIconEx (hdc,
6693 pt.x,
6694 pt.y,
6695 hAppIcon,
6696 GetSystemMetrics(SM_CXSMICON),
6697 GetSystemMetrics(SM_CYSMICON),
6698 0,
6699 0,
6700 DI_NORMAL);
6701
6702 WIN_ReleaseWndPtr(wndPtr);
6703 */
6704 }
6705
6706 rc.left += (rc.bottom - rc.top);
6707 }
6708
6709 /* drawing text */
6710 if (uFlags & DC_TEXT)
6711 {
6712 HFONT hOldFont;
6713
6714 if (uFlags & DC_INBUTTON)
6715 O32_SetTextColor (hdc,
6716 O32_GetSysColor (COLOR_BTNTEXT));
6717 else
6718 if (uFlags & DC_ACTIVE)
6719 O32_SetTextColor (hdc,
6720 O32_GetSysColor (COLOR_CAPTIONTEXT));
6721 else
6722 O32_SetTextColor (hdc,
6723 O32_GetSysColor (COLOR_INACTIVECAPTIONTEXT));
6724
6725 O32_SetBkMode (hdc,
6726 TRANSPARENT);
6727
6728 if (hFont)
6729 hOldFont = O32_SelectObject (hdc,
6730 hFont);
6731 else
6732 {
6733 NONCLIENTMETRICSA nclm;
6734 HFONT hNewFont;
6735
6736 nclm.cbSize = sizeof(NONCLIENTMETRICSA);
6737 O32_SystemParametersInfo (SPI_GETNONCLIENTMETRICS,
6738 0,
6739 &nclm,
6740 0);
6741 hNewFont = O32_CreateFontIndirect ((uFlags & DC_SMALLCAP) ?
6742 &nclm.lfSmCaptionFont : &nclm.lfCaptionFont);
6743 hOldFont = O32_SelectObject (hdc,
6744 hNewFont);
6745 }
6746
6747 if (str)
6748 O32_DrawText (hdc,
6749 str,
6750 -1,
6751 &rc,
6752 DT_SINGLELINE | DT_VCENTER | DT_NOPREFIX | DT_LEFT);
6753 else
6754 {
6755 CHAR szText[128];
6756 INT nLen;
6757
6758 nLen = O32_GetWindowText (hwnd,
6759 szText,
6760 128);
6761
6762 O32_DrawText (hdc,
6763 szText,
6764 nLen,
6765 &rc,
6766 DT_SINGLELINE | DT_VCENTER | DT_NOPREFIX | DT_LEFT);
6767 }
6768
6769 if (hFont)
6770 O32_SelectObject (hdc,
6771 hOldFont);
6772 else
6773 O32_DeleteObject (O32_SelectObject (hdc,
6774 hOldFont));
6775 }
6776
6777 /* drawing focus ??? */
6778 if (uFlags & 0x2000)
6779 {
6780 dprintf(("USER32: DrawCaptionTempA undocumented flag (0x2000)!\n"));
6781 }
6782
6783 return 0;
6784}
6785
6786
6787/***********************************************************************
6788 * DrawCaptionTemp32W [USER32.602]
6789 *
6790 * PARAMS
6791 *
6792 * RETURNS
6793 * Success:
6794 * Failure:
6795 */
6796
6797BOOL WIN32API DrawCaptionTempW (HWND hwnd,
6798 HDC hdc,
6799 const RECT *rect,
6800 HFONT hFont,
6801 HICON hIcon,
6802 LPCWSTR str,
6803 UINT uFlags)
6804{
6805 LPSTR strAscii = UnicodeToAsciiString((LPWSTR)str);
6806
6807 BOOL res = DrawCaptionTempA (hwnd,
6808 hdc,
6809 rect,
6810 hFont,
6811 hIcon,
6812 strAscii,
6813 uFlags);
6814
6815 FreeAsciiString(strAscii);
6816
6817 return res;
6818}
Note: See TracBrowser for help on using the repository browser.