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

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

Parent notification changes

File size: 242.9 KB
Line 
1/* $Id: user32.cpp,v 1.9 1999-06-20 16:47:39 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
630 dprintf(("USER32: ************CreateWindowExA %s (%d,%d,%d,%d), hwnd = %X\n", arg2, x, y, nWidth, nHeight, hwnd));
631 return(hwnd);
632}
633//******************************************************************************
634//******************************************************************************
635LRESULT WIN32API SendMessageA(HWND arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
636{
637 LRESULT rc;
638
639#ifdef DEBUG
640 WriteLog("USER32: SendMessage....\n");
641#endif
642 rc = O32_SendMessage(arg1, arg2, arg3, arg4);
643#ifdef DEBUG
644 WriteLog("USER32: *****SendMessage %X %X %X %X returned %d\n", arg1, arg2, arg3, arg4, rc);
645#endif
646 return(rc);
647}
648//******************************************************************************
649//******************************************************************************
650HWND WIN32API SetActiveWindow( HWND arg1)
651{
652#ifdef DEBUG
653 WriteLog("USER32: SetActiveWindow\n");
654#endif
655 return O32_SetActiveWindow(arg1);
656}
657//******************************************************************************
658//******************************************************************************
659HDC WIN32API BeginPaint(HWND arg1, PPAINTSTRUCT arg2)
660{
661 dprintf(("USER32: BeginPaint %X\n", arg2));
662 return O32_BeginPaint(arg1, arg2);
663}
664//******************************************************************************
665//******************************************************************************
666BOOL WIN32API IsDialogMessageA( HWND arg1, LPMSG arg2)
667{
668#ifdef DEBUG
669//// WriteLog("USER32: IsDialogMessage\n");
670#endif
671 return O32_IsDialogMessage(arg1, arg2);
672}
673//******************************************************************************
674//******************************************************************************
675int WIN32API DrawTextA(HDC arg1, LPCSTR arg2, int arg3, PRECT arg4, UINT arg5)
676{
677#ifdef DEBUG
678 WriteLog("USER32: DrawTextA %s", arg2);
679#endif
680 return O32_DrawText(arg1, arg2, arg3, arg4, arg5);
681}
682//******************************************************************************
683//******************************************************************************
684int WIN32API DrawTextExA(HDC arg1, LPCSTR arg2, int arg3, PRECT arg4, UINT arg5, LPDRAWTEXTPARAMS lpDTParams)
685{
686#ifdef DEBUG
687 WriteLog("USER32: DrawTextExA (not completely implemented) %s", arg2);
688#endif
689 return O32_DrawText(arg1, arg2, arg3, arg4, arg5);
690}
691//******************************************************************************
692//******************************************************************************
693int WIN32API GetSystemMetrics(int arg1)
694{
695 int rc;
696
697 switch(arg1) {
698 case SM_CXICONSPACING: //TODO: size of grid cell for large icons
699 rc = O32_GetSystemMetrics(SM_CXICON);
700 break;
701 case SM_CYICONSPACING:
702 rc = O32_GetSystemMetrics(SM_CYICON);
703 break;
704 case SM_PENWINDOWS:
705 rc = FALSE;
706 break;
707 case SM_DBCSENABLED:
708 rc = FALSE;
709 break;
710 case SM_CXEDGE: //size of 3D window edge (not supported)
711 rc = 1;
712 break;
713 case SM_CYEDGE:
714 rc = 1;
715 break;
716 case SM_CXMINSPACING: //can be SM_CXMINIMIZED or larger
717 rc = O32_GetSystemMetrics(SM_CXMINIMIZED);
718 break;
719 case SM_CYMINSPACING:
720 rc = GetSystemMetrics(SM_CYMINIMIZED);
721 break;
722 case SM_CXSMICON: //recommended size of small icons (TODO: adjust to screen res.)
723 rc = 16;
724 break;
725 case SM_CYSMICON:
726 rc = 16;
727 break;
728 case SM_CYSMCAPTION: //size in pixels of a small caption (TODO: ????)
729 rc = 8;
730 break;
731 case SM_CXSMSIZE: //size of small caption buttons (pixels) (TODO: implement properly)
732 rc = 16;
733 break;
734 case SM_CYSMSIZE:
735 rc = 16;
736 break;
737 case SM_CXMENUSIZE: //TODO: size of menu bar buttons (such as MDI window close)
738 rc = 16;
739 break;
740 case SM_CYMENUSIZE:
741 rc = 16;
742 break;
743 case SM_ARRANGE:
744 rc = ARW_BOTTOMLEFT | ARW_LEFT;
745 break;
746 case SM_CXMINIMIZED:
747 break;
748 case SM_CYMINIMIZED:
749 break;
750 case SM_CXMAXTRACK: //max window size
751 case SM_CXMAXIMIZED: //max toplevel window size
752 rc = O32_GetSystemMetrics(SM_CXSCREEN);
753 break;
754 case SM_CYMAXTRACK:
755 case SM_CYMAXIMIZED:
756 rc = O32_GetSystemMetrics(SM_CYSCREEN);
757 break;
758 case SM_NETWORK:
759 rc = 0x01; //TODO: default = yes
760 break;
761 case SM_CLEANBOOT:
762 rc = 0; //normal boot
763 break;
764 case SM_CXDRAG: //nr of pixels before drag becomes a real one
765 rc = 2;
766 break;
767 case SM_CYDRAG:
768 rc = 2;
769 break;
770 case SM_SHOWSOUNDS: //show instead of play sound
771 rc = FALSE;
772 break;
773 case SM_CXMENUCHECK:
774 rc = 4; //TODO
775 break;
776 case SM_CYMENUCHECK:
777 rc = O32_GetSystemMetrics(SM_CYMENU);
778 break;
779 case SM_SLOWMACHINE:
780 rc = FALSE; //even a slow machine is fast with OS/2 :)
781 break;
782 case SM_MIDEASTENABLED:
783 rc = FALSE;
784 break;
785 case SM_CMETRICS:
786 rc = O32_GetSystemMetrics(44); //Open32 changed this one
787 break;
788 default:
789 rc = O32_GetSystemMetrics(arg1);
790 break;
791 }
792#ifdef DEBUG
793 WriteLog("USER32: GetSystemMetrics %d returned %d\n", arg1, rc);
794#endif
795 return(rc);
796}
797//******************************************************************************
798//******************************************************************************
799UINT WIN32API SetTimer( HWND arg1, UINT arg2, UINT arg3, TIMERPROC arg4)
800{
801#ifdef DEBUG
802 WriteLog("USER32: SetTimer INCORRECT CALLING CONVENTION FOR HANDLER!!!!!\n");
803#endif
804 //SvL: Write callback handler class for this one
805 return O32_SetTimer(arg1, arg2, arg3, (TIMERPROC_O32)arg4);
806}
807//******************************************************************************
808//******************************************************************************
809BOOL WIN32API KillTimer(HWND arg1, UINT arg2)
810{
811#ifdef DEBUG
812 WriteLog("USER32: KillTimer\n");
813#endif
814 return O32_KillTimer(arg1, arg2);
815}
816//******************************************************************************
817//******************************************************************************
818BOOL WIN32API DestroyWindow(HWND arg1)
819{
820#ifdef DEBUG
821 WriteLog("USER32: DestroyWindow\n");
822#endif
823 return O32_DestroyWindow(arg1);
824}
825//******************************************************************************
826//******************************************************************************
827BOOL WIN32API PostMessageA( HWND arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
828{
829#ifdef DEBUG
830 WriteLog("USER32: PostMessageA %X %X %X %X\n", arg1, arg2, arg3, arg4);
831#endif
832 return O32_PostMessage(arg1, arg2, arg3, arg4);
833}
834//******************************************************************************
835//******************************************************************************
836BOOL WIN32API InflateRect( PRECT arg1, int arg2, int arg3)
837{
838#ifdef DEBUG
839 WriteLog("USER32: InflateRect\n");
840#endif
841 return O32_InflateRect(arg1, arg2, arg3);
842}
843//******************************************************************************
844//TODO:How can we emulate this one in OS/2???
845//******************************************************************************
846DWORD WIN32API WaitForInputIdle(HANDLE hProcess, DWORD dwTimeOut)
847{
848#ifdef DEBUG
849 WriteLog("USER32: WaitForInputIdle (Not Implemented) %d\n", dwTimeOut);
850#endif
851
852 if(dwTimeOut == INFINITE) return(0);
853
854// DosSleep(dwTimeOut/16);
855 return(0);
856}
857//******************************************************************************
858//******************************************************************************
859UINT WIN32API GetDlgItemTextA(HWND arg1, int arg2, LPSTR arg3, UINT arg4)
860{
861 UINT rc;
862
863 rc = O32_GetDlgItemText(arg1, arg2, arg3, arg4);
864#ifdef DEBUG
865 if(rc)
866 WriteLog("USER32: GetDlgItemTextA returned %s\n", arg3);
867 else WriteLog("USER32: GetDlgItemTextA returned 0 (%d)\n", GetLastError());
868#endif
869 return(rc);
870}
871//******************************************************************************
872//******************************************************************************
873BOOL WIN32API PeekMessageA(LPMSG arg1, HWND arg2, UINT arg3, UINT arg4, UINT arg5)
874{
875#ifdef DEBUG
876// WriteLog("USER32: PeekMessage\n");
877#endif
878 return O32_PeekMessage(arg1, arg2, arg3, arg4, arg5);
879}
880//******************************************************************************
881//******************************************************************************
882int WIN32API ShowCursor( BOOL arg1)
883{
884#ifdef DEBUG
885 WriteLog("USER32: ShowCursor\n");
886#endif
887 return O32_ShowCursor(arg1);
888}
889//******************************************************************************
890//BUGBUG: UpdateWindow sends a WM_ERASEBKGRND when it shouldn't!
891// So we just do it manually
892//******************************************************************************
893BOOL WIN32API UpdateWindow(HWND hwnd)
894{
895 RECT rect;
896
897#ifdef DEBUG
898 WriteLog("USER32: UpdateWindow\n");
899#endif
900 if(O32_GetUpdateRect(hwnd, &rect, FALSE) != FALSE) {//update region empty?
901 WndCallback(hwnd, WM_PAINT, 0, 0);
902// O32_PostMessage(hwnd, WM_PAINT, 0, 0);
903 }
904#ifdef DEBUG
905 else WriteLog("USER32: Update region empty!\n");
906#endif
907 return(TRUE);
908}
909//******************************************************************************
910//******************************************************************************
911BOOL WIN32API AdjustWindowRect( PRECT arg1, DWORD arg2, BOOL arg3)
912{
913#ifdef DEBUG
914 WriteLog("USER32: AdjustWindowRect\n");
915#endif
916 return O32_AdjustWindowRect(arg1, arg2, arg3);
917}
918//******************************************************************************
919//******************************************************************************
920BOOL WIN32API AdjustWindowRectEx( PRECT arg1, DWORD arg2, BOOL arg3, DWORD arg4)
921{
922#ifdef DEBUG
923 WriteLog("USER32: AdjustWindowRectEx\n");
924#endif
925 return O32_AdjustWindowRectEx(arg1, arg2, arg3, arg4);
926}
927//******************************************************************************
928//******************************************************************************
929BOOL WIN32API ClientToScreen( HWND arg1, PPOINT arg2)
930{
931#ifdef DEBUG
932//// WriteLog("USER32: ClientToScreen\n");
933#endif
934 return O32_ClientToScreen(arg1, arg2);
935}
936//******************************************************************************
937//******************************************************************************
938BOOL WIN32API SetRect( PRECT arg1, int arg2, int arg3, int arg4, int arg5)
939{
940#ifdef DEBUG
941 WriteLog("USER32: SetRect\n");
942#endif
943 return O32_SetRect(arg1, arg2, arg3, arg4, arg5);
944}
945//******************************************************************************
946//******************************************************************************
947LONG WIN32API GetWindowLongA(HWND hwnd, int nIndex)
948{
949 LONG rc;
950
951 if(nIndex == GWL_WNDPROC || nIndex == DWL_DLGPROC) {
952#ifdef DEBUG
953 WriteLog("USER32: GetWindowLong %X %d\n", hwnd, nIndex);
954#endif
955 Win32WindowProc *window = Win32WindowProc::FindProc(hwnd);
956 if(window && !(nIndex == DWL_DLGPROC && window->IsWindow() == TRUE)) {
957 return (LONG)window->GetWin32Callback();
958 }
959 }
960 rc = O32_GetWindowLong(hwnd, nIndex);
961 return(rc);
962}
963//******************************************************************************
964//******************************************************************************
965BOOL WIN32API SetDlgItemInt( HWND arg1, int arg2, UINT arg3, BOOL arg4)
966{
967#ifdef DEBUG
968 WriteLog("USER32: SetDlgItemInt\n");
969#endif
970 return O32_SetDlgItemInt(arg1, arg2, arg3, arg4);
971}
972//******************************************************************************
973//******************************************************************************
974BOOL WIN32API SetDlgItemTextA( HWND arg1, int arg2, LPCSTR arg3)
975{
976#ifdef DEBUG
977 WriteLog("USER32: SetDlgItemText to %s\n", arg3);
978#endif
979 return O32_SetDlgItemText(arg1, arg2, arg3);
980}
981//******************************************************************************
982//******************************************************************************
983BOOL WIN32API WinHelpA( HWND arg1, LPCSTR arg2, UINT arg3, DWORD arg4)
984{
985#ifdef DEBUG
986 WriteLog("USER32: WinHelp not implemented %s\n", arg2);
987#endif
988// return O32_WinHelp(arg1, arg2, arg3, arg4);
989 return(TRUE);
990}
991//******************************************************************************
992//******************************************************************************
993BOOL WIN32API IsIconic( HWND arg1)
994{
995#ifdef DEBUG
996 WriteLog("USER32: IsIconic\n");
997#endif
998 return O32_IsIconic(arg1);
999}
1000//******************************************************************************
1001//******************************************************************************
1002int WIN32API TranslateAcceleratorA(HWND arg1, HACCEL arg2, LPMSG arg3)
1003{
1004#ifdef DEBUG
1005//// WriteLog("USER32: TranslateAccelerator\n");
1006#endif
1007 return O32_TranslateAccelerator(arg1, arg2, arg3);
1008}
1009//******************************************************************************
1010//******************************************************************************
1011HWND WIN32API GetWindow(HWND arg1, UINT arg2)
1012{
1013 HWND rc;
1014
1015 rc = O32_GetWindow(arg1, arg2);
1016#ifdef DEBUG
1017 WriteLog("USER32: GetWindow %X %d returned %d\n", arg1, arg2, rc);
1018#endif
1019 return(rc);
1020}
1021//******************************************************************************
1022//******************************************************************************
1023HDC WIN32API GetWindowDC(HWND arg1)
1024{
1025#ifdef DEBUG
1026 WriteLog("USER32: GetWindowDC\n");
1027#endif
1028 return O32_GetWindowDC(arg1);
1029}
1030//******************************************************************************
1031//******************************************************************************
1032BOOL WIN32API SubtractRect( PRECT arg1, const RECT * arg2, const RECT * arg3)
1033{
1034#ifdef DEBUG
1035 WriteLog("USER32: SubtractRect");
1036#endif
1037 return O32_SubtractRect(arg1, arg2, arg3);
1038}
1039//******************************************************************************
1040//SvL: 24-6-'97 - Added
1041//******************************************************************************
1042BOOL WIN32API ClipCursor(const RECT * arg1)
1043{
1044#ifdef DEBUG
1045 WriteLog("USER32: ClipCursor\n");
1046#endif
1047 return O32_ClipCursor(arg1);
1048}
1049//******************************************************************************
1050//SvL: 24-6-'97 - Added
1051//TODO: Not implemented
1052//******************************************************************************
1053WORD WIN32API GetAsyncKeyState(INT nVirtKey)
1054{
1055#ifdef DEBUG
1056//// WriteLog("USER32: GetAsyncKeyState Not implemented\n");
1057#endif
1058 return 0;
1059}
1060//******************************************************************************
1061//SvL: 24-6-'97 - Added
1062//******************************************************************************
1063HCURSOR WIN32API GetCursor(void)
1064{
1065#ifdef DEBUG
1066//// WriteLog("USER32: GetCursor\n");
1067#endif
1068 return O32_GetCursor();
1069}
1070//******************************************************************************
1071//SvL: 24-6-'97 - Added
1072//******************************************************************************
1073BOOL WIN32API GetCursorPos( PPOINT arg1)
1074{
1075#ifdef DEBUG
1076//// WriteLog("USER32: GetCursorPos\n");
1077#endif
1078 return O32_GetCursorPos(arg1);
1079}
1080//******************************************************************************
1081//SvL: 24-6-'97 - Added
1082//******************************************************************************
1083UINT WIN32API RegisterWindowMessageA(LPCSTR arg1)
1084{
1085 UINT rc;
1086
1087 rc = O32_RegisterWindowMessage(arg1);
1088#ifdef DEBUG
1089 WriteLog("USER32: RegisterWindowMessageA %s returned %X\n", arg1, rc);
1090#endif
1091 return(rc);
1092}
1093//******************************************************************************
1094//SvL: 24-6-'97 - Added
1095//******************************************************************************
1096WORD WIN32API VkKeyScanA( char arg1)
1097{
1098#ifdef DEBUG
1099 WriteLog("USER32: VkKeyScanA\n");
1100#endif
1101 return O32_VkKeyScan(arg1);
1102}
1103//******************************************************************************
1104//SvL: 24-6-'97 - Added
1105//******************************************************************************
1106SHORT WIN32API GetKeyState( int arg1)
1107{
1108#ifdef DEBUG
1109 WriteLog("USER32: GetKeyState %d\n", arg1);
1110#endif
1111 return O32_GetKeyState(arg1);
1112}
1113//******************************************************************************
1114//******************************************************************************
1115HCURSOR WIN32API SetCursor( HCURSOR arg1)
1116{
1117#ifdef DEBUG
1118 WriteLog("USER32: SetCursor\n");
1119#endif
1120 return O32_SetCursor(arg1);
1121}
1122//******************************************************************************
1123//******************************************************************************
1124BOOL WIN32API SetCursorPos( int arg1, int arg2)
1125{
1126#ifdef DEBUG
1127 WriteLog("USER32: SetCursorPos\n");
1128#endif
1129 return O32_SetCursorPos(arg1, arg2);
1130}
1131//******************************************************************************
1132//******************************************************************************
1133BOOL WIN32API EnableScrollBar( HWND arg1, INT arg2, UINT arg3)
1134{
1135#ifdef DEBUG
1136 WriteLog("USER32: EnableScrollBar\n");
1137#endif
1138 return O32_EnableScrollBar(arg1, arg2, arg3);
1139}
1140//******************************************************************************
1141//******************************************************************************
1142BOOL WIN32API EnableWindow( HWND arg1, BOOL arg2)
1143{
1144#ifdef DEBUG
1145 WriteLog("USER32: EnableWindow\n");
1146#endif
1147 return O32_EnableWindow(arg1, arg2);
1148}
1149//******************************************************************************
1150//******************************************************************************
1151HWND WIN32API SetCapture( HWND arg1)
1152{
1153#ifdef DEBUG
1154 WriteLog("USER32: SetCapture\n");
1155#endif
1156 return O32_SetCapture(arg1);
1157}
1158//******************************************************************************
1159//******************************************************************************
1160BOOL WIN32API ReleaseCapture(void)
1161{
1162#ifdef DEBUG
1163 WriteLog("USER32: ReleaseCapture\n");
1164#endif
1165 return O32_ReleaseCapture();
1166}
1167//******************************************************************************
1168//******************************************************************************
1169DWORD WIN32API MsgWaitForMultipleObjects( DWORD arg1, LPHANDLE arg2, BOOL arg3, DWORD arg4, DWORD arg5)
1170{
1171#ifdef DEBUG
1172 WriteLog("USER32: MsgWaitForMultipleObjects\n");
1173#endif
1174 return O32_MsgWaitForMultipleObjects(arg1, arg2, arg3, arg4, arg5);
1175}
1176//******************************************************************************
1177//******************************************************************************
1178HDWP WIN32API BeginDeferWindowPos( int arg1)
1179{
1180#ifdef DEBUG
1181 WriteLog("USER32: BeginDeferWindowPos\n");
1182#endif
1183 return O32_BeginDeferWindowPos(arg1);
1184}
1185//******************************************************************************
1186//******************************************************************************
1187BOOL WIN32API BringWindowToTop( HWND arg1)
1188{
1189#ifdef DEBUG
1190 WriteLog("USER32: BringWindowToTop\n");
1191#endif
1192 return O32_BringWindowToTop(arg1);
1193}
1194//******************************************************************************
1195//******************************************************************************
1196BOOL WIN32API CallMsgFilterA( LPMSG arg1, int arg2)
1197{
1198#ifdef DEBUG
1199 WriteLog("USER32: CallMsgFilterA\n");
1200#endif
1201 return O32_CallMsgFilter(arg1, arg2);
1202}
1203//******************************************************************************
1204//******************************************************************************
1205BOOL WIN32API CallMsgFilterW( LPMSG arg1, int arg2)
1206{
1207#ifdef DEBUG
1208 WriteLog("USER32: CallMsgFilterW\n");
1209#endif
1210 // NOTE: This will not work as is (needs UNICODE support)
1211 return O32_CallMsgFilter(arg1, arg2);
1212}
1213//******************************************************************************
1214//******************************************************************************
1215LRESULT WIN32API CallWindowProcA(WNDPROC wndprcPrev,
1216 HWND arg2,
1217 UINT arg3,
1218 WPARAM arg4,
1219 LPARAM arg5)
1220{
1221#ifdef DEBUG
1222//// WriteLog("USER32: CallWindowProcA %X hwnd=%X, msg = %X\n", wndprcPrev, arg2, arg3);
1223#endif
1224
1225 if(Win32WindowSubProc::FindSubProc((WNDPROC_O32)wndprcPrev) != NULL) {
1226 WNDPROC_O32 orgprc = (WNDPROC_O32)wndprcPrev; //is original Open32 system class callback (_System)
1227 return orgprc(arg2, arg3, arg4, arg5);
1228 }
1229 else return wndprcPrev(arg2, arg3, arg4, arg5); //win32 callback (__stdcall)
1230}
1231//******************************************************************************
1232//******************************************************************************
1233LRESULT WIN32API CallWindowProcW(WNDPROC arg1,
1234 HWND arg2,
1235 UINT arg3,
1236 WPARAM arg4,
1237 LPARAM arg5)
1238{
1239 dprintf(("USER32: CallWindowProcW(%08xh,%08xh,%08xh,%08xh,%08xh) not properly implemented.\n",
1240 arg1,
1241 arg2,
1242 arg3,
1243 arg4,
1244 arg5));
1245
1246 return CallWindowProcA(arg1,
1247 arg2,
1248 arg3,
1249 arg4,
1250 arg5);
1251}
1252//******************************************************************************
1253//******************************************************************************
1254BOOL WIN32API ChangeClipboardChain( HWND arg1, HWND arg2)
1255{
1256#ifdef DEBUG
1257 WriteLog("USER32: ChangeClipboardChain\n");
1258#endif
1259 return O32_ChangeClipboardChain(arg1, arg2);
1260}
1261//******************************************************************************
1262//******************************************************************************
1263UINT WIN32API ArrangeIconicWindows( HWND arg1)
1264{
1265#ifdef DEBUG
1266 WriteLog("USER32: ArrangeIconicWindows\n");
1267#endif
1268 return O32_ArrangeIconicWindows(arg1);
1269}
1270//******************************************************************************
1271// Not implemented by Open32 (5-31-99 Christoph Bratschi)
1272//******************************************************************************
1273BOOL WIN32API CheckRadioButton( HWND arg1, UINT arg2, UINT arg3, UINT arg4)
1274{
1275#ifdef DEBUG
1276 WriteLog("USER32: CheckRadioButton\n");
1277#endif
1278// return O32_CheckRadioButton(arg1, arg2, arg3, arg4);
1279 if (arg2 > arg3) return (FALSE);
1280 for (UINT x=arg2;x <= arg3;x++)
1281 {
1282 SendDlgItemMessageA(arg1,x,BM_SETCHECK,(x == arg4) ? BST_CHECKED : BST_UNCHECKED,0);
1283 }
1284 return (TRUE);
1285}
1286//******************************************************************************
1287//******************************************************************************
1288HWND WIN32API ChildWindowFromPoint( HWND arg1, POINT arg2)
1289{
1290#ifdef DEBUG
1291 WriteLog("USER32: ChildWindowFromPoint\n");
1292#endif
1293 return O32_ChildWindowFromPoint(arg1, arg2);
1294}
1295//******************************************************************************
1296//******************************************************************************
1297HWND WIN32API ChildWindowFromPointEx(HWND arg1, POINT arg2, UINT uFlags)
1298{
1299#ifdef DEBUG
1300 WriteLog("USER32: ChildWindowFromPointEx, not completely supported!\n");
1301#endif
1302 return O32_ChildWindowFromPoint(arg1, arg2);
1303}
1304//******************************************************************************
1305//******************************************************************************
1306BOOL WIN32API CloseClipboard(void)
1307{
1308#ifdef DEBUG
1309 WriteLog("USER32: CloseClipboard\n");
1310#endif
1311 return O32_CloseClipboard();
1312}
1313//******************************************************************************
1314//******************************************************************************
1315BOOL WIN32API CloseWindow( HWND arg1)
1316{
1317#ifdef DEBUG
1318 WriteLog("USER32: CloseWindow\n");
1319#endif
1320 return O32_CloseWindow(arg1);
1321}
1322//******************************************************************************
1323//******************************************************************************
1324HICON WIN32API CopyIcon( HICON arg1)
1325{
1326#ifdef DEBUG
1327 WriteLog("USER32: CopyIcon\n");
1328#endif
1329 return O32_CopyIcon(arg1);
1330}
1331//******************************************************************************
1332//******************************************************************************
1333int WIN32API CountClipboardFormats(void)
1334{
1335#ifdef DEBUG
1336 WriteLog("USER32: CountClipboardFormats\n");
1337#endif
1338 return O32_CountClipboardFormats();
1339}
1340//******************************************************************************
1341//******************************************************************************
1342HACCEL WIN32API CreateAcceleratorTableA( LPACCEL arg1, int arg2)
1343{
1344#ifdef DEBUG
1345 WriteLog("USER32: CreateAcceleratorTableA\n");
1346#endif
1347 return O32_CreateAcceleratorTable(arg1, arg2);
1348}
1349//******************************************************************************
1350//******************************************************************************
1351HACCEL WIN32API CreateAcceleratorTableW( LPACCEL arg1, int arg2)
1352{
1353#ifdef DEBUG
1354 WriteLog("USER32: CreateAcceleratorTableW\n");
1355#endif
1356 // NOTE: This will not work as is (needs UNICODE support)
1357 return O32_CreateAcceleratorTable(arg1, arg2);
1358}
1359//******************************************************************************
1360//******************************************************************************
1361BOOL WIN32API CreateCaret( HWND arg1, HBITMAP arg2, int arg3, int arg4)
1362{
1363#ifdef DEBUG
1364 WriteLog("USER32: CreateCaret\n");
1365#endif
1366 return O32_CreateCaret(arg1, arg2, arg3, arg4);
1367}
1368//******************************************************************************
1369//******************************************************************************
1370HCURSOR WIN32API CreateCursor( HINSTANCE arg1, int arg2, int arg3, int arg4, int arg5, const VOID * arg6, const VOID * arg7)
1371{
1372#ifdef DEBUG
1373 WriteLog("USER32: CreateCursor\n");
1374#endif
1375 return O32_CreateCursor(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
1376}
1377//******************************************************************************
1378//******************************************************************************
1379HICON WIN32API CreateIcon( HINSTANCE arg1, INT arg2, INT arg3, BYTE arg4, BYTE arg5, LPCVOID arg6, LPCVOID arg7)
1380{
1381#ifdef DEBUG
1382 WriteLog("USER32: CreateIcon\n");
1383#endif
1384 return O32_CreateIcon(arg1, arg2, arg3, arg4, arg5, (const BYTE *)arg6, (const BYTE *)arg7);
1385}
1386//******************************************************************************
1387//ASSERT dwVer == win31 (ok according to SDK docs)
1388//******************************************************************************
1389HICON WIN32API CreateIconFromResource(PBYTE presbits, UINT dwResSize,
1390 BOOL fIcon, DWORD dwVer)
1391{
1392 HICON hicon;
1393 DWORD OS2ResSize = 0;
1394 PBYTE OS2Icon = ConvertWin32Icon(presbits, dwResSize, &OS2ResSize);
1395
1396 hicon = O32_CreateIconFromResource(OS2Icon, OS2ResSize, fIcon, dwVer);
1397#ifdef DEBUG
1398 WriteLog("USER32: CreateIconFromResource returned %X (%X)\n", hicon, GetLastError());
1399#endif
1400 if(OS2Icon)
1401 FreeIcon(OS2Icon);
1402
1403 return(hicon);
1404}
1405//******************************************************************************
1406//******************************************************************************
1407HICON WIN32API CreateIconFromResourceEx(PBYTE presbits, UINT dwResSize,
1408 BOOL fIcon, DWORD dwVer,
1409 int cxDesired, int cyDesired,
1410 UINT Flags)
1411{
1412#ifdef DEBUG
1413 WriteLog("USER32: CreateIconFromResourceEx %X %d %d %X %d %d %X, not completely supported!\n", presbits, dwResSize, fIcon, dwVer, cxDesired, cyDesired, Flags);
1414#endif
1415 return CreateIconFromResource(presbits, dwResSize, fIcon, dwVer);
1416}
1417//******************************************************************************
1418//******************************************************************************
1419HICON WIN32API CreateIconIndirect(LPICONINFO arg1)
1420{
1421#ifdef DEBUG
1422 WriteLog("USER32: CreateIconIndirect\n");
1423#endif
1424 return O32_CreateIconIndirect(arg1);
1425}
1426//******************************************************************************
1427//******************************************************************************
1428HWND WIN32API CreateMDIWindowA(LPCSTR arg1, LPCSTR arg2, DWORD arg3,
1429 int arg4, int arg5, int arg6, int arg7,
1430 HWND arg8, HINSTANCE arg9, LPARAM arg10)
1431{
1432 HWND hwnd;
1433
1434#ifdef DEBUG
1435 WriteLog("USER32: CreateMDIWindowA\n");
1436#endif
1437 Win32WindowProc *window = new Win32WindowProc(arg9, arg1);
1438 hwnd = O32_CreateMDIWindow((LPSTR)arg1, (LPSTR)arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
1439 //SvL: 16-11-'97: window can be already destroyed if hwnd == 0
1440 if(hwnd == 0 && window != 0 && Win32WindowProc::FindWindowProc(window)) {
1441 delete(window);
1442 window = 0;
1443 }
1444
1445#ifdef DEBUG
1446 WriteLog("USER32: CreateMDIWindowA returned %X\n", hwnd);
1447#endif
1448 return hwnd;
1449}
1450//******************************************************************************
1451//******************************************************************************
1452HWND WIN32API CreateMDIWindowW(LPCWSTR arg1, LPCWSTR arg2, DWORD arg3, int arg4,
1453 int arg5, int arg6, int arg7, HWND arg8, HINSTANCE arg9,
1454 LPARAM arg10)
1455{
1456 HWND hwnd;
1457 char *astring1 = NULL, *astring2 = NULL;
1458 Win32WindowProc *window = NULL;
1459
1460 if((int)arg1 >> 16 != 0) {
1461 astring1 = UnicodeToAsciiString((LPWSTR)arg1);
1462 }
1463 else astring1 = (char *)arg2;
1464
1465 astring2 = UnicodeToAsciiString((LPWSTR)arg2);
1466
1467 //Classname might be name of system class, in which case we don't
1468 //need to use our own callback
1469// if(Win32WindowClass::FindClass((LPSTR)astring1) != NULL) {
1470 window = new Win32WindowProc(arg9, astring1);
1471// }
1472 hwnd = O32_CreateMDIWindow(astring1, astring2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
1473 //SvL: 16-11-'97: window can be already destroyed if hwnd == 0
1474 if(hwnd == 0 && window != 0 && Win32WindowProc::FindWindowProc(window)) {
1475 delete(window);
1476 window = 0;
1477 }
1478 if(window) {
1479 window->SetWindowHandle(hwnd);
1480 }
1481
1482 if(astring1) FreeAsciiString(astring1);
1483 FreeAsciiString(astring2);
1484#ifdef DEBUG
1485 WriteLog("USER32: CreateMDIWindowW hwnd = %X\n", hwnd);
1486#endif
1487 return(hwnd);
1488}
1489//******************************************************************************
1490//******************************************************************************
1491HWND WIN32API CreateWindowExW(DWORD arg1,
1492 LPCWSTR arg2,
1493 LPCWSTR arg3,
1494 DWORD dwStyle,
1495 int arg5,
1496 int arg6,
1497 int arg7,
1498 int arg8,
1499 HWND arg9,
1500 HMENU arg10,
1501 HINSTANCE arg11,
1502 PVOID arg12)
1503{
1504 HWND hwnd;
1505 char *astring1 = NULL,
1506 *astring2 = NULL;
1507 Win32WindowProc *window = NULL;
1508
1509 /* @@@PH 98/06/21 changed to call OS2CreateWindowExA */
1510 if((int)arg2 >> 16 != 0)
1511 astring1 = UnicodeToAsciiString((LPWSTR)arg2);
1512 else
1513 astring1 = (char *)arg2;
1514
1515 astring2 = UnicodeToAsciiString((LPWSTR)arg3);
1516
1517#ifdef DEBUG
1518 WriteLog("USER32: CreateWindowExW: dwExStyle = %X\n", arg1);
1519 if((int)arg2 >> 16 != 0)
1520 WriteLog("USER32: CreateWindow: classname = %s\n", astring1);
1521 else WriteLog("USER32: CreateWindow: classname = %X\n", arg2);
1522 WriteLog("USER32: CreateWindow: windowname= %s\n", astring2);
1523 WriteLog("USER32: CreateWindow: dwStyle = %X\n", dwStyle);
1524 WriteLog("USER32: CreateWindow: x = %d\n", arg5);
1525 WriteLog("USER32: CreateWindow: y = %d\n", arg6);
1526 WriteLog("USER32: CreateWindow: nWidth = %d\n", arg7);
1527 WriteLog("USER32: CreateWindow: nHeight = %d\n", arg8);
1528 WriteLog("USER32: CreateWindow: parent = %X\n", arg9);
1529 WriteLog("USER32: CreateWindow: hwmenu = %X\n", arg10);
1530 WriteLog("USER32: CreateWindow: hinstance = %X\n", arg11);
1531 WriteLog("USER32: CreateWindow: param = %X\n", arg12);
1532 #endif
1533
1534 hwnd = CreateWindowExA(arg1,
1535 astring1,
1536 astring2,
1537 dwStyle,
1538 arg5,
1539 arg6,
1540 arg7,
1541 arg8,
1542 arg9,
1543 arg10,
1544 arg11,
1545 arg12);
1546
1547 if(astring1)
1548 FreeAsciiString(astring1);
1549
1550 FreeAsciiString(astring2);
1551
1552#ifdef DEBUG
1553 WriteLog("USER32: ************CreateWindowExW hwnd = %X (%X)\n", hwnd, GetLastError());
1554#endif
1555 return(hwnd);
1556}
1557//******************************************************************************
1558//******************************************************************************
1559HDWP WIN32API DeferWindowPos( HDWP arg1, HWND arg2, HWND arg3, int arg4, int arg5, int arg6, int arg7, UINT arg8)
1560{
1561#ifdef DEBUG
1562 WriteLog("USER32: DeferWindowPos\n");
1563#endif
1564 return O32_DeferWindowPos(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
1565}
1566//******************************************************************************
1567//******************************************************************************
1568BOOL WIN32API DestroyAcceleratorTable( HACCEL arg1)
1569{
1570#ifdef DEBUG
1571 WriteLog("USER32: DestroyAcceleratorTable\n");
1572#endif
1573 return O32_DestroyAcceleratorTable(arg1);
1574}
1575//******************************************************************************
1576//******************************************************************************
1577BOOL WIN32API DestroyCaret(void)
1578{
1579#ifdef DEBUG
1580 WriteLog("USER32: DestroyCaret\n");
1581#endif
1582 return O32_DestroyCaret();
1583}
1584//******************************************************************************
1585//******************************************************************************
1586BOOL WIN32API DestroyCursor( HCURSOR arg1)
1587{
1588#ifdef DEBUG
1589 WriteLog("USER32: DestroyCursor\n");
1590#endif
1591 return O32_DestroyCursor(arg1);
1592}
1593//******************************************************************************
1594//******************************************************************************
1595BOOL WIN32API DestroyIcon( HICON arg1)
1596{
1597#ifdef DEBUG
1598 WriteLog("USER32: DestroyIcon\n");
1599#endif
1600 return O32_DestroyIcon(arg1);
1601}
1602//******************************************************************************
1603//******************************************************************************
1604LONG WIN32API DispatchMessageW( const MSG * arg1)
1605{
1606#ifdef DEBUG
1607 WriteLog("USER32: DispatchMessageW\n");
1608#endif
1609 // NOTE: This will not work as is (needs UNICODE support)
1610 return O32_DispatchMessage(arg1);
1611}
1612//******************************************************************************
1613//******************************************************************************
1614int WIN32API DlgDirListA( HWND arg1, LPSTR arg2, int arg3, int arg4, UINT arg5)
1615{
1616#ifdef DEBUG
1617 WriteLog("USER32: DlgDirListA\n");
1618#endif
1619 return O32_DlgDirList(arg1, arg2, arg3, arg4, arg5);
1620}
1621//******************************************************************************
1622//******************************************************************************
1623int WIN32API DlgDirListComboBoxA( HWND arg1, LPSTR arg2, int arg3, int arg4, UINT arg5)
1624{
1625#ifdef DEBUG
1626 WriteLog("USER32: DlgDirListComboBoxA\n");
1627#endif
1628 return O32_DlgDirListComboBox(arg1, arg2, arg3, arg4, arg5);
1629}
1630//******************************************************************************
1631//******************************************************************************
1632int WIN32API DlgDirListComboBoxW( HWND arg1, LPWSTR arg2, int arg3, int arg4, UINT arg5)
1633{
1634#ifdef DEBUG
1635 WriteLog("USER32: DlgDirListComboBoxW NOT WORKING\n");
1636#endif
1637 // NOTE: This will not work as is (needs UNICODE support)
1638 return 0;
1639// return O32_DlgDirListComboBox(arg1, arg2, arg3, arg4, arg5);
1640}
1641//******************************************************************************
1642//******************************************************************************
1643int WIN32API DlgDirListW( HWND arg1, LPWSTR arg2, int arg3, int arg4, UINT arg5)
1644{
1645#ifdef DEBUG
1646 WriteLog("USER32: DlgDirListW NOT WORKING\n");
1647#endif
1648 // NOTE: This will not work as is (needs UNICODE support)
1649 return 0;
1650// return O32_DlgDirList(arg1, arg2, arg3, arg4, arg5);
1651}
1652//******************************************************************************
1653//******************************************************************************
1654BOOL WIN32API DlgDirSelectComboBoxExA( HWND arg1, LPSTR arg2, int arg3, int arg4)
1655{
1656#ifdef DEBUG
1657 WriteLog("USER32: DlgDirSelectComboBoxExA\n");
1658#endif
1659 return O32_DlgDirSelectComboBoxEx(arg1, arg2, arg3, arg4);
1660}
1661//******************************************************************************
1662//******************************************************************************
1663BOOL WIN32API DlgDirSelectComboBoxExW( HWND arg1, LPWSTR arg2, int arg3, int arg4)
1664{
1665#ifdef DEBUG
1666 WriteLog("USER32: DlgDirSelectComboBoxExW NOT WORKING\n");
1667#endif
1668 // NOTE: This will not work as is (needs UNICODE support)
1669 return 0;
1670// return O32_DlgDirSelectComboBoxEx(arg1, arg2, arg3, arg4);
1671}
1672//******************************************************************************
1673//******************************************************************************
1674BOOL WIN32API DlgDirSelectExA( HWND arg1, LPSTR arg2, int arg3, int arg4)
1675{
1676#ifdef DEBUG
1677 WriteLog("USER32: DlgDirSelectExA\n");
1678#endif
1679 return O32_DlgDirSelectEx(arg1, arg2, arg3, arg4);
1680}
1681//******************************************************************************
1682//******************************************************************************
1683BOOL WIN32API DlgDirSelectExW( HWND arg1, LPWSTR arg2, int arg3, int arg4)
1684{
1685#ifdef DEBUG
1686 WriteLog("USER32: DlgDirSelectExW NOT WORKING\n");
1687#endif
1688 // NOTE: This will not work as is (needs UNICODE support)
1689 return 0;
1690// return O32_DlgDirSelectEx(arg1, arg2, arg3, arg4);
1691}
1692//******************************************************************************
1693//******************************************************************************
1694BOOL WIN32API DrawFocusRect( HDC arg1, const RECT * arg2)
1695{
1696#ifdef DEBUG
1697 WriteLog("USER32: DrawFocusRect\n");
1698#endif
1699 return O32_DrawFocusRect(arg1, arg2);
1700}
1701//******************************************************************************
1702//******************************************************************************
1703BOOL WIN32API DrawIcon( HDC arg1, int arg2, int arg3, HICON arg4)
1704{
1705#ifdef DEBUG
1706 WriteLog("USER32: DrawIcon\n");
1707#endif
1708 return O32_DrawIcon(arg1, arg2, arg3, arg4);
1709}
1710//******************************************************************************
1711//******************************************************************************
1712BOOL WIN32API DrawIconEx(HDC hdc, int xLeft, int xRight, HICON hIcon,
1713 int cxWidth, int cyWidth, UINT istepIfAniCur,
1714 HBRUSH hbrFlickerFreeDraw, UINT diFlags)
1715{
1716#ifdef DEBUG
1717 WriteLog("USER32: DrawIcon, partially implemented\n");
1718#endif
1719 return O32_DrawIcon(hdc, xLeft, xRight, hIcon);
1720}
1721//******************************************************************************
1722//******************************************************************************
1723BOOL WIN32API DrawMenuBar( HWND arg1)
1724{
1725#ifdef DEBUG
1726 WriteLog("USER32: DrawMenuBar\n");
1727#endif
1728 return O32_DrawMenuBar(arg1);
1729}
1730//******************************************************************************
1731//******************************************************************************
1732int WIN32API DrawTextW( HDC arg1, LPCWSTR arg2, int arg3, PRECT arg4, UINT arg5)
1733{
1734 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
1735 int rc;
1736
1737#ifdef DEBUG
1738 WriteLog("USER32: DrawTextW %s\n", astring);
1739#endif
1740 rc = O32_DrawText(arg1, astring, arg3, arg4, arg5);
1741 FreeAsciiString(astring);
1742 return(rc);
1743}
1744//******************************************************************************
1745//******************************************************************************
1746int WIN32API DrawTextExW(HDC arg1, LPCWSTR arg2, int arg3, PRECT arg4, UINT arg5, LPDRAWTEXTPARAMS lpDTParams)
1747{
1748 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
1749 int rc;
1750
1751#ifdef DEBUG
1752 WriteLog("USER32: DrawTextExW (not completely supported) %s\n", astring);
1753#endif
1754 rc = O32_DrawText(arg1, astring, arg3, arg4, arg5);
1755 FreeAsciiString(astring);
1756 return(rc);
1757}
1758//******************************************************************************
1759//******************************************************************************
1760BOOL WIN32API EmptyClipboard(void)
1761{
1762#ifdef DEBUG
1763 WriteLog("USER32: EmptyClipboard\n");
1764#endif
1765 return O32_EmptyClipboard();
1766}
1767//******************************************************************************
1768//******************************************************************************
1769BOOL WIN32API EndDeferWindowPos( HDWP arg1)
1770{
1771#ifdef DEBUG
1772 WriteLog("USER32: EndDeferWindowPos\n");
1773#endif
1774 return O32_EndDeferWindowPos(arg1);
1775}
1776//******************************************************************************
1777//******************************************************************************
1778BOOL WIN32API EnumChildWindows(HWND hwnd, WNDENUMPROC lpfn, LPARAM lParam)
1779{
1780 BOOL rc;
1781 EnumWindowCallback *callback = new EnumWindowCallback(lpfn, lParam);
1782
1783#ifdef DEBUG
1784 WriteLog("USER32: EnumChildWindows\n");
1785#endif
1786 rc = O32_EnumChildWindows(hwnd, callback->GetOS2Callback(), (LPARAM)callback);
1787 if(callback)
1788 delete callback;
1789 return(rc);
1790}
1791//******************************************************************************
1792//******************************************************************************
1793UINT WIN32API EnumClipboardFormats(UINT arg1)
1794{
1795#ifdef DEBUG
1796 WriteLog("USER32: EnumClipboardFormats\n");
1797#endif
1798 return O32_EnumClipboardFormats(arg1);
1799}
1800//******************************************************************************
1801//******************************************************************************
1802int WIN32API EnumPropsA(HWND arg1, PROPENUMPROCA arg2)
1803{
1804#ifdef DEBUG
1805 WriteLog("USER32: EnumPropsA DOES NOT WORK\n");
1806#endif
1807 //calling convention problems
1808 return 0;
1809// return O32_EnumProps(arg1, (PROPENUMPROC_O32)arg2);
1810}
1811//******************************************************************************
1812//******************************************************************************
1813int WIN32API EnumPropsExA( HWND arg1, PROPENUMPROCEXA arg2, LPARAM arg3)
1814{
1815#ifdef DEBUG
1816 WriteLog("USER32: EnumPropsExA DOES NOT WORK\n");
1817#endif
1818 //calling convention problems
1819 return 0;
1820// return O32_EnumPropsEx(arg1, arg2, (PROPENUMPROCEX_O32)arg3);
1821}
1822//******************************************************************************
1823//******************************************************************************
1824int WIN32API EnumPropsExW( HWND arg1, PROPENUMPROCEXW arg2, LPARAM arg3)
1825{
1826#ifdef DEBUG
1827 WriteLog("USER32: EnumPropsExW\n");
1828#endif
1829 // NOTE: This will not work as is (needs UNICODE support)
1830 //calling convention problems
1831 return 0;
1832// return O32_EnumPropsEx(arg1, arg2, arg3);
1833}
1834//******************************************************************************
1835//******************************************************************************
1836int WIN32API EnumPropsW( HWND arg1, PROPENUMPROCW arg2)
1837{
1838#ifdef DEBUG
1839 WriteLog("USER32: EnumPropsW\n");
1840#endif
1841 // NOTE: This will not work as is (needs UNICODE support)
1842 //calling convention problems
1843 return 0;
1844// return O32_EnumProps(arg1, arg2);
1845}
1846//******************************************************************************
1847//******************************************************************************
1848BOOL WIN32API EnumWindows(WNDENUMPROC lpfn, LPARAM lParam)
1849{
1850 BOOL rc;
1851 EnumWindowCallback *callback = new EnumWindowCallback(lpfn, lParam);
1852
1853#ifdef DEBUG
1854 WriteLog("USER32: EnumWindows\n");
1855#endif
1856 rc = O32_EnumWindows(callback->GetOS2Callback(), (LPARAM)callback);
1857 if(callback)
1858 delete callback;
1859 return(rc);
1860}
1861//******************************************************************************
1862//******************************************************************************
1863BOOL WIN32API EqualRect( const RECT * arg1, const RECT * arg2)
1864{
1865#ifdef DEBUG
1866 WriteLog("USER32: EqualRect\n");
1867#endif
1868 return O32_EqualRect(arg1, arg2);
1869}
1870//******************************************************************************
1871//******************************************************************************
1872BOOL WIN32API ExcludeUpdateRgn( HDC arg1, HWND arg2)
1873{
1874#ifdef DEBUG
1875 WriteLog("USER32: ExcludeUpdateRgn\n");
1876#endif
1877 return O32_ExcludeUpdateRgn(arg1, arg2);
1878}
1879//******************************************************************************
1880//******************************************************************************
1881BOOL WIN32API ExitWindowsEx( UINT arg1, DWORD arg2)
1882{
1883#ifdef DEBUG
1884 WriteLog("USER32: ExitWindowsEx\n");
1885#endif
1886 return O32_ExitWindowsEx(arg1, arg2);
1887}
1888//******************************************************************************
1889//******************************************************************************
1890int WIN32API FillRect(HDC arg1, const RECT * arg2, HBRUSH arg3)
1891{
1892#ifdef DEBUG
1893 WriteLog("USER32: FillRect (%d,%d)(%d,%d) brush %X\n", arg2->left, arg2->top, arg2->right, arg2->bottom, arg3);
1894#endif
1895 return O32_FillRect(arg1, arg2, arg3);
1896}
1897//******************************************************************************
1898//******************************************************************************
1899HWND WIN32API FindWindowW( LPCWSTR arg1, LPCWSTR arg2)
1900{
1901 char *astring1 = UnicodeToAsciiString((LPWSTR)arg1);
1902 char *astring2 = UnicodeToAsciiString((LPWSTR)arg2);
1903 HWND rc;
1904
1905#ifdef DEBUG
1906 WriteLog("USER32: FindWindowW\n");
1907#endif
1908 rc = O32_FindWindow(astring1, astring2);
1909 FreeAsciiString(astring1);
1910 FreeAsciiString(astring2);
1911 return rc;
1912}
1913//******************************************************************************
1914//******************************************************************************
1915int WIN32API FrameRect( HDC arg1, const RECT * arg2, HBRUSH arg3)
1916{
1917#ifdef DEBUG
1918 WriteLog("USER32: FrameRect\n");
1919#endif
1920 return O32_FrameRect(arg1, arg2, arg3);
1921}
1922//******************************************************************************
1923//******************************************************************************
1924HWND WIN32API GetCapture(void)
1925{
1926#ifdef DEBUG
1927 WriteLog("USER32: GetCapture\n");
1928#endif
1929 return O32_GetCapture();
1930}
1931//******************************************************************************
1932//******************************************************************************
1933UINT WIN32API GetCaretBlinkTime(void)
1934{
1935#ifdef DEBUG
1936 WriteLog("USER32: GetCaretBlinkTime\n");
1937#endif
1938 return O32_GetCaretBlinkTime();
1939}
1940//******************************************************************************
1941//******************************************************************************
1942BOOL WIN32API GetCaretPos( PPOINT arg1)
1943{
1944#ifdef DEBUG
1945 WriteLog("USER32: GetCaretPos\n");
1946#endif
1947 return O32_GetCaretPos(arg1);
1948}
1949//******************************************************************************
1950//******************************************************************************
1951BOOL WIN32API GetClipCursor( PRECT arg1)
1952{
1953#ifdef DEBUG
1954 WriteLog("USER32: GetClipCursor\n");
1955#endif
1956 return O32_GetClipCursor(arg1);
1957}
1958//******************************************************************************
1959//******************************************************************************
1960HANDLE WIN32API GetClipboardData( UINT arg1)
1961{
1962#ifdef DEBUG
1963 WriteLog("USER32: GetClipboardData\n");
1964#endif
1965 return O32_GetClipboardData(arg1);
1966}
1967//******************************************************************************
1968//******************************************************************************
1969int WIN32API GetClipboardFormatNameA( UINT arg1, LPSTR arg2, int arg3)
1970{
1971#ifdef DEBUG
1972 WriteLog("USER32: GetClipboardFormatNameA %s\n", arg2);
1973#endif
1974 return O32_GetClipboardFormatName(arg1, arg2, arg3);
1975}
1976//******************************************************************************
1977//******************************************************************************
1978int WIN32API GetClipboardFormatNameW(UINT arg1, LPWSTR arg2, int arg3)
1979{
1980 int rc;
1981 char *astring = UnicodeToAsciiString(arg2);
1982
1983#ifdef DEBUG
1984 WriteLog("USER32: GetClipboardFormatNameW %s\n", astring);
1985#endif
1986 rc = O32_GetClipboardFormatName(arg1, astring, arg3);
1987 FreeAsciiString(astring);
1988 return(rc);
1989}
1990//******************************************************************************
1991//******************************************************************************
1992HWND WIN32API GetClipboardOwner(void)
1993{
1994#ifdef DEBUG
1995 WriteLog("USER32: GetClipboardOwner\n");
1996#endif
1997 return O32_GetClipboardOwner();
1998}
1999//******************************************************************************
2000//******************************************************************************
2001HWND WIN32API GetClipboardViewer(void)
2002{
2003#ifdef DEBUG
2004 WriteLog("USER32: GetClipboardViewer\n");
2005#endif
2006 return O32_GetClipboardViewer();
2007}
2008//******************************************************************************
2009//******************************************************************************
2010DWORD WIN32API GetDialogBaseUnits(void)
2011{
2012#ifdef DEBUG
2013 WriteLog("USER32: GetDialogBaseUnits\n");
2014#endif
2015 return O32_GetDialogBaseUnits();
2016}
2017//******************************************************************************
2018//******************************************************************************
2019UINT WIN32API GetDlgItemInt( HWND arg1, int arg2, PBOOL arg3, BOOL arg4)
2020{
2021#ifdef DEBUG
2022 WriteLog("USER32: GetDlgItemInt\n");
2023#endif
2024 return O32_GetDlgItemInt(arg1, arg2, arg3, arg4);
2025}
2026
2027
2028/*****************************************************************************
2029 * Name : UINT WIN32API GetDlgItemTextW
2030 * Purpose : Determine the text of a window control
2031 * Parameters: HWND arg1
2032 * int arg2
2033 * LPWSTR arg3
2034 * UINT arg4
2035 * Variables :
2036 * Result :
2037 * Remark :
2038 * Status : UNTESTED UNKNOWN STUB
2039 *
2040 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2041 *****************************************************************************/
2042
2043UINT WIN32API GetDlgItemTextW(HWND arg1,
2044 int arg2,
2045 LPWSTR arg3,
2046 UINT arg4)
2047{
2048 LPSTR lpBuffer; /* temporary buffer for the ascii result */
2049 UINT uiResult; /* return value of the ascii variant */
2050
2051 dprintf(("USER32: GetDlgItemTextW(%08xh,%08xh,%08xh,%08xh)\n",
2052 arg1,
2053 arg2,
2054 arg3,
2055 arg4));
2056
2057
2058 lpBuffer = (LPSTR)malloc(arg4); /* allocate temporary buffer */
2059 uiResult = GetDlgItemTextA(arg1, /* call ascii variant */
2060 arg2,
2061 lpBuffer,
2062 arg4);
2063
2064 AsciiToUnicodeN(lpBuffer, /* now convert result to unicode */
2065 arg3,
2066 arg4);
2067
2068 free(lpBuffer); /* free the temporary buffer */
2069
2070 return (uiResult); /* OK, that's it */
2071}
2072
2073
2074//******************************************************************************
2075//******************************************************************************
2076UINT WIN32API GetDoubleClickTime(void)
2077{
2078#ifdef DEBUG
2079 WriteLog("USER32: GetDoubleClickTime\n");
2080#endif
2081 return O32_GetDoubleClickTime();
2082}
2083//******************************************************************************
2084//******************************************************************************
2085HWND WIN32API GetForegroundWindow(void)
2086{
2087#ifdef DEBUG
2088 WriteLog("USER32: GetForegroundWindow\n");
2089#endif
2090 return O32_GetForegroundWindow();
2091}
2092//******************************************************************************
2093//******************************************************************************
2094BOOL WIN32API GetIconInfo( HICON arg1, LPICONINFO arg2)
2095{
2096#ifdef DEBUG
2097 WriteLog("USER32: GetIconInfo\n");
2098#endif
2099 return O32_GetIconInfo(arg1, arg2);
2100}
2101//******************************************************************************
2102//******************************************************************************
2103int WIN32API GetKeyNameTextA( LPARAM arg1, LPSTR arg2, int arg3)
2104{
2105#ifdef DEBUG
2106 WriteLog("USER32: GetKeyNameTextA\n");
2107#endif
2108 return O32_GetKeyNameText(arg1, arg2, arg3);
2109}
2110//******************************************************************************
2111//******************************************************************************
2112int WIN32API GetKeyNameTextW( LPARAM arg1, LPWSTR arg2, int arg3)
2113{
2114#ifdef DEBUG
2115 WriteLog("USER32: GetKeyNameTextW DOES NOT WORK\n");
2116#endif
2117 // NOTE: This will not work as is (needs UNICODE support)
2118 return 0;
2119// return O32_GetKeyNameText(arg1, arg2, arg3);
2120}
2121//******************************************************************************
2122//******************************************************************************
2123int WIN32API GetKeyboardType( int arg1)
2124{
2125#ifdef DEBUG
2126 WriteLog("USER32: GetKeyboardType\n");
2127#endif
2128 return O32_GetKeyboardType(arg1);
2129}
2130//******************************************************************************
2131//******************************************************************************
2132HWND WIN32API GetLastActivePopup( HWND arg1)
2133{
2134#ifdef DEBUG
2135 WriteLog("USER32: GetLastActivePopup\n");
2136#endif
2137 return O32_GetLastActivePopup(arg1);
2138}
2139//******************************************************************************
2140//******************************************************************************
2141LONG WIN32API GetMessageExtraInfo(void)
2142{
2143 dprintf(("USER32: GetMessageExtraInfo\n"));
2144 return O32_GetMessageExtraInfo();
2145}
2146//******************************************************************************
2147//******************************************************************************
2148DWORD WIN32API GetMessagePos(void)
2149{
2150 dprintf(("USER32: GetMessagePos\n"));
2151 return O32_GetMessagePos();
2152}
2153//******************************************************************************
2154//******************************************************************************
2155LONG WIN32API GetMessageTime(void)
2156{
2157 dprintf(("USER32: GetMessageTime\n"));
2158 return O32_GetMessageTime();
2159}
2160//******************************************************************************
2161//******************************************************************************
2162BOOL WIN32API GetMessageW(LPMSG arg1, HWND arg2, UINT arg3, UINT arg4)
2163{
2164 BOOL rc;
2165
2166 // NOTE: This will not work as is (needs UNICODE support)
2167 rc = O32_GetMessage(arg1, arg2, arg3, arg4);
2168 dprintf(("USER32: GetMessageW %X returned %d\n", arg2, rc));
2169 return(rc);
2170}
2171//******************************************************************************
2172//******************************************************************************
2173HWND WIN32API GetNextDlgGroupItem( HWND arg1, HWND arg2, BOOL arg3)
2174{
2175#ifdef DEBUG
2176 WriteLog("USER32: GetNextDlgGroupItem\n");
2177#endif
2178 return O32_GetNextDlgGroupItem(arg1, arg2, arg3);
2179}
2180//******************************************************************************
2181//******************************************************************************
2182HWND WIN32API GetOpenClipboardWindow(void)
2183{
2184#ifdef DEBUG
2185 WriteLog("USER32: GetOpenClipboardWindow\n");
2186#endif
2187 return O32_GetOpenClipboardWindow();
2188}
2189//******************************************************************************
2190//******************************************************************************
2191HWND WIN32API GetParent( HWND arg1)
2192{
2193#ifdef DEBUG
2194//// WriteLog("USER32: GetParent\n");
2195#endif
2196 return O32_GetParent(arg1);
2197}
2198//******************************************************************************
2199//******************************************************************************
2200int WIN32API GetPriorityClipboardFormat( PUINT arg1, int arg2)
2201{
2202#ifdef DEBUG
2203 WriteLog("USER32: GetPriorityClipboardFormat\n");
2204#endif
2205 return O32_GetPriorityClipboardFormat(arg1, arg2);
2206}
2207//******************************************************************************
2208//******************************************************************************
2209HANDLE WIN32API GetPropA( HWND arg1, LPCSTR arg2)
2210{
2211#ifdef DEBUG
2212 if((int)arg2 >> 16 != 0)
2213 WriteLog("USER32: GetPropA %s\n", arg2);
2214 else WriteLog("USER32: GetPropA %X\n", arg2);
2215#endif
2216 return O32_GetProp(arg1, arg2);
2217}
2218//******************************************************************************
2219//******************************************************************************
2220HANDLE WIN32API GetPropW(HWND arg1, LPCWSTR arg2)
2221{
2222 BOOL handle;
2223 char *astring;
2224
2225 if((int)arg2 >> 16 != 0)
2226 astring = UnicodeToAsciiString((LPWSTR)arg2);
2227 else astring = (char *)arg2;
2228#ifdef DEBUG
2229 if((int)arg2 >> 16 != 0)
2230 WriteLog("USER32: GetPropW %s\n", astring);
2231 else WriteLog("USER32: GetPropW %X\n", astring);
2232#endif
2233 handle = GetPropA(arg1, (LPCSTR)astring);
2234 if((int)arg2 >> 16 != 0)
2235 FreeAsciiString(astring);
2236
2237 return(handle);
2238}
2239//******************************************************************************
2240//******************************************************************************
2241DWORD WIN32API GetQueueStatus( UINT arg1)
2242{
2243#ifdef DEBUG
2244 WriteLog("USER32: GetQueueStatus\n");
2245#endif
2246 return O32_GetQueueStatus(arg1);
2247}
2248//******************************************************************************
2249//******************************************************************************
2250int WIN32API GetScrollPos(HWND hwnd, int fnBar)
2251{
2252 int pos;
2253
2254 pos = O32_GetScrollPos(hwnd, fnBar);
2255#ifdef DEBUG
2256 WriteLog("USER32: GetScrollPos of %X type %d returned %d\n", hwnd, fnBar, pos);
2257#endif
2258 return(pos);
2259}
2260//******************************************************************************
2261//******************************************************************************
2262BOOL WIN32API GetScrollRange( HWND arg1, int arg2, int * arg3, int * arg4)
2263{
2264#ifdef DEBUG
2265 WriteLog("USER32: GetScrollRange\n");
2266#endif
2267 return O32_GetScrollRange(arg1, arg2, arg3, arg4);
2268}
2269//******************************************************************************
2270//******************************************************************************
2271DWORD WIN32API GetTabbedTextExtentA( HDC arg1, LPCSTR arg2, int arg3, int arg4, int * arg5)
2272{
2273#ifdef DEBUG
2274 WriteLog("USER32: GetTabbedTextExtentA\n");
2275#endif
2276 return O32_GetTabbedTextExtent(arg1, arg2, arg3, arg4, arg5);
2277}
2278//******************************************************************************
2279//******************************************************************************
2280DWORD WIN32API GetTabbedTextExtentW( HDC arg1, LPCWSTR arg2, int arg3, int arg4, int * arg5)
2281{
2282 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
2283 DWORD rc;
2284
2285#ifdef DEBUG
2286 WriteLog("USER32: GetTabbedTextExtentW\n");
2287#endif
2288 rc = O32_GetTabbedTextExtent(arg1, astring, arg3, arg4, arg5);
2289 FreeAsciiString(astring);
2290 return rc;
2291}
2292//******************************************************************************
2293//******************************************************************************
2294HWND WIN32API GetTopWindow( HWND arg1)
2295{
2296#ifdef DEBUG
2297//// WriteLog("USER32: GetTopWindow\n");
2298#endif
2299 return O32_GetTopWindow(arg1);
2300}
2301//******************************************************************************
2302//******************************************************************************
2303int WIN32API GetUpdateRgn( HWND arg1, HRGN arg2, BOOL arg3)
2304{
2305#ifdef DEBUG
2306 WriteLog("USER32: GetUpdateRgn\n");
2307#endif
2308 return O32_GetUpdateRgn(arg1, arg2, arg3);
2309}
2310//******************************************************************************
2311//******************************************************************************
2312LONG WIN32API GetWindowLongW( HWND arg1, int arg2)
2313{
2314#ifdef DEBUG
2315 WriteLog("USER32: GetWindowLongW\n");
2316#endif
2317 return GetWindowLongA(arg1, arg2); //class procedures..
2318}
2319//******************************************************************************
2320//******************************************************************************
2321BOOL WIN32API GetWindowPlacement( HWND arg1, LPWINDOWPLACEMENT arg2)
2322{
2323#ifdef DEBUG
2324 WriteLog("USER32: GetWindowPlacement\n");
2325#endif
2326 return O32_GetWindowPlacement(arg1, arg2);
2327}
2328//******************************************************************************
2329
2330/***********************************************************************
2331 * GetInternalWindowPos (USER32.245)
2332 */
2333UINT WIN32API GetInternalWindowPos(HWND hwnd,
2334 LPRECT rectWnd,
2335 LPPOINT ptIcon )
2336{
2337 WINDOWPLACEMENT wndpl;
2338
2339 dprintf(("USER32: GetInternalWindowPos(%08xh,%08xh,%08xh)\n",
2340 hwnd,
2341 rectWnd,
2342 ptIcon));
2343
2344 if (O32_GetWindowPlacement( hwnd, &wndpl ))
2345 {
2346 if (rectWnd) *rectWnd = wndpl.rcNormalPosition;
2347 if (ptIcon) *ptIcon = wndpl.ptMinPosition;
2348 return wndpl.showCmd;
2349 }
2350 return 0;
2351}
2352
2353
2354//******************************************************************************
2355int WIN32API GetWindowTextLengthW( HWND arg1)
2356{
2357#ifdef DEBUG
2358 WriteLog("USER32: GetWindowTextLengthW\n");
2359#endif
2360 return O32_GetWindowTextLength(arg1);
2361}
2362//******************************************************************************
2363//******************************************************************************
2364int WIN32API GetWindowTextW(HWND hwnd, LPWSTR lpsz, int cch)
2365{
2366 char title[128];
2367 int rc;
2368
2369 rc = O32_GetWindowText(hwnd, title, sizeof(title));
2370#ifdef DEBUG
2371 WriteLog("USER32: GetWindowTextW returned %s\n", title);
2372#endif
2373 if(rc > cch) {
2374 title[cch-1] = 0;
2375 rc = cch;
2376 }
2377 AsciiToUnicode(title, lpsz);
2378 return(rc);
2379}
2380//******************************************************************************
2381//******************************************************************************
2382DWORD WIN32API GetWindowThreadProcessId(HWND arg1, PDWORD arg2)
2383{
2384#ifdef DEBUG
2385 WriteLog("USER32: GetWindowThreadProcessId\n");
2386#endif
2387 return O32_GetWindowThreadProcessId(arg1, arg2);
2388}
2389//******************************************************************************
2390//******************************************************************************
2391WORD WIN32API GetWindowWord( HWND arg1, int arg2)
2392{
2393#ifdef DEBUG
2394 WriteLog("USER32: GetWindowWord\n");
2395#endif
2396 return O32_GetWindowWord(arg1, arg2);
2397}
2398//******************************************************************************
2399//******************************************************************************
2400BOOL WIN32API HideCaret( HWND arg1)
2401{
2402#ifdef DEBUG
2403 WriteLog("USER32: HideCaret\n");
2404#endif
2405 return O32_HideCaret(arg1);
2406}
2407//******************************************************************************
2408//******************************************************************************
2409BOOL WIN32API InSendMessage(void)
2410{
2411#ifdef DEBUG
2412 WriteLog("USER32: InSendMessage\n");
2413#endif
2414 return O32_InSendMessage();
2415}
2416//******************************************************************************
2417//******************************************************************************
2418BOOL WIN32API IntersectRect( PRECT arg1, const RECT * arg2, const RECT * arg3)
2419{
2420#ifdef DEBUG
2421//// WriteLog("USER32: IntersectRect\n");
2422#endif
2423 return O32_IntersectRect(arg1, arg2, arg3);
2424}
2425//******************************************************************************
2426//******************************************************************************
2427BOOL WIN32API InvalidateRgn( HWND arg1, HRGN arg2, BOOL arg3)
2428{
2429#ifdef DEBUG
2430 WriteLog("USER32: InvalidateRgn\n");
2431#endif
2432 return O32_InvalidateRgn(arg1, arg2, arg3);
2433}
2434//******************************************************************************
2435//******************************************************************************
2436BOOL WIN32API InvertRect( HDC arg1, const RECT * arg2)
2437{
2438#ifdef DEBUG
2439 WriteLog("USER32: InvertRect\n");
2440#endif
2441 return O32_InvertRect(arg1, arg2);
2442}
2443//******************************************************************************
2444//******************************************************************************
2445BOOL WIN32API IsChild( HWND arg1, HWND arg2)
2446{
2447#ifdef DEBUG
2448 WriteLog("USER32: IsChild\n");
2449#endif
2450 return O32_IsChild(arg1, arg2);
2451}
2452//******************************************************************************
2453//******************************************************************************
2454BOOL WIN32API IsClipboardFormatAvailable( UINT arg1)
2455{
2456#ifdef DEBUG
2457 WriteLog("USER32: IsClipboardFormatAvailable\n");
2458#endif
2459 return O32_IsClipboardFormatAvailable(arg1);
2460}
2461//******************************************************************************
2462//******************************************************************************
2463BOOL WIN32API IsDialogMessageW( HWND arg1, LPMSG arg2)
2464{
2465#ifdef DEBUG
2466 WriteLog("USER32: IsDialogMessageW\n");
2467#endif
2468 // NOTE: This will not work as is (needs UNICODE support)
2469 return O32_IsDialogMessage(arg1, arg2);
2470}
2471//******************************************************************************
2472//******************************************************************************
2473BOOL WIN32API IsRectEmpty( const RECT * arg1)
2474{
2475#ifdef DEBUG
2476 WriteLog("USER32: IsRectEmpty\n");
2477#endif
2478 return O32_IsRectEmpty(arg1);
2479}
2480//******************************************************************************
2481//******************************************************************************
2482BOOL WIN32API IsWindow( HWND arg1)
2483{
2484#ifdef DEBUG
2485 WriteLog("USER32: IsWindow\n");
2486#endif
2487 return O32_IsWindow(arg1);
2488}
2489//******************************************************************************
2490//******************************************************************************
2491BOOL WIN32API IsWindowEnabled( HWND arg1)
2492{
2493#ifdef DEBUG
2494 WriteLog("USER32: IsWindowEnabled\n");
2495#endif
2496 return O32_IsWindowEnabled(arg1);
2497}
2498//******************************************************************************
2499//******************************************************************************
2500BOOL WIN32API IsWindowVisible( HWND arg1)
2501{
2502#ifdef DEBUG
2503 WriteLog("USER32: IsWindowVisible\n");
2504#endif
2505 return O32_IsWindowVisible(arg1);
2506}
2507//******************************************************************************
2508//******************************************************************************
2509BOOL WIN32API IsZoomed( HWND arg1)
2510{
2511#ifdef DEBUG
2512 WriteLog("USER32: IsZoomed\n");
2513#endif
2514 return O32_IsZoomed(arg1);
2515}
2516//******************************************************************************
2517//******************************************************************************
2518BOOL WIN32API LockWindowUpdate( HWND arg1)
2519{
2520#ifdef DEBUG
2521 WriteLog("USER32: LockWindowUpdate\n");
2522#endif
2523 return O32_LockWindowUpdate(arg1);
2524}
2525//******************************************************************************
2526//******************************************************************************
2527BOOL WIN32API MapDialogRect( HWND arg1, PRECT arg2)
2528{
2529#ifdef DEBUG
2530 WriteLog("USER32: MapDialogRect\n");
2531#endif
2532 return O32_MapDialogRect(arg1, arg2);
2533}
2534//******************************************************************************
2535//******************************************************************************
2536UINT WIN32API MapVirtualKeyA( UINT arg1, UINT arg2)
2537{
2538#ifdef DEBUG
2539 WriteLog("USER32: MapVirtualKeyA\n");
2540#endif
2541 return O32_MapVirtualKey(arg1, arg2);
2542}
2543//******************************************************************************
2544//******************************************************************************
2545UINT WIN32API MapVirtualKeyW( UINT arg1, UINT arg2)
2546{
2547#ifdef DEBUG
2548 WriteLog("USER32: MapVirtualKeyW\n");
2549#endif
2550 // NOTE: This will not work as is (needs UNICODE support)
2551 return O32_MapVirtualKey(arg1, arg2);
2552}
2553//******************************************************************************
2554//******************************************************************************
2555int WIN32API MapWindowPoints( HWND arg1, HWND arg2, LPPOINT arg3, UINT arg4)
2556{
2557#ifdef DEBUG
2558 WriteLog("USER32: MapWindowPoints\n");
2559#endif
2560 return O32_MapWindowPoints(arg1, arg2, arg3, arg4);
2561}
2562//******************************************************************************
2563//******************************************************************************
2564int WIN32API MessageBoxW(HWND arg1, LPCWSTR arg2, LPCWSTR arg3, UINT arg4)
2565{
2566 char *astring1, *astring2;
2567 int rc;
2568
2569 astring1 = UnicodeToAsciiString((LPWSTR)arg2);
2570 astring2 = UnicodeToAsciiString((LPWSTR)arg3);
2571#ifdef DEBUG
2572 WriteLog("USER32: MessageBoxW %s %s\n", astring1, astring2);
2573#endif
2574 rc = O32_MessageBox(arg1, astring1, astring2, arg4);
2575 FreeAsciiString(astring1);
2576 FreeAsciiString(astring2);
2577 return(rc);
2578}
2579//******************************************************************************
2580//******************************************************************************
2581BOOL WIN32API OpenClipboard( HWND arg1)
2582{
2583#ifdef DEBUG
2584 WriteLog("USER32: OpenClipboard\n");
2585#endif
2586 return O32_OpenClipboard(arg1);
2587}
2588//******************************************************************************
2589//******************************************************************************
2590BOOL WIN32API PeekMessageW( LPMSG arg1, HWND arg2, UINT arg3, UINT arg4, UINT arg5)
2591{
2592#ifdef DEBUG
2593 WriteLog("USER32: PeekMessageW\n");
2594#endif
2595 // NOTE: This will not work as is (needs UNICODE support)
2596 return O32_PeekMessage(arg1, arg2, arg3, arg4, arg5);
2597}
2598//******************************************************************************
2599//******************************************************************************
2600// NOTE: Open32 function doesn't have the 'W'.
2601BOOL WIN32API PostMessageW( HWND arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
2602{
2603#ifdef DEBUG
2604 WriteLog("USER32: PostMessageW\n");
2605#endif
2606 // NOTE: This will not work as is (needs UNICODE support)
2607 return O32_PostMessage(arg1, arg2, arg3, arg4);
2608}
2609//******************************************************************************
2610//******************************************************************************
2611BOOL WIN32API PostThreadMessageA( DWORD arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
2612{
2613#ifdef DEBUG
2614 WriteLog("USER32: PostThreadMessageA\n");
2615#endif
2616 return O32_PostThreadMessage(arg1, arg2, arg3, arg4);
2617}
2618//******************************************************************************
2619//******************************************************************************
2620BOOL WIN32API PostThreadMessageW( DWORD arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
2621{
2622#ifdef DEBUG
2623 WriteLog("USER32: PostThreadMessageW\n");
2624#endif
2625 // NOTE: This will not work as is (needs UNICODE support)
2626 return O32_PostThreadMessage(arg1, arg2, arg3, arg4);
2627}
2628//******************************************************************************
2629//******************************************************************************
2630BOOL WIN32API PtInRect( const RECT * arg1, POINT arg2)
2631{
2632#ifdef DEBUG1
2633 WriteLog("USER32: PtInRect\n");
2634#endif
2635 return O32_PtInRect(arg1, arg2);
2636}
2637//******************************************************************************
2638//******************************************************************************
2639BOOL WIN32API RedrawWindow( HWND arg1, const RECT * arg2, HRGN arg3, UINT arg4)
2640{
2641 BOOL rc;
2642
2643 rc = O32_RedrawWindow(arg1, arg2, arg3, arg4);
2644#ifdef DEBUG
2645 WriteLog("USER32: RedrawWindow %X , %X, %X, %X returned %d\n", arg1, arg2, arg3, arg4, rc);
2646#endif
2647 InvalidateRect(arg1, arg2, TRUE);
2648 UpdateWindow(arg1);
2649 SendMessageA(arg1, WM_PAINT, 0, 0);
2650 return(rc);
2651}
2652//******************************************************************************
2653//******************************************************************************
2654UINT WIN32API RegisterClipboardFormatA( LPCSTR arg1)
2655{
2656#ifdef DEBUG
2657 WriteLog("USER32: RegisterClipboardFormatA\n");
2658#endif
2659 return O32_RegisterClipboardFormat(arg1);
2660}
2661//******************************************************************************
2662//******************************************************************************
2663UINT WIN32API RegisterClipboardFormatW(LPCWSTR arg1)
2664{
2665 UINT rc;
2666 char *astring = UnicodeToAsciiString((LPWSTR)arg1);
2667
2668#ifdef DEBUG
2669 WriteLog("USER32: RegisterClipboardFormatW %s\n", astring);
2670#endif
2671 rc = O32_RegisterClipboardFormat(astring);
2672 FreeAsciiString(astring);
2673#ifdef DEBUG
2674 WriteLog("USER32: RegisterClipboardFormatW returned %d\n", rc);
2675#endif
2676 return(rc);
2677}
2678//******************************************************************************
2679//******************************************************************************
2680UINT WIN32API RegisterWindowMessageW( LPCWSTR arg1)
2681{
2682 char *astring = UnicodeToAsciiString((LPWSTR)arg1);
2683 UINT rc;
2684
2685#ifdef DEBUG
2686 WriteLog("USER32: RegisterWindowMessageW\n");
2687#endif
2688 rc = O32_RegisterWindowMessage(astring);
2689 FreeAsciiString(astring);
2690 return rc;
2691}
2692//******************************************************************************
2693//******************************************************************************
2694HANDLE WIN32API RemovePropA( HWND arg1, LPCSTR arg2)
2695{
2696#ifdef DEBUG
2697 WriteLog("USER32: RemovePropA\n");
2698#endif
2699 return O32_RemoveProp(arg1, arg2);
2700}
2701//******************************************************************************
2702//******************************************************************************
2703HANDLE WIN32API RemovePropW( HWND arg1, LPCWSTR arg2)
2704{
2705 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
2706 HANDLE rc;
2707
2708#ifdef DEBUG
2709 WriteLog("USER32: RemovePropW\n");
2710#endif
2711 rc = O32_RemoveProp(arg1, astring);
2712 FreeAsciiString(astring);
2713 return rc;
2714}
2715//******************************************************************************
2716//******************************************************************************
2717BOOL WIN32API ReplyMessage( LRESULT arg1)
2718{
2719#ifdef DEBUG
2720 WriteLog("USER32: ReplyMessage\n");
2721#endif
2722 return O32_ReplyMessage(arg1);
2723}
2724//******************************************************************************
2725//******************************************************************************
2726BOOL WIN32API ScreenToClient( HWND arg1, LPPOINT arg2)
2727{
2728#ifdef DEBUG
2729 WriteLog("USER32: ScreenToClient\n");
2730#endif
2731 return O32_ScreenToClient(arg1, arg2);
2732}
2733//******************************************************************************
2734//******************************************************************************
2735BOOL WIN32API ScrollDC( HDC arg1, int arg2, int arg3, const RECT * arg4, const RECT * arg5, HRGN arg6, PRECT arg7)
2736{
2737#ifdef DEBUG
2738 WriteLog("USER32: ScrollDC\n");
2739#endif
2740 return O32_ScrollDC(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
2741}
2742//******************************************************************************
2743//******************************************************************************
2744BOOL WIN32API ScrollWindow( HWND arg1, int arg2, int arg3, const RECT * arg4, const RECT * arg5)
2745{
2746#ifdef DEBUG
2747 WriteLog("USER32: ScrollWindow\n");
2748#endif
2749 return O32_ScrollWindow(arg1, arg2, arg3, arg4, arg5);
2750}
2751//******************************************************************************
2752//******************************************************************************
2753BOOL WIN32API ScrollWindowEx( HWND arg1, int arg2, int arg3, const RECT * arg4, const RECT * arg5, HRGN arg6, PRECT arg7, UINT arg8)
2754{
2755#ifdef DEBUG
2756 WriteLog("USER32: ScrollWindowEx\n");
2757#endif
2758 return O32_ScrollWindowEx(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
2759}
2760//******************************************************************************
2761//******************************************************************************
2762LONG WIN32API SendDlgItemMessageW( HWND arg1, int arg2, UINT arg3, WPARAM arg4, LPARAM arg5)
2763{
2764#ifdef DEBUG
2765 WriteLog("USER32: SendDlgItemMessageW\n");
2766#endif
2767 return O32_SendDlgItemMessage(arg1, arg2, arg3, arg4, arg5);
2768}
2769//******************************************************************************
2770//******************************************************************************
2771LRESULT WIN32API SendMessageW( HWND arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
2772{
2773LRESULT rc;
2774
2775#ifdef DEBUG
2776 WriteLog("USER32: SendMessageW....\n");
2777#endif
2778 rc = O32_SendMessage(arg1, arg2, arg3, arg4);
2779#ifdef DEBUG
2780 WriteLog("USER32: SendMessageW %X %X %X %X returned %d\n", arg1, arg2, arg3, arg4, rc);
2781#endif
2782 return(rc);
2783}
2784//******************************************************************************
2785//******************************************************************************
2786BOOL WIN32API SetCaretBlinkTime( UINT arg1)
2787{
2788#ifdef DEBUG
2789 WriteLog("USER32: SetCaretBlinkTime\n");
2790#endif
2791 return O32_SetCaretBlinkTime(arg1);
2792}
2793//******************************************************************************
2794//******************************************************************************
2795BOOL WIN32API SetCaretPos( int arg1, int arg2)
2796{
2797 dprintf(("USER32: SetCaretPos\n"));
2798 return O32_SetCaretPos(arg1, arg2);
2799}
2800//******************************************************************************
2801//******************************************************************************
2802HANDLE WIN32API SetClipboardData( UINT arg1, HANDLE arg2)
2803{
2804 dprintf(("USER32: SetClipboardData\n"));
2805 return O32_SetClipboardData(arg1, arg2);
2806}
2807//******************************************************************************
2808//******************************************************************************
2809HWND WIN32API SetClipboardViewer( HWND arg1)
2810{
2811 dprintf(("USER32: SetClipboardViewer\n"));
2812 return O32_SetClipboardViewer(arg1);
2813}
2814//******************************************************************************
2815//******************************************************************************
2816BOOL WIN32API SetDlgItemTextW( HWND arg1, int arg2, LPCWSTR arg3)
2817{
2818char *astring = UnicodeToAsciiString((LPWSTR)arg3);
2819BOOL rc;
2820
2821#ifdef DEBUG
2822 WriteLog("USER32: SetDlgItemTextW\n");
2823#endif
2824 // NOTE: This will not work as is (needs UNICODE support)
2825 rc = O32_SetDlgItemText(arg1, arg2, astring);
2826 FreeAsciiString(astring);
2827 return rc;
2828}
2829//******************************************************************************
2830//******************************************************************************
2831BOOL WIN32API SetDoubleClickTime( UINT arg1)
2832{
2833#ifdef DEBUG
2834 WriteLog("USER32: SetDoubleClickTime\n");
2835#endif
2836 return O32_SetDoubleClickTime(arg1);
2837}
2838//******************************************************************************
2839//******************************************************************************
2840HWND WIN32API SetParent( HWND arg1, HWND arg2)
2841{
2842#ifdef DEBUG
2843 WriteLog("USER32: SetParent\n");
2844#endif
2845 return O32_SetParent(arg1, arg2);
2846}
2847//******************************************************************************
2848//******************************************************************************
2849BOOL WIN32API SetPropA( HWND arg1, LPCSTR arg2, HANDLE arg3)
2850{
2851#ifdef DEBUG
2852 if((int)arg2 >> 16 != 0)
2853 WriteLog("USER32: SetPropA %S\n", arg2);
2854 else WriteLog("USER32: SetPropA %X\n", arg2);
2855#endif
2856 return O32_SetProp(arg1, arg2, arg3);
2857}
2858//******************************************************************************
2859//******************************************************************************
2860BOOL WIN32API SetPropW(HWND arg1, LPCWSTR arg2, HANDLE arg3)
2861{
2862 BOOL rc;
2863 char *astring;
2864
2865 if((int)arg2 >> 16 != 0)
2866 astring = UnicodeToAsciiString((LPWSTR)arg2);
2867 else astring = (char *)arg2;
2868
2869#ifdef DEBUG
2870 if((int)arg2 >> 16 != 0)
2871 WriteLog("USER32: SetPropW %S\n", astring);
2872 else WriteLog("USER32: SetPropW %X\n", astring);
2873#endif
2874 rc = O32_SetProp(arg1, astring, arg3);
2875 if((int)astring >> 16 != 0)
2876 FreeAsciiString(astring);
2877 return(rc);
2878}
2879//******************************************************************************
2880//******************************************************************************
2881BOOL WIN32API SetRectEmpty( PRECT arg1)
2882{
2883#ifdef DEBUG
2884 WriteLog("USER32: SetRectEmpty\n");
2885#endif
2886 return O32_SetRectEmpty(arg1);
2887}
2888//******************************************************************************
2889//******************************************************************************
2890int WIN32API SetScrollPos( HWND arg1, int arg2, int arg3, BOOL arg4)
2891{
2892#ifdef DEBUG
2893 WriteLog("USER32: SetScrollPos\n");
2894#endif
2895 return O32_SetScrollPos(arg1, arg2, arg3, arg4);
2896}
2897//******************************************************************************
2898//******************************************************************************
2899BOOL WIN32API SetScrollRange( HWND arg1, int arg2, int arg3, int arg4, BOOL arg5)
2900{
2901#ifdef DEBUG
2902 WriteLog("USER32: SetScrollRange\n");
2903#endif
2904 return O32_SetScrollRange(arg1, arg2, arg3, arg4, arg5);
2905}
2906//******************************************************************************
2907//******************************************************************************
2908LONG WIN32API SetWindowLongA(HWND hwnd, int nIndex, LONG arg3)
2909{
2910 LONG rc;
2911
2912 dprintf(("USER32: SetWindowLongA %X %d %X\n", hwnd, nIndex, arg3));
2913 if(nIndex == GWL_WNDPROC || nIndex == DWL_DLGPROC) {
2914 Win32WindowProc *wndproc = Win32WindowProc::FindProc(hwnd);
2915 if(wndproc == NULL) {//created with system class and app wants to change the handler
2916 dprintf(("USER32: SetWindowLong new WindowProc for system class\n"));
2917 wndproc = new Win32WindowProc((WNDPROC)arg3);
2918 wndproc->SetWindowHandle(hwnd);
2919 rc = O32_GetWindowLong(hwnd, nIndex);
2920 Win32WindowSubProc *subwndproc = new Win32WindowSubProc(hwnd, (WNDPROC_O32)rc);
2921 O32_SetWindowLong(hwnd, nIndex, (LONG)wndproc->GetOS2Callback());
2922 return((LONG)subwndproc->GetWin32Callback());
2923 }
2924 else {
2925 if(!(nIndex == DWL_DLGPROC && wndproc->IsWindow() == TRUE)) {
2926 rc = (LONG)wndproc->GetWin32Callback();
2927 dprintf(("USER32: SetWindowLong change WindowProc %X to %X\n", rc, arg3));
2928 wndproc->SetWin32Callback((WNDPROC)arg3);
2929 return(rc);
2930 }
2931 //else window that accesses it's normal window data
2932 }
2933 }
2934 return O32_SetWindowLong(hwnd, nIndex, arg3);
2935}
2936//******************************************************************************
2937//TODO: Is this always correct? (GWL_ID: window identifier??)
2938//******************************************************************************
2939LONG WIN32API SetWindowLongW(HWND arg1, int arg2, LONG arg3)
2940{
2941 dprintf(("USER32: SetWindowLongW %X %d %X\n", arg1, arg2, arg3));
2942 return SetWindowLongA(arg1, arg2, arg3);
2943}
2944//******************************************************************************
2945//******************************************************************************
2946BOOL WIN32API SetWindowPlacement( HWND arg1, const WINDOWPLACEMENT * arg2)
2947{
2948 dprintf(("USER32: SetWindowPlacement\n"));
2949 return O32_SetWindowPlacement(arg1, arg2);
2950}
2951//******************************************************************************
2952//******************************************************************************
2953BOOL WIN32API SetWindowTextW( HWND arg1, LPCWSTR arg2)
2954{
2955 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
2956 BOOL rc;
2957
2958 rc = SetWindowTextA(arg1, (LPCSTR)astring);
2959 dprintf(("USER32: SetWindowTextW %X %s returned %d\n", arg1, astring, rc));
2960 FreeAsciiString(astring);
2961 return(rc);
2962}
2963//******************************************************************************
2964//******************************************************************************
2965WORD WIN32API SetWindowWord( HWND arg1, int arg2, WORD arg3)
2966{
2967 dprintf(("USER32: SetWindowWord\n"));
2968 return O32_SetWindowWord(arg1, arg2, arg3);
2969}
2970//******************************************************************************
2971//******************************************************************************
2972BOOL WIN32API ShowCaret( HWND arg1)
2973{
2974 dprintf(("USER32: ShowCaret\n"));
2975 return O32_ShowCaret(arg1);
2976}
2977//******************************************************************************
2978//******************************************************************************
2979BOOL WIN32API ShowOwnedPopups( HWND arg1, BOOL arg2)
2980{
2981 dprintf(("USER32: ShowOwnedPopups\n"));
2982 return O32_ShowOwnedPopups(arg1, arg2);
2983}
2984//******************************************************************************
2985//******************************************************************************
2986BOOL WIN32API ShowScrollBar( HWND arg1, int arg2, BOOL arg3)
2987{
2988#ifdef DEBUG
2989 WriteLog("USER32: ShowScrollBar\n");
2990#endif
2991 return O32_ShowScrollBar(arg1, arg2, arg3);
2992}
2993//******************************************************************************
2994//******************************************************************************
2995BOOL WIN32API SwapMouseButton( BOOL arg1)
2996{
2997#ifdef DEBUG
2998 WriteLog("USER32: SwapMouseButton\n");
2999#endif
3000 return O32_SwapMouseButton(arg1);
3001}
3002//******************************************************************************
3003//******************************************************************************
3004BOOL WIN32API SystemParametersInfoA(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni)
3005{
3006 BOOL rc;
3007 NONCLIENTMETRICSA *cmetric = (NONCLIENTMETRICSA *)pvParam;
3008
3009 switch(uiAction) {
3010 case SPI_SCREENSAVERRUNNING:
3011 *(BOOL *)pvParam = FALSE;
3012 rc = TRUE;
3013 break;
3014 case SPI_GETDRAGFULLWINDOWS:
3015 *(BOOL *)pvParam = FALSE;
3016 rc = TRUE;
3017 break;
3018 case SPI_GETNONCLIENTMETRICS:
3019 memset(cmetric, 0, sizeof(NONCLIENTMETRICSA));
3020 cmetric->cbSize = sizeof(NONCLIENTMETRICSA);
3021 O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfCaptionFont),0);
3022 O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfMenuFont),0);
3023 O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfStatusFont),0);
3024 O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfMessageFont),0);
3025 cmetric->iBorderWidth = GetSystemMetrics(SM_CXBORDER);
3026 cmetric->iScrollWidth = GetSystemMetrics(SM_CXHSCROLL);
3027 cmetric->iScrollHeight = GetSystemMetrics(SM_CYHSCROLL);
3028 cmetric->iCaptionWidth = 32; //TODO
3029 cmetric->iCaptionHeight = 16; //TODO
3030 cmetric->iSmCaptionWidth = GetSystemMetrics(SM_CXSMSIZE);
3031 cmetric->iSmCaptionHeight = GetSystemMetrics(SM_CYSMSIZE);
3032 cmetric->iMenuWidth = 32; //TODO
3033 cmetric->iMenuHeight = GetSystemMetrics(SM_CYMENU);
3034 rc = TRUE;
3035 break;
3036 case 104: //TODO: Undocumented
3037 rc = 16;
3038 break;
3039 default:
3040 rc = O32_SystemParametersInfo(uiAction, uiParam, pvParam, fWinIni);
3041 break;
3042 }
3043#ifdef DEBUG
3044 WriteLog("USER32: SystemParametersInfoA %d, returned %d\n", uiAction, rc);
3045#endif
3046 return(rc);
3047}
3048//******************************************************************************
3049//TODO: Check for more options that have different structs for Unicode!!!!
3050//******************************************************************************
3051BOOL WIN32API SystemParametersInfoW(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni)
3052{
3053 BOOL rc;
3054 NONCLIENTMETRICSW *clientMetricsW = (NONCLIENTMETRICSW *)pvParam;
3055 NONCLIENTMETRICSA clientMetricsA = {0};
3056 PVOID pvParamA;
3057 UINT uiParamA;
3058
3059 switch(uiAction) {
3060 case SPI_SETNONCLIENTMETRICS:
3061 clientMetricsA.cbSize = sizeof(NONCLIENTMETRICSA);
3062 clientMetricsA.iBorderWidth = clientMetricsW->iBorderWidth;
3063 clientMetricsA.iScrollWidth = clientMetricsW->iScrollWidth;
3064 clientMetricsA.iScrollHeight = clientMetricsW->iScrollHeight;
3065 clientMetricsA.iCaptionWidth = clientMetricsW->iCaptionWidth;
3066 clientMetricsA.iCaptionHeight = clientMetricsW->iCaptionHeight;
3067 ConvertFontWA(&clientMetricsW->lfCaptionFont, &clientMetricsA.lfCaptionFont);
3068 clientMetricsA.iSmCaptionWidth = clientMetricsW->iSmCaptionWidth;
3069 clientMetricsA.iSmCaptionHeight = clientMetricsW->iSmCaptionHeight;
3070 ConvertFontWA(&clientMetricsW->lfSmCaptionFont, &clientMetricsA.lfSmCaptionFont);
3071 clientMetricsA.iMenuWidth = clientMetricsW->iMenuWidth;
3072 clientMetricsA.iMenuHeight = clientMetricsW->iMenuHeight;
3073 ConvertFontWA(&clientMetricsW->lfMenuFont, &clientMetricsA.lfMenuFont);
3074 ConvertFontWA(&clientMetricsW->lfStatusFont, &clientMetricsA.lfStatusFont);
3075 ConvertFontWA(&clientMetricsW->lfMessageFont, &clientMetricsA.lfMessageFont);
3076 //no break
3077 case SPI_GETNONCLIENTMETRICS:
3078 uiParamA = sizeof(NONCLIENTMETRICSA);
3079 pvParamA = &clientMetricsA;
3080 break;
3081 default:
3082 pvParamA = pvParam;
3083 uiParamA = uiParam;
3084 break;
3085 }
3086 rc = SystemParametersInfoA(uiAction, uiParamA, pvParamA, fWinIni);
3087
3088 switch(uiAction) {
3089 case SPI_GETNONCLIENTMETRICS:
3090 clientMetricsW->cbSize = sizeof(*clientMetricsW);
3091 clientMetricsW->iBorderWidth = clientMetricsA.iBorderWidth;
3092 clientMetricsW->iScrollWidth = clientMetricsA.iScrollWidth;
3093 clientMetricsW->iScrollHeight = clientMetricsA.iScrollHeight;
3094 clientMetricsW->iCaptionWidth = clientMetricsA.iCaptionWidth;
3095 clientMetricsW->iCaptionHeight = clientMetricsA.iCaptionHeight;
3096 ConvertFontAW(&clientMetricsA.lfCaptionFont, &clientMetricsW->lfCaptionFont);
3097
3098 clientMetricsW->iSmCaptionWidth = clientMetricsA.iSmCaptionWidth;
3099 clientMetricsW->iSmCaptionHeight = clientMetricsA.iSmCaptionHeight;
3100 ConvertFontAW(&clientMetricsA.lfSmCaptionFont, &clientMetricsW->lfSmCaptionFont);
3101
3102 clientMetricsW->iMenuWidth = clientMetricsA.iMenuWidth;
3103 clientMetricsW->iMenuHeight = clientMetricsA.iMenuHeight;
3104 ConvertFontAW(&clientMetricsA.lfMenuFont, &clientMetricsW->lfMenuFont);
3105 ConvertFontAW(&clientMetricsA.lfStatusFont, &clientMetricsW->lfStatusFont);
3106 ConvertFontAW(&clientMetricsA.lfMessageFont, &clientMetricsW->lfMessageFont);
3107 break;
3108 }
3109#ifdef DEBUG
3110 WriteLog("USER32: SystemParametersInfoW %d, returned %d\n", uiAction, rc);
3111#endif
3112 return(rc);
3113}
3114//******************************************************************************
3115//******************************************************************************
3116LONG WIN32API TabbedTextOutA( HDC arg1, int arg2, int arg3, LPCSTR arg4, int arg5, int arg6, int * arg7, int arg8)
3117{
3118#ifdef DEBUG
3119 WriteLog("USER32: TabbedTextOutA\n");
3120#endif
3121 return O32_TabbedTextOut(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
3122}
3123//******************************************************************************
3124//******************************************************************************
3125LONG WIN32API TabbedTextOutW( HDC arg1, int arg2, int arg3, LPCWSTR arg4, int arg5, int arg6, int * arg7, int arg8)
3126{
3127 char *astring = UnicodeToAsciiString((LPWSTR)arg4);
3128 LONG rc;
3129
3130#ifdef DEBUG
3131 WriteLog("USER32: TabbedTextOutW\n");
3132#endif
3133 rc = O32_TabbedTextOut(arg1, arg2, arg3, astring, arg5, arg6, arg7, arg8);
3134 FreeAsciiString(astring);
3135 return rc;
3136}
3137//******************************************************************************
3138//******************************************************************************
3139int WIN32API TranslateAccelerator( HWND arg1, HACCEL arg2, LPMSG arg3)
3140{
3141#ifdef DEBUG
3142 WriteLog("USER32: TranslateAccelerator\n");
3143#endif
3144 return O32_TranslateAccelerator(arg1, arg2, arg3);
3145}
3146//******************************************************************************
3147//******************************************************************************
3148int WIN32API TranslateAcceleratorW( HWND arg1, HACCEL arg2, LPMSG arg3)
3149{
3150#ifdef DEBUG
3151 WriteLog("USER32: TranslateAcceleratorW\n");
3152#endif
3153 // NOTE: This will not work as is (needs UNICODE support)
3154 return O32_TranslateAccelerator(arg1, arg2, arg3);
3155}
3156//******************************************************************************
3157//******************************************************************************
3158BOOL WIN32API TranslateMDISysAccel( HWND arg1, LPMSG arg2)
3159{
3160#ifdef DEBUG
3161//// WriteLog("USER32: TranslateMDISysAccel\n");
3162#endif
3163 return O32_TranslateMDISysAccel(arg1, arg2);
3164}
3165//******************************************************************************
3166//******************************************************************************
3167BOOL WIN32API UnionRect( PRECT arg1, const RECT * arg2, const RECT * arg3)
3168{
3169#ifdef DEBUG
3170 WriteLog("USER32: UnionRect\n");
3171#endif
3172 return O32_UnionRect(arg1, arg2, arg3);
3173}
3174//******************************************************************************
3175//******************************************************************************
3176BOOL WIN32API ValidateRect( HWND arg1, const RECT * arg2)
3177{
3178#ifdef DEBUG
3179 WriteLog("USER32: ValidateRect\n");
3180#endif
3181 return O32_ValidateRect(arg1, arg2);
3182}
3183//******************************************************************************
3184//******************************************************************************
3185BOOL WIN32API ValidateRgn( HWND arg1, HRGN arg2)
3186{
3187#ifdef DEBUG
3188 WriteLog("USER32: ValidateRgn\n");
3189#endif
3190 return O32_ValidateRgn(arg1, arg2);
3191}
3192//******************************************************************************
3193//******************************************************************************
3194WORD WIN32API VkKeyScanW( WCHAR arg1)
3195{
3196#ifdef DEBUG
3197 WriteLog("USER32: VkKeyScanW\n");
3198#endif
3199 // NOTE: This will not work as is (needs UNICODE support)
3200 return O32_VkKeyScan((char)arg1);
3201}
3202//******************************************************************************
3203//******************************************************************************
3204BOOL WIN32API WaitMessage(void)
3205{
3206#ifdef DEBUG
3207 WriteLog("USER32: WaitMessage\n");
3208#endif
3209 return O32_WaitMessage();
3210}
3211//******************************************************************************
3212//******************************************************************************
3213BOOL WIN32API WinHelpW( HWND arg1, LPCWSTR arg2, UINT arg3, DWORD arg4)
3214{
3215 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
3216 BOOL rc;
3217
3218#ifdef DEBUG
3219 WriteLog("USER32: WinHelpW\n");
3220#endif
3221 rc = WinHelpA(arg1, astring, arg3, arg4);
3222 FreeAsciiString(astring);
3223 return rc;
3224}
3225//******************************************************************************
3226//******************************************************************************
3227HWND WIN32API WindowFromDC( HDC arg1)
3228{
3229#ifdef DEBUG
3230 WriteLog("USER32: WindowFromDC\n");
3231#endif
3232 return O32_WindowFromDC(arg1);
3233}
3234//******************************************************************************
3235//******************************************************************************
3236HWND WIN32API WindowFromPoint( POINT arg1)
3237{
3238#ifdef DEBUG
3239 WriteLog("USER32: WindowFromPoint\n");
3240#endif
3241 return O32_WindowFromPoint(arg1);
3242}
3243//******************************************************************************
3244//******************************************************************************
3245int WIN32API wvsprintfA( LPSTR arg1, LPCSTR arg2, va_list arg3)
3246{
3247#ifdef DEBUG
3248 WriteLog("USER32: wvsprintfA\n");
3249#endif
3250 return O32_wvsprintf(arg1, arg2, (LPCVOID *)arg3);
3251}
3252//******************************************************************************
3253//******************************************************************************
3254int WIN32API wvsprintfW(LPWSTR lpOut, LPCWSTR lpFmt, va_list argptr)
3255{
3256 int rc;
3257 char szOut[256];
3258 char *lpFmtA;
3259
3260 lpFmtA = UnicodeToAsciiString((LPWSTR)lpFmt);
3261#ifdef DEBUG
3262 WriteLog("USER32: wvsprintfW, DOES NOT HANDLE UNICODE STRINGS!\n");
3263 WriteLog("USER32: %s\n", lpFmt);
3264#endif
3265 rc = O32_wvsprintf(szOut, lpFmtA, (LPCVOID)argptr);
3266
3267 AsciiToUnicode(szOut, lpOut);
3268#ifdef DEBUG
3269 WriteLog("USER32: %s\n", lpOut);
3270#endif
3271 FreeAsciiString(lpFmtA);
3272 return(rc);
3273}
3274//******************************************************************************
3275//No need to support this
3276//******************************************************************************
3277BOOL WIN32API SetMessageQueue(int cMessagesMax)
3278{
3279#ifdef DEBUG
3280 WriteLog("USER32: SetMessageQueue\n");
3281#endif
3282 return(TRUE);
3283}
3284//******************************************************************************
3285//TODO: Not complete
3286//******************************************************************************
3287BOOL WIN32API GetScrollInfo(HWND hwnd, int fnBar, LPSCROLLINFO lpsi)
3288{
3289#ifdef DEBUG
3290 WriteLog("USER32: GetScrollInfo\n");
3291#endif
3292 if(lpsi == NULL)
3293 return(FALSE);
3294
3295 if(lpsi->fMask & SIF_POS)
3296 lpsi->nPos = GetScrollPos(hwnd, fnBar);
3297 if(lpsi->fMask & SIF_RANGE)
3298 GetScrollRange(hwnd, fnBar, &lpsi->nMin, &lpsi->nMax);
3299 if(lpsi->fMask & SIF_PAGE) {
3300#ifdef DEBUG
3301 WriteLog("USER32: GetScrollInfo, page info not implemented\n");
3302#endif
3303 lpsi->nPage = 25;
3304 }
3305 return(TRUE);
3306}
3307//******************************************************************************
3308//TODO: Not complete
3309//******************************************************************************
3310INT WIN32API SetScrollInfo(HWND hwnd, INT fnBar, const SCROLLINFO *lpsi, BOOL fRedraw)
3311{
3312 int smin, smax;
3313
3314#ifdef DEBUG
3315 WriteLog("USER32: SetScrollInfo\n");
3316#endif
3317 if(lpsi == NULL)
3318 return(FALSE);
3319
3320 if(lpsi->fMask & SIF_POS)
3321 SetScrollPos(hwnd, fnBar, lpsi->nPos, fRedraw);
3322 if(lpsi->fMask & SIF_RANGE)
3323 SetScrollRange(hwnd, fnBar, lpsi->nMin, lpsi->nMax, fRedraw);
3324 if(lpsi->fMask & SIF_PAGE) {
3325#ifdef DEBUG
3326 WriteLog("USER32: GetScrollInfo, page info not implemented\n");
3327#endif
3328 }
3329 if(lpsi->fMask & SIF_DISABLENOSCROLL) {
3330#ifdef DEBUG
3331 WriteLog("USER32: GetScrollInfo, disable scrollbar not yet implemented\n");
3332#endif
3333 }
3334 return(TRUE);
3335}
3336//******************************************************************************
3337//******************************************************************************
3338BOOL WIN32API GrayStringA(HDC hdc, HBRUSH hBrush, GRAYSTRINGPROC lpOutputFunc,
3339 LPARAM lpData, int nCount, int X, int Y, int nWidth,
3340 int nHeight)
3341{
3342 BOOL rc;
3343 COLORREF curclr;
3344
3345#ifdef DEBUG
3346 WriteLog("USER32: GrayStringA, not completely implemented\n");
3347#endif
3348 if(lpOutputFunc == NULL && lpData == NULL) {
3349#ifdef DEBUG
3350 WriteLog("USER32: lpOutputFunc == NULL && lpData == NULL\n");
3351#endif
3352 return(FALSE);
3353 }
3354 if(lpOutputFunc) {
3355 return(lpOutputFunc(hdc, lpData, nCount));
3356 }
3357 curclr = SetTextColor(hdc, GetSysColor(COLOR_GRAYTEXT));
3358 rc = TextOutA(hdc, X, Y, (char *)lpData, nCount);
3359 SetTextColor(hdc, curclr);
3360
3361 return(rc);
3362}
3363//******************************************************************************
3364//******************************************************************************
3365BOOL WIN32API GrayStringW(HDC hdc, HBRUSH hBrush, GRAYSTRINGPROC lpOutputFunc,
3366 LPARAM lpData, int nCount, int X, int Y, int nWidth,
3367 int nHeight)
3368{
3369 BOOL rc;
3370 char *astring;
3371 COLORREF curclr;
3372
3373#ifdef DEBUG
3374 WriteLog("USER32: GrayStringW, not completely implemented\n");
3375#endif
3376
3377 if(lpOutputFunc == NULL && lpData == NULL) {
3378#ifdef DEBUG
3379 WriteLog("USER32: lpOutputFunc == NULL && lpData == NULL\n");
3380#endif
3381 return(FALSE);
3382 }
3383 if(nCount == 0)
3384 nCount = UniStrlen((UniChar*)lpData);
3385
3386 if(lpOutputFunc) {
3387 return(lpOutputFunc(hdc, lpData, nCount));
3388 }
3389 astring = UnicodeToAsciiString((LPWSTR)lpData);
3390
3391 curclr = SetTextColor(hdc, GetSysColor(COLOR_GRAYTEXT));
3392 rc = TextOutA(hdc, X, Y, astring, nCount);
3393 SetTextColor(hdc, curclr);
3394
3395 FreeAsciiString(astring);
3396 return(rc);
3397}
3398//******************************************************************************
3399//TODO:
3400//******************************************************************************
3401int WIN32API CopyAcceleratorTableA(HACCEL hAccelSrc, LPACCEL lpAccelDest,
3402 int cAccelEntries)
3403{
3404#ifdef DEBUG
3405 WriteLog("USER32: CopyAcceleratorTableA, not implemented\n");
3406#endif
3407 return(0);
3408}
3409//******************************************************************************
3410//TODO:
3411//******************************************************************************
3412int WIN32API CopyAcceleratorTableW(HACCEL hAccelSrc, LPACCEL lpAccelDest,
3413 int cAccelEntries)
3414{
3415#ifdef DEBUG
3416 WriteLog("USER32: CopyAcceleratorTableW, not implemented\n");
3417#endif
3418 return(0);
3419}
3420//******************************************************************************
3421//Stolen from Wine (controls\uitools.c)
3422//******************************************************************************
3423BOOL DrawEdgeDiag(HDC hdc, RECT *rect, UINT edge, UINT flags)
3424{
3425 HPEN facePen, shadowPen, lightPen, blackPen, grayPen, nullPen;
3426 HPEN iPen, oPen, oldPen;
3427 HBRUSH oldBrush, faceBrush;
3428 int cl, cr, ct, cb;
3429 BOOL mainDiag;
3430 POINT tp;
3431 RECT r;
3432
3433 /* If both rasied and sunken is specified, they anihilate one another */
3434 if( !((flags & BF_MONO) || (flags & BF_FLAT)) ){
3435 if( (edge & BDR_RAISEDOUTER) && (edge & BDR_SUNKENOUTER) )
3436 return FALSE;
3437 if( (edge & BDR_RAISEDINNER) && (edge & BDR_SUNKENINNER) )
3438 return FALSE;
3439 }
3440
3441 /* Create/get the tools of the trade... */
3442 facePen = CreatePen(PS_SOLID, 0, GetSysColor(COLOR_BTNFACE));
3443 shadowPen = CreatePen(PS_SOLID, 0, GetSysColor(COLOR_BTNSHADOW));
3444 lightPen = CreatePen(PS_SOLID, 0, GetSysColor(COLOR_BTNHILIGHT));
3445 grayPen = CreatePen(PS_SOLID, 0, RGB(168, 152, 144));
3446 blackPen = GetStockObject(BLACK_PEN);
3447 nullPen = GetStockObject(NULL_PEN);
3448 faceBrush = GetSysColorBrush(COLOR_BTNFACE);
3449 oldPen = SelectObject(hdc, nullPen);
3450 oldBrush = SelectObject(hdc, faceBrush);
3451
3452 /* this is my working rectangle */
3453 r = *rect;
3454
3455 if(flags & BF_MONO){
3456 oPen = blackPen;
3457 iPen = nullPen;
3458 }else if(flags & BF_FLAT){
3459 oPen = shadowPen;
3460 iPen = facePen;
3461 }else {
3462 if(flags & BF_SOFT){
3463 if(flags & BF_BOTTOM){
3464 oPen = (edge & BDR_RAISEDOUTER) ? blackPen : lightPen;
3465 iPen = (edge & BDR_RAISEDINNER) ? shadowPen : grayPen;
3466 }
3467 else{
3468 oPen = (edge & BDR_RAISEDOUTER) ? lightPen : blackPen;
3469 iPen = (edge & BDR_RAISEDINNER) ? grayPen : shadowPen;
3470 }
3471 }
3472 else{
3473 if(flags & BF_BOTTOM){
3474 oPen = (edge & BDR_RAISEDOUTER) ? blackPen : lightPen;
3475 iPen = (edge & BDR_RAISEDINNER) ? shadowPen : grayPen;
3476 }
3477 else{
3478 oPen = (edge & BDR_RAISEDOUTER) ? grayPen : shadowPen;
3479 iPen = (edge & BDR_RAISEDINNER) ? lightPen : blackPen;
3480 }
3481 }
3482 }
3483
3484 if(flags & BF_BOTTOM){
3485 if(flags & BF_LEFT){
3486 cr = -1; cl = 0;
3487 ct = 0; cb = -1;
3488 mainDiag = TRUE;
3489 tp.x = r.left; tp.y = r.top;
3490 }
3491 else{ /* RIGHT */
3492 cr = -1; cl = 0;
3493 ct = 1; cb = 0;
3494 tp.x = r.left; tp.y = r.bottom-1;
3495 mainDiag = FALSE;
3496 }
3497 }
3498 else{ /* TOP */
3499 if(flags & BF_LEFT){
3500 cr = 0; cl = 1;
3501 ct = 0; cb = -1;
3502 mainDiag = FALSE;
3503 tp.x = r.right; tp.y = r.top;
3504 }
3505 else{ /* RIGHT */
3506 cr = 0; cl = 1;
3507 ct = 1; cb = 0;
3508 tp.x = r.right; tp.y = r.bottom-1;
3509 mainDiag = TRUE;
3510 }
3511 }
3512
3513 /* if it has external edge, draw it */
3514 if(edge & BDR_OUTER){
3515 SelectObject(hdc, oPen);
3516 MoveToEx(hdc, r.left, mainDiag ? r.bottom-1 : r.top, 0);
3517 LineTo(hdc, r.right, mainDiag ? r.top-1 : r.bottom);
3518 r.left += cl; r.right += cr; r.top += ct; r.bottom += cb;
3519 }
3520
3521 /* if it has internal edge, draw it */
3522 if(edge & BDR_INNER){
3523 SelectObject(hdc, iPen);
3524 MoveToEx(hdc, r.left, mainDiag ? r.bottom-1 : r.top, 0);
3525 LineTo(hdc, r.right, mainDiag ? r.top-1 : r.bottom);
3526 r.left += cl; r.right += cr; r.top += ct; r.bottom += cb;
3527 }
3528
3529 if((flags & BF_MIDDLE) && !(flags & BF_MONO)){
3530 POINT p[3];
3531 p[0].x = mainDiag ? r.right: r.left;
3532 p[0].y = r.top;
3533 p[1].x = mainDiag ? r.left : r.right;
3534 p[1].y = r.bottom;
3535 p[2].x = tp.x;
3536 p[2].y = tp.y;
3537 SelectObject(hdc, nullPen);
3538 SelectObject(hdc, faceBrush);
3539 Polygon(hdc, p, 3);
3540 }
3541
3542 if(flags & BF_ADJUST)
3543 *rect = r;
3544
3545 /* Restore the DC */
3546 SelectObject(hdc, oldPen);
3547 SelectObject(hdc, oldBrush);
3548
3549 /* Clean-up */
3550 DeleteObject(facePen);
3551 DeleteObject(shadowPen);
3552 DeleteObject(lightPen);
3553 DeleteObject(grayPen);
3554
3555 return TRUE;
3556}
3557//******************************************************************************
3558//Stolen from Wine (controls\uitools.c)
3559//******************************************************************************
3560BOOL WIN32API DrawEdge(HDC hdc, LPRECT rect, UINT edge, UINT flags)
3561{
3562 HBRUSH faceBrush, shadowBrush, lightBrush, blackBrush, grayBrush, nullBrush;
3563 HBRUSH iNBrush, iSBrush, iEBrush, iWBrush;
3564 HBRUSH oNBrush, oSBrush, oEBrush, oWBrush;
3565 HBRUSH oldBrush;
3566 POINT point[2];
3567 RECT r;
3568
3569#ifdef DEBUG
3570 WriteLog("USER32: DrawEdge %X %X, partially implemented\n", edge, flags);
3571 WriteLog("USER32: DrawEdge (%d,%d) (%d,%d)\n", rect->left, rect->top, rect->right, rect->bottom);
3572#endif
3573
3574 if(flags & BF_DIAGONAL) {
3575 return DrawEdgeDiag(hdc, rect, edge, flags);
3576 }
3577 /* If both rasied and sunken is specified, they anihilate one another */
3578 if( !((flags & BF_MONO) || (flags & BF_FLAT)) ){
3579 if( (edge & BDR_RAISEDOUTER) && (edge & BDR_SUNKENOUTER) )
3580 return FALSE;
3581 if( (edge & BDR_RAISEDINNER) && (edge & BDR_SUNKENINNER) )
3582 return FALSE;
3583 }
3584
3585 faceBrush = GetSysColorBrush(COLOR_BTNFACE);
3586 shadowBrush = GetSysColorBrush(COLOR_BTNSHADOW);
3587 lightBrush = GetSysColorBrush(COLOR_BTNHILIGHT);
3588 blackBrush = GetStockObject(BLACK_BRUSH);
3589 grayBrush = GetStockObject(LTGRAY_BRUSH);
3590 nullBrush = GetStockObject(NULL_BRUSH);
3591 oldBrush = SelectObject(hdc, nullBrush);
3592
3593 /* this is my working rectangle */
3594 r = *rect;
3595
3596 if(flags & BF_MONO){
3597 oNBrush = oSBrush = oEBrush = oWBrush = blackBrush;
3598 iNBrush = iSBrush = iEBrush = iWBrush = nullBrush;
3599 }else if(flags & BF_FLAT){
3600 oNBrush = oSBrush = oEBrush = oWBrush = shadowBrush;
3601 iNBrush = iSBrush = iEBrush = iWBrush = faceBrush;
3602 }else {
3603 if(flags & BF_SOFT){
3604 oNBrush = oWBrush = (edge & BDR_RAISEDOUTER) ? lightBrush : blackBrush;
3605 oSBrush = oEBrush = (edge & BDR_RAISEDOUTER) ? blackBrush : lightBrush;
3606 iNBrush = iWBrush = (edge & BDR_RAISEDINNER) ? grayBrush : shadowBrush;
3607 iSBrush = iEBrush = (edge & BDR_RAISEDINNER) ? shadowBrush : grayBrush;
3608 }
3609 else{
3610 oNBrush = oWBrush = (edge & BDR_RAISEDOUTER) ? grayBrush : shadowBrush;
3611 oSBrush = oEBrush = (edge & BDR_RAISEDOUTER) ? blackBrush : lightBrush;
3612 iNBrush = iWBrush = (edge & BDR_RAISEDINNER) ? lightBrush : blackBrush;
3613 iSBrush = iEBrush = (edge & BDR_RAISEDINNER) ? shadowBrush : grayBrush;
3614 }
3615 }
3616
3617 /* if it has external edge, draw it */
3618 if(edge & BDR_OUTER){
3619 if(flags & BF_RIGHT){
3620 SelectObject(hdc, oEBrush);
3621 PatBlt(hdc, r.right-1, r.top, 1, r.bottom - r.top, PATCOPY);
3622 r.right--;
3623 }
3624 if(flags & BF_BOTTOM){
3625 SelectObject(hdc, oSBrush);
3626 PatBlt(hdc, r.left, r.bottom-1, r.right-r.left, 1, PATCOPY);
3627 r.bottom--;
3628 }
3629 if(flags & BF_LEFT){
3630 SelectObject(hdc, oWBrush);
3631 PatBlt(hdc, r.left, r.top, 1, r.bottom - r.top, PATCOPY);
3632 r.left++;
3633 }
3634 if(flags & BF_TOP){
3635 SelectObject(hdc, oNBrush);
3636 PatBlt(hdc, r.left, r.top, r.right-r.left, 1, PATCOPY);
3637 r.top++;
3638 }
3639 }
3640
3641 /* if it has internal edge, draw it */
3642 if(edge & BDR_INNER){
3643 if(flags & BF_RIGHT){
3644 SelectObject(hdc, iEBrush);
3645 PatBlt(hdc, r.right-1, r.top, 1, r.bottom - r.top, PATCOPY);
3646 r.right--;
3647 }
3648 if(flags & BF_BOTTOM){
3649 SelectObject(hdc, iSBrush);
3650 PatBlt(hdc, r.left, r.bottom-1, r.right-r.left, 1, PATCOPY);
3651 r.bottom--;
3652 }
3653 if(flags & BF_LEFT){
3654 SelectObject(hdc, iWBrush);
3655 PatBlt(hdc, r.left, r.top, 1, r.bottom - r.top, PATCOPY);
3656 r.left++;
3657 }
3658 if(flags & BF_TOP){
3659 SelectObject(hdc, iNBrush);
3660 PatBlt(hdc, r.left, r.top, r.right-r.left, 1, PATCOPY);
3661 r.top++;
3662 }
3663 }
3664
3665 /* if we got to fill the middle, to it now */
3666 if((flags & BF_MIDDLE) && !(flags & BF_MONO))
3667 FillRect(hdc, &r, faceBrush);
3668
3669 /* adjust the rectangle if required */
3670 if(flags & BF_ADJUST)
3671 *rect = r;
3672
3673 /* Restore the DC */
3674 SelectObject(hdc, oldBrush);
3675
3676 return TRUE;
3677}
3678//******************************************************************************
3679//******************************************************************************
3680LRESULT WIN32API SendMessageTimeoutA(HWND hwnd, UINT Msg, WPARAM wParam,
3681 LPARAM lParam, UINT fuFlags, UINT uTimeOut,
3682 LPDWORD lpdwResult)
3683{
3684#ifdef DEBUG
3685 WriteLog("USER32: SendMessageTimeoutA, partially implemented\n");
3686#endif
3687 //ignore fuFlags & wTimeOut
3688 *lpdwResult = SendMessageA(hwnd, Msg, wParam, lParam);
3689 return(TRUE);
3690}
3691//******************************************************************************
3692//******************************************************************************
3693LRESULT WIN32API SendMessageTimeoutW(HWND hwnd, UINT Msg, WPARAM wParam,
3694 LPARAM lParam, UINT fuFlags, UINT uTimeOut,
3695 LPDWORD lpdwResult)
3696{
3697#ifdef DEBUG
3698 WriteLog("USER32: SendMessageTimeoutW, partially implemented\n");
3699#endif
3700 return(SendMessageTimeoutA(hwnd, Msg, wParam, lParam, fuFlags, uTimeOut, lpdwResult));
3701}
3702//******************************************************************************
3703//******************************************************************************
3704HANDLE WIN32API CopyImage(HANDLE hImage, UINT uType, int cxDesired, int cyDesired, UINT fuFlags)
3705{
3706#ifdef DEBUG
3707 WriteLog("USER32: CopyImage, not implemented\n");
3708#endif
3709 switch(uType) {
3710 case IMAGE_BITMAP:
3711 case IMAGE_CURSOR:
3712 case IMAGE_ICON:
3713 default:
3714#ifdef DEBUG
3715 WriteLog("USER32: CopyImage, unknown type\n");
3716#endif
3717 return(NULL);
3718 }
3719 return(NULL);
3720}
3721//******************************************************************************
3722//******************************************************************************
3723BOOL WIN32API GetKeyboardState(PBYTE lpKeyState)
3724{
3725#ifdef DEBUG
3726 WriteLog("USER32: GetKeyboardState, not properly implemented\n");
3727#endif
3728 memset(lpKeyState, 0, 256);
3729 return(TRUE);
3730}
3731//******************************************************************************
3732//******************************************************************************
3733BOOL WIN32API SetKeyboardState(PBYTE lpKeyState)
3734{
3735#ifdef DEBUG
3736 WriteLog("USER32: SetKeyboardState, not implemented\n");
3737#endif
3738 return(TRUE);
3739}
3740//******************************************************************************
3741//******************************************************************************
3742BOOL WIN32API DrawFrameControl(HDC hdc, LPRECT lprc, UINT uType, UINT uState)
3743{
3744#ifdef DEBUG
3745 WriteLog("USER32: DrawFrameControl, not implemented\n");
3746#endif
3747 return(TRUE);
3748}
3749//******************************************************************************
3750//******************************************************************************
3751BOOL WIN32API SendNotifyMessageA(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)
3752{
3753#ifdef DEBUG
3754 WriteLog("USER32: SendNotifyMessageA, not completely implemented\n");
3755#endif
3756 return(SendMessageA(hwnd, Msg, wParam, lParam));
3757}
3758//******************************************************************************
3759//******************************************************************************
3760BOOL WIN32API SendNotifyMessageW(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)
3761{
3762#ifdef DEBUG
3763 WriteLog("USER32: SendNotifyMessageW, not completely implemented\n");
3764#endif
3765 return(SendMessageA(hwnd, Msg, wParam, lParam));
3766}
3767//******************************************************************************
3768//2nd parameter not used according to SDK (yet?)
3769//******************************************************************************
3770VOID WIN32API SetLastErrorEx(DWORD dwErrCode, DWORD dwType)
3771{
3772#ifdef DEBUG
3773 WriteLog("USER32: SetLastErrorEx\n");
3774#endif
3775 SetLastError(dwErrCode);
3776}
3777//******************************************************************************
3778//******************************************************************************
3779LPARAM WIN32API SetMessageExtraInfo(LPARAM lParam)
3780{
3781#ifdef DEBUG
3782 WriteLog("USER32: SetMessageExtraInfo, not implemented\n");
3783#endif
3784 return(0);
3785}
3786//******************************************************************************
3787//******************************************************************************
3788BOOL WIN32API ActivateKeyboardLayout(HKL hkl, UINT fuFlags)
3789{
3790#ifdef DEBUG
3791 WriteLog("USER32: ActivateKeyboardLayout, not implemented\n");
3792#endif
3793 return(TRUE);
3794}
3795//******************************************************************************
3796//******************************************************************************
3797int WIN32API GetKeyboardLayoutList(int nBuff, HKL *lpList)
3798{
3799#ifdef DEBUG
3800 WriteLog("USER32: GetKeyboardLayoutList, not implemented\n");
3801#endif
3802 return(0);
3803}
3804//******************************************************************************
3805//******************************************************************************
3806HKL WIN32API GetKeyboardLayout(DWORD dwLayout)
3807{
3808#ifdef DEBUG
3809 WriteLog("USER32: GetKeyboardLayout, not implemented\n");
3810#endif
3811 return(0);
3812}
3813//******************************************************************************
3814//******************************************************************************
3815int WIN32API LookupIconIdFromDirectory(PBYTE presbits, BOOL fIcon)
3816{
3817#ifdef DEBUG
3818 WriteLog("USER32: LookupIconIdFromDirectory, not implemented\n");
3819#endif
3820 return(0);
3821}
3822//******************************************************************************
3823//******************************************************************************
3824int WIN32API LookupIconIdFromDirectoryEx(PBYTE presbits, BOOL fIcon,
3825 int cxDesired, int cyDesired,
3826 UINT Flags)
3827{
3828#ifdef DEBUG
3829 WriteLog("USER32: LookupIconIdFromDirectoryEx, not implemented\n");
3830#endif
3831 return(0);
3832}
3833//******************************************************************************
3834//DWORD idAttach; /* thread to attach */
3835//DWORD idAttachTo; /* thread to attach to */
3836//BOOL fAttach; /* attach or detach */
3837//******************************************************************************
3838BOOL WIN32API AttachThreadInput(DWORD idAttach, DWORD idAttachTo, BOOL fAttach)
3839{
3840#ifdef DEBUG
3841 WriteLog("USER32: AttachThreadInput, not implemented\n");
3842#endif
3843 return(TRUE);
3844}
3845//******************************************************************************
3846//******************************************************************************
3847BOOL WIN32API RegisterHotKey(HWND hwnd, int idHotKey, UINT fuModifiers, UINT uVirtKey)
3848{
3849#ifdef DEBUG
3850 WriteLog("USER32: RegisterHotKey, not implemented\n");
3851#endif
3852 return(TRUE);
3853}
3854//******************************************************************************
3855//******************************************************************************
3856BOOL WIN32API UnregisterHotKey(HWND hwnd, int idHotKey)
3857{
3858#ifdef DEBUG
3859 WriteLog("USER32: UnregisterHotKey, not implemented\n");
3860#endif
3861 return(TRUE);
3862}
3863//******************************************************************************
3864//******************************************************************************
3865BOOL WIN32API DrawStateA(HDC hdc, HBRUSH hbc, DRAWSTATEPROC lpOutputFunc,
3866 LPARAM lData, WPARAM wData, int x, int y, int cx,
3867 int cy, UINT fuFlags)
3868{
3869#ifdef DEBUG
3870 WriteLog("USER32: DrawStateA, not implemented\n");
3871#endif
3872 return(TRUE);
3873}
3874//******************************************************************************
3875//******************************************************************************
3876//******************************************************************************
3877//******************************************************************************
3878BOOL WIN32API SetWindowContextHelpId(HWND hwnd, DWORD dwContextHelpId)
3879{
3880#ifdef DEBUG
3881 WriteLog("USER32: SetWindowContextHelpId, not implemented\n");
3882#endif
3883 return(TRUE);
3884}
3885//******************************************************************************
3886//******************************************************************************
3887DWORD WIN32API GetWindowContextHelpId(HWND hwnd)
3888{
3889#ifdef DEBUG
3890 WriteLog("USER32: GetWindowContextHelpId, not implemented\n");
3891#endif
3892 return(0);
3893}
3894//******************************************************************************
3895//restores iconized window to previous size/position
3896//******************************************************************************
3897BOOL WIN32API OpenIcon(HWND hwnd)
3898{
3899#ifdef DEBUG
3900 WriteLog("USER32: OpenIcon\n");
3901#endif
3902 if(!IsIconic(hwnd))
3903 return FALSE;
3904 ShowWindow(hwnd, SW_SHOWNORMAL);
3905 return TRUE;
3906}
3907//******************************************************************************
3908//******************************************************************************
3909BOOL WIN32API IsWindowUnicode(HWND hwnd)
3910{
3911#ifdef DEBUG
3912 WriteLog("USER32: IsWindowUnicode, not implemented\n");
3913#endif
3914 return(FALSE);
3915}
3916//******************************************************************************
3917//******************************************************************************
3918BOOL WIN32API GetMonitorInfoA(HMONITOR,LPMONITORINFO)
3919{
3920#ifdef DEBUG
3921 WriteLog("USER32: GetMonitorInfoA not supported!!\n");
3922#endif
3923 return(FALSE);
3924}
3925//******************************************************************************
3926//******************************************************************************
3927BOOL WIN32API GetMonitorInfoW(HMONITOR,LPMONITORINFO)
3928{
3929#ifdef DEBUG
3930 WriteLog("USER32: GetMonitorInfoW not supported!!\n");
3931#endif
3932 return(FALSE);
3933}
3934//******************************************************************************
3935//******************************************************************************
3936HMONITOR WIN32API MonitorFromWindow(HWND hwnd, DWORD dwFlags)
3937{
3938#ifdef DEBUG
3939 WriteLog("USER32: MonitorFromWindow not correctly supported??\n");
3940#endif
3941 return(0);
3942}
3943//******************************************************************************
3944//******************************************************************************
3945HMONITOR WIN32API MonitorFromRect(LPRECT rect, DWORD dwFlags)
3946{
3947#ifdef DEBUG
3948 WriteLog("USER32: MonitorFromRect not correctly supported??\n");
3949#endif
3950 return(0);
3951}
3952//******************************************************************************
3953//******************************************************************************
3954HMONITOR WIN32API MonitorFromPoint(POINT point, DWORD dwflags)
3955{
3956#ifdef DEBUG
3957 WriteLog("USER32: MonitorFromPoint not correctly supported??\n");
3958#endif
3959 return(0);
3960}
3961//******************************************************************************
3962//******************************************************************************
3963BOOL WIN32API EnumDisplayMonitors(HDC,LPRECT,MONITORENUMPROC,LPARAM)
3964{
3965#ifdef DEBUG
3966 WriteLog("USER32: EnumDisplayMonitors not supported??\n");
3967#endif
3968 return(FALSE);
3969}
3970//******************************************************************************
3971//******************************************************************************
3972BOOL WIN32API EnumDisplaySettingsA(LPCSTR lpszDeviceName, DWORD iModeNum,
3973 LPDEVMODEA lpDevMode)
3974{
3975#ifdef DEBUG
3976 WriteLog("USER32: EnumDisplaySettingsA FAKED\n");
3977#endif
3978 switch(iModeNum) {
3979 case 0:
3980 lpDevMode->dmBitsPerPel = 16;
3981 lpDevMode->dmPelsWidth = 768;
3982 lpDevMode->dmPelsHeight = 1024;
3983 lpDevMode->dmDisplayFlags = 0;
3984 lpDevMode->dmDisplayFrequency = 70;
3985 break;
3986 case 1:
3987 lpDevMode->dmBitsPerPel = 16;
3988 lpDevMode->dmPelsWidth = 640;
3989 lpDevMode->dmPelsHeight = 480;
3990 lpDevMode->dmDisplayFlags = 0;
3991 lpDevMode->dmDisplayFrequency = 70;
3992 break;
3993 default:
3994 return(FALSE);
3995 }
3996 return(TRUE);
3997}
3998//******************************************************************************
3999//******************************************************************************
4000LONG WIN32API ChangeDisplaySettingsA(LPDEVMODEA lpDevMode, DWORD dwFlags)
4001{
4002#ifdef DEBUG
4003 if(lpDevMode) {
4004 WriteLog("USER32: ChangeDisplaySettingsA FAKED %X\n", dwFlags);
4005 WriteLog("USER32: ChangeDisplaySettingsA lpDevMode->dmBitsPerPel %d\n", lpDevMode->dmBitsPerPel);
4006 WriteLog("USER32: ChangeDisplaySettingsA lpDevMode->dmPelsWidth %d\n", lpDevMode->dmPelsWidth);
4007 WriteLog("USER32: ChangeDisplaySettingsA lpDevMode->dmPelsHeight %d\n", lpDevMode->dmPelsHeight);
4008 }
4009#endif
4010 return(DISP_CHANGE_SUCCESSFUL);
4011}
4012//******************************************************************************
4013//******************************************************************************
4014
4015
4016/*****************************************************************************
4017 * Name : BOOL WIN32API AnyPopup
4018 * Purpose : The AnyPopup function indicates whether an owned, visible,
4019 * top-level pop-up, or overlapped window exists on the screen. The
4020 * function searches the entire Windows screen, not just the calling
4021 * application's client area.
4022 * Parameters: VOID
4023 * Variables :
4024 * Result : If a pop-up window exists, the return value is TRUE even if the
4025 * pop-up window is completely covered by other windows. Otherwise,
4026 * it is FALSE.
4027 * Remark : AnyPopup is a Windows version 1.x function and is retained for
4028 * compatibility purposes. It is generally not useful.
4029 * Status : UNTESTED STUB
4030 *
4031 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4032 *****************************************************************************/
4033
4034BOOL WIN32API AnyPopup(VOID)
4035{
4036 dprintf(("USER32:AnyPopup() not implemented.\n"));
4037
4038 return (FALSE);
4039}
4040
4041
4042/*****************************************************************************
4043 * Name : long WIN32API BroadcastSystemMessage
4044 * Purpose : The BroadcastSystemMessage function sends a message to the given
4045 * recipients. The recipients can be applications, installable
4046 * drivers, Windows-based network drivers, system-level device
4047 * drivers, or any combination of these system components.
4048 * Parameters: DWORD dwFlags,
4049 LPDWORD lpdwRecipients,
4050 UINT uiMessage,
4051 WPARAM wParam,
4052 LPARAM lParam
4053 * Variables :
4054 * Result : If the function succeeds, the return value is a positive value.
4055 * If the function is unable to broadcast the message, the return value is -1.
4056 * If the dwFlags parameter is BSF_QUERY and at least one recipient returned FALSE to the corresponding message, the return value is zero.
4057 * Remark :
4058 * Status : UNTESTED STUB
4059 *
4060 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4061 *****************************************************************************/
4062
4063long WIN32API BroadcastSystemMessage(DWORD dwFlags,
4064 LPDWORD lpdwRecipients,
4065 UINT uiMessage,
4066 WPARAM wParam,
4067 LPARAM lParam)
4068{
4069 dprintf(("USER32:BroadcastSystemMessage(%08xh,%08xh,%08xh,%08xh,%08x) not implemented.\n",
4070 dwFlags,
4071 lpdwRecipients,
4072 uiMessage,
4073 wParam,
4074 lParam));
4075
4076 return (-1);
4077}
4078
4079
4080/*****************************************************************************
4081 * Name : WORD WIN32API CascadeWindows
4082 * Purpose : The CascadeWindows function cascades the specified windows or
4083 * the child windows of the specified parent window.
4084 * Parameters: HWND hwndParent handle of parent window
4085 * UINT wHow types of windows not to arrange
4086 * CONST RECT * lpRect rectangle to arrange windows in
4087 * UINT cKids number of windows to arrange
4088 * const HWND FAR * lpKids array of window handles
4089 * Variables :
4090 * Result : If the function succeeds, the return value is the number of windows arranged.
4091 * If the function fails, the return value is zero.
4092 * Remark :
4093 * Status : UNTESTED STUB
4094 *
4095 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4096 *****************************************************************************/
4097
4098WORD WIN32API CascadeWindows(HWND hwndParent,
4099 UINT wHow,
4100 CONST LPRECT lpRect,
4101 UINT cKids,
4102 const HWND *lpKids)
4103{
4104 dprintf(("USER32:CascadeWindows(%08xh,%u,%08xh,%u,%08x) not implemented.\n",
4105 hwndParent,
4106 wHow,
4107 lpRect,
4108 cKids,
4109 lpKids));
4110
4111 return (0);
4112}
4113
4114
4115/*****************************************************************************
4116 * Name : LONG WIN32API ChangeDisplaySettingsW
4117 * Purpose : The ChangeDisplaySettings function changes the display settings
4118 * to the specified graphics mode.
4119 * Parameters: LPDEVMODEW lpDevModeW
4120 * DWORD dwFlags
4121 * Variables :
4122 * Result : DISP_CHANGE_SUCCESSFUL The settings change was successful.
4123 * DISP_CHANGE_RESTART The computer must be restarted in order for the graphics mode to work.
4124 * DISP_CHANGE_BADFLAGS An invalid set of flags was passed in.
4125 * DISP_CHANGE_FAILED The display driver failed the specified graphics mode.
4126 * DISP_CHANGE_BADMODE The graphics mode is not supported.
4127 * DISP_CHANGE_NOTUPDATED Unable to write settings to the registry.
4128 * Remark :
4129 * Status : UNTESTED STUB
4130 *
4131 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4132 *****************************************************************************/
4133
4134LONG WIN32API ChangeDisplaySettingsW(LPDEVMODEW lpDevMode,
4135 DWORD dwFlags)
4136{
4137 dprintf(("USER32:ChangeDisplaySettingsW(%08xh,%08x) not implemented.\n",
4138 lpDevMode,
4139 dwFlags));
4140
4141 return (ChangeDisplaySettingsA((LPDEVMODEA)lpDevMode,
4142 dwFlags));
4143}
4144
4145/*****************************************************************************
4146 * Name : BOOL WIN32API CloseDesktop
4147 * Purpose : The CloseDesktop function closes an open handle of a desktop
4148 * object. A desktop is a secure object contained within a window
4149 * station object. A desktop has a logical display surface and
4150 * contains windows, menus and hooks.
4151 * Parameters: HDESK hDesktop
4152 * Variables :
4153 * Result : If the function succeeds, the return value is TRUE.
4154 * If the functions fails, the return value is FALSE. To get
4155 * extended error information, call GetLastError.
4156 * Remark :
4157 * Status : UNTESTED STUB
4158 *
4159 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4160 *****************************************************************************/
4161
4162BOOL WIN32API CloseDesktop(HDESK hDesktop)
4163{
4164 dprintf(("USER32:CloseDesktop(%08x) not implemented.\n",
4165 hDesktop));
4166
4167 return (FALSE);
4168}
4169
4170
4171/*****************************************************************************
4172 * Name : BOOL WIN32API CloseWindowStation
4173 * Purpose : The CloseWindowStation function closes an open window station handle.
4174 * Parameters: HWINSTA hWinSta
4175 * Variables :
4176 * Result :
4177 * Remark : If the function succeeds, the return value is TRUE.
4178 * If the functions fails, the return value is FALSE. To get
4179 * extended error information, call GetLastError.
4180 * Status : UNTESTED STUB
4181 *
4182 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4183 *****************************************************************************/
4184
4185BOOL WIN32API CloseWindowStation(HWINSTA hWinSta)
4186{
4187 dprintf(("USER32:CloseWindowStation(%08x) not implemented.\n",
4188 hWinSta));
4189
4190 return (FALSE);
4191}
4192
4193
4194/*****************************************************************************
4195 * Name : HDESK WIN32API CreateDesktopA
4196 * Purpose : The CreateDesktop function creates a new desktop on the window
4197 * station associated with the calling process.
4198 * Parameters: LPCTSTR lpszDesktop name of the new desktop
4199 * LPCTSTR lpszDevice name of display device to assign to the desktop
4200 * LPDEVMODE pDevMode reserved; must be NULL
4201 * DWORD dwFlags flags to control interaction with other applications
4202 * DWORD dwDesiredAccess specifies access of returned handle
4203 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the desktop
4204 * Variables :
4205 * Result : If the function succeeds, the return value is a handle of the
4206 * newly created desktop.
4207 * If the function fails, the return value is NULL. To get extended
4208 * error information, call GetLastError.
4209 * Remark :
4210 * Status : UNTESTED STUB
4211 *
4212 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4213 *****************************************************************************/
4214
4215HDESK WIN32API CreateDesktopA(LPCTSTR lpszDesktop,
4216 LPCTSTR lpszDevice,
4217 LPDEVMODEA pDevMode,
4218 DWORD dwFlags,
4219 DWORD dwDesiredAccess,
4220 LPSECURITY_ATTRIBUTES lpsa)
4221{
4222 dprintf(("USER32:CreateDesktopA(%s,%s,%08xh,%08xh,%08xh,%08x) not implemented.\n",
4223 lpszDesktop,
4224 lpszDevice,
4225 pDevMode,
4226 dwFlags,
4227 dwDesiredAccess,
4228 lpsa));
4229
4230 return (NULL);
4231}
4232
4233
4234/*****************************************************************************
4235 * Name : HDESK WIN32API CreateDesktopW
4236 * Purpose : The CreateDesktop function creates a new desktop on the window
4237 * station associated with the calling process.
4238 * Parameters: LPCTSTR lpszDesktop name of the new desktop
4239 * LPCTSTR lpszDevice name of display device to assign to the desktop
4240 * LPDEVMODE pDevMode reserved; must be NULL
4241 * DWORD dwFlags flags to control interaction with other applications
4242 * DWORD dwDesiredAccess specifies access of returned handle
4243 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the desktop
4244 * Variables :
4245 * Result : If the function succeeds, the return value is a handle of the
4246 * newly created desktop.
4247 * If the function fails, the return value is NULL. To get extended
4248 * error information, call GetLastError.
4249 * Remark :
4250 * Status : UNTESTED STUB
4251 *
4252 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4253 *****************************************************************************/
4254
4255HDESK WIN32API CreateDesktopW(LPCTSTR lpszDesktop,
4256 LPCTSTR lpszDevice,
4257 LPDEVMODEW pDevMode,
4258 DWORD dwFlags,
4259 DWORD dwDesiredAccess,
4260 LPSECURITY_ATTRIBUTES lpsa)
4261{
4262 dprintf(("USER32:CreateDesktopW(%s,%s,%08xh,%08xh,%08xh,%08x) not implemented.\n",
4263 lpszDesktop,
4264 lpszDevice,
4265 pDevMode,
4266 dwFlags,
4267 dwDesiredAccess,
4268 lpsa));
4269
4270 return (NULL);
4271}
4272
4273
4274/*****************************************************************************
4275 * Name : HWINSTA WIN32API CreateWindowStationA
4276 * Purpose : The CreateWindowStation function creates a window station object.
4277 * It returns a handle that can be used to access the window station.
4278 * A window station is a secure object that contains a set of global
4279 * atoms, a clipboard, and a set of desktop objects.
4280 * Parameters: LPTSTR lpwinsta name of the new window station
4281 * DWORD dwReserved reserved; must be NULL
4282 * DWORD dwDesiredAccess specifies access of returned handle
4283 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the window station
4284 * Variables :
4285 * Result : If the function succeeds, the return value is the handle to the
4286 * newly created window station.
4287 * If the function fails, the return value is NULL. To get extended
4288 * error information, call GetLastError.
4289 * Remark :
4290 * Status : UNTESTED STUB
4291 *
4292 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4293 *****************************************************************************/
4294
4295HWINSTA WIN32API CreateWindowStationA(LPTSTR lpWinSta,
4296 DWORD dwReserved,
4297 DWORD dwDesiredAccess,
4298 LPSECURITY_ATTRIBUTES lpsa)
4299{
4300 dprintf(("USER32:CreateWindowStationA(%s,%08xh,%08xh,%08x) not implemented.\n",
4301 lpWinSta,
4302 dwReserved,
4303 dwDesiredAccess,
4304 lpsa));
4305
4306 return (NULL);
4307}
4308
4309
4310/*****************************************************************************
4311 * Name : HWINSTA WIN32API CreateWindowStationW
4312 * Purpose : The CreateWindowStation function creates a window station object.
4313 * It returns a handle that can be used to access the window station.
4314 * A window station is a secure object that contains a set of global
4315 * atoms, a clipboard, and a set of desktop objects.
4316 * Parameters: LPTSTR lpwinsta name of the new window station
4317 * DWORD dwReserved reserved; must be NULL
4318 * DWORD dwDesiredAccess specifies access of returned handle
4319 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the window station
4320 * Variables :
4321 * Result : If the function succeeds, the return value is the handle to the
4322 * newly created window station.
4323 * If the function fails, the return value is NULL. To get extended
4324 * error information, call GetLastError.
4325 * Remark :
4326 * Status : UNTESTED STUB
4327 *
4328 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4329 *****************************************************************************/
4330
4331HWINSTA WIN32API CreateWindowStationW(LPWSTR lpWinSta,
4332 DWORD dwReserved,
4333 DWORD dwDesiredAccess,
4334 LPSECURITY_ATTRIBUTES lpsa)
4335{
4336 dprintf(("USER32:CreateWindowStationW(%s,%08xh,%08xh,%08x) not implemented.\n",
4337 lpWinSta,
4338 dwReserved,
4339 dwDesiredAccess,
4340 lpsa));
4341
4342 return (NULL);
4343}
4344
4345/*****************************************************************************
4346 * Name : BOOL WIN32API DragDetect
4347 * Purpose : The DragDetect function captures the mouse and tracks its movement
4348 * Parameters: HWND hwnd
4349 * POINT pt
4350 * Variables :
4351 * Result : If the user moved the mouse outside of the drag rectangle while
4352 * holding the left button down, the return value is TRUE.
4353 * If the user did not move the mouse outside of the drag rectangle
4354 * while holding the left button down, the return value is FALSE.
4355 * Remark :
4356 * Status : UNTESTED STUB
4357 *
4358 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4359 *****************************************************************************/
4360
4361BOOL WIN32API DragDetect(HWND hwnd,
4362 POINT pt)
4363{
4364 dprintf(("USER32:DragDetect(%08xh,...) not implemented.\n",
4365 hwnd));
4366
4367 return (FALSE);
4368}
4369
4370
4371/*****************************************************************************
4372 * Name : BOOL WIN32API DrawAnimatedRects
4373 * Purpose : The DrawAnimatedRects function draws a wire-frame rectangle
4374 * and animates it to indicate the opening of an icon or the
4375 * minimizing or maximizing of a window.
4376 * Parameters: HWND hwnd handle of clipping window
4377 * int idAni type of animation
4378 * CONST RECT * lprcFrom address of rectangle coordinates (minimized)
4379 * CONST RECT * lprcTo address of rectangle coordinates (restored)
4380 * Variables :
4381 * Result : If the function succeeds, the return value is TRUE.
4382 * If the function fails, the return value is FALSE.
4383 * Remark :
4384 * Status : UNTESTED STUB
4385 *
4386 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4387 *****************************************************************************/
4388
4389BOOL WIN32API DrawAnimatedRects(HWND hwnd,
4390 int idAni,
4391 CONST RECT *lprcFrom,
4392 CONST RECT *lprcTo)
4393{
4394 dprintf(("USER32:DrawAnimatedRects (%08xh,%u,%08xh,%08x) not implemented.\n",
4395 hwnd,
4396 idAni,
4397 lprcFrom,
4398 lprcTo));
4399
4400 return (TRUE);
4401}
4402
4403
4404/*****************************************************************************
4405 * Name : VOID WIN32API DrawCaption
4406 * Purpose : The DrawCaption function draws a window caption.
4407 * Parameters: HDC hdc handle of device context
4408 * LPRECT lprc address of bounding rectangle coordinates
4409 * HFONT hfont handle of font for caption
4410 * HICON hicon handle of icon in caption
4411 * LPSTR lpszText address of caption string
4412 * WORD wFlags drawing options
4413 * Variables :
4414 * Result :
4415 * Remark :
4416 * Status : UNTESTED STUB
4417 *
4418 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4419 *****************************************************************************/
4420
4421BOOL WIN32API DrawCaption (HWND hwnd,
4422 HDC hdc,
4423 const RECT *lprc,
4424 UINT wFlags)
4425{
4426 dprintf(("USER32:DrawCaption (%08xh,%08xh,%08xh,%08xh) not implemented.\n",
4427 hwnd,
4428 hdc,
4429 lprc,
4430 wFlags));
4431
4432 return FALSE;
4433}
4434
4435
4436/*****************************************************************************
4437 * Name :
4438 * Purpose :
4439 * Parameters:
4440 * Variables :
4441 * Result :
4442 * Remark :
4443 * Status : UNTESTED STUB
4444 *
4445 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4446 *****************************************************************************/
4447
4448BOOL WIN32API DrawStateW(HDC hdc,
4449 HBRUSH hBrush,
4450 DRAWSTATEPROC lpOutputFunc,
4451 LPARAM lParam,
4452 WPARAM wParam,
4453 int x,
4454 int y,
4455 int cx,
4456 int cy,
4457 UINT fuFlags)
4458{
4459 dprintf(("USER32:DrawStateW (%08xh,%08xh,%08xh,%08xh,%08xh,%d,%d,%d,%d,%08x) not implemented.\n",
4460 hdc,
4461 hBrush,
4462 lpOutputFunc,
4463 lParam,
4464 wParam,
4465 x,
4466 y,
4467 cx,
4468 cy,
4469 fuFlags));
4470
4471 return(DrawStateA(hdc,
4472 hBrush,
4473 lpOutputFunc,
4474 lParam,
4475 wParam,
4476 x,
4477 y,
4478 cx,
4479 cy,
4480 fuFlags));
4481}
4482
4483
4484/*****************************************************************************
4485 * Name : BOOL WIN32API EnumDesktopWindows
4486 * Purpose : The EnumDesktopWindows function enumerates all windows in a
4487 * desktop by passing the handle of each window, in turn, to an
4488 * application-defined callback function.
4489 * Parameters: HDESK hDesktop handle of desktop to enumerate
4490 * WNDENUMPROC lpfn points to application's callback function
4491 * LPARAM lParam 32-bit value to pass to the callback function
4492 * Variables :
4493 * Result : If the function succeeds, the return value is TRUE.
4494 * If the function fails, the return value is FALSE. To get
4495 * extended error information, call GetLastError.
4496 * Remark :
4497 * Status : UNTESTED STUB
4498 *
4499 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4500 *****************************************************************************/
4501
4502BOOL WIN32API EnumDesktopWindows(HDESK hDesktop,
4503 WNDENUMPROC lpfn,
4504 LPARAM lParam)
4505{
4506 dprintf(("USER32:EnumDesktopWindows (%08xh,%08xh,%08x) not implemented.\n",
4507 hDesktop,
4508 lpfn,
4509 lParam));
4510
4511 return (FALSE);
4512}
4513
4514
4515/*****************************************************************************
4516 * Name : BOOL WIN32API EnumDesktopsA
4517 * Purpose : The EnumDesktops function enumerates all desktops in the window
4518 * station assigned to the calling process. The function does so by
4519 * passing the name of each desktop, in turn, to an application-
4520 * defined callback function.
4521 * Parameters: HWINSTA hwinsta handle of window station to enumerate
4522 * DESKTOPENUMPROC lpEnumFunc points to application's callback function
4523 * LPARAM lParam 32-bit value to pass to the callback function
4524 * Variables :
4525 * Result : If the function succeeds, the return value is TRUE.
4526 * If the function fails, the return value is FALSE. To get extended
4527 * error information, call GetLastError.
4528 * Remark :
4529 * Status : UNTESTED STUB
4530 *
4531 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4532 *****************************************************************************/
4533
4534BOOL WIN32API EnumDesktopsA(HWINSTA hWinSta,
4535 DESKTOPENUMPROCA lpEnumFunc,
4536 LPARAM lParam)
4537{
4538 dprintf(("USER32:EnumDesktopsA (%08xh,%08xh,%08x) not implemented.\n",
4539 hWinSta,
4540 lpEnumFunc,
4541 lParam));
4542
4543 return (FALSE);
4544}
4545
4546
4547/*****************************************************************************
4548 * Name : BOOL WIN32API EnumDesktopsW
4549 * Purpose : The EnumDesktops function enumerates all desktops in the window
4550 * station assigned to the calling process. The function does so by
4551 * passing the name of each desktop, in turn, to an application-
4552 * defined callback function.
4553 * Parameters: HWINSTA hwinsta handle of window station to enumerate
4554 * DESKTOPENUMPROC lpEnumFunc points to application's callback function
4555 * LPARAM lParam 32-bit value to pass to the callback function
4556 * Variables :
4557 * Result : If the function succeeds, the return value is TRUE.
4558 * If the function fails, the return value is FALSE. To get extended
4559 * error information, call GetLastError.
4560 * Remark :
4561 * Status : UNTESTED STUB
4562 *
4563 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4564 *****************************************************************************/
4565
4566BOOL WIN32API EnumDesktopsW(HWINSTA hWinSta,
4567 DESKTOPENUMPROCW lpEnumFunc,
4568 LPARAM lParam)
4569{
4570 dprintf(("USER32:EnumDesktopsW (%08xh,%08xh,%08x) not implemented.\n",
4571 hWinSta,
4572 lpEnumFunc,
4573 lParam));
4574
4575 return (FALSE);
4576}
4577
4578
4579
4580/*****************************************************************************
4581 * Name : BOOL WIN32API EnumDisplaySettingsW
4582 * Purpose : The EnumDisplaySettings function obtains information about one
4583 * of a display device's graphics modes. You can obtain information
4584 * for all of a display device's graphics modes by making a series
4585 * of calls to this function.
4586 * Parameters: LPCTSTR lpszDeviceName specifies the display device
4587 * DWORD iModeNum specifies the graphics mode
4588 * LPDEVMODE lpDevMode points to structure to receive settings
4589 * Variables :
4590 * Result : If the function succeeds, the return value is TRUE.
4591 * If the function fails, the return value is FALSE.
4592 * Remark :
4593 * Status : UNTESTED STUB
4594 *
4595 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4596 *****************************************************************************/
4597
4598BOOL WIN32API EnumDisplaySettingsW(LPCSTR lpszDeviceName,
4599 DWORD iModeNum,
4600 LPDEVMODEW lpDevMode)
4601{
4602 dprintf(("USER32:EnumDisplaySettingsW (%s,%08xh,%08x) not implemented.\n",
4603 lpszDeviceName,
4604 iModeNum,
4605 lpDevMode));
4606
4607 return (EnumDisplaySettingsA(lpszDeviceName,
4608 iModeNum,
4609 (LPDEVMODEA)lpDevMode));
4610}
4611
4612
4613/*****************************************************************************
4614 * Name : BOOL WIN32API EnumWindowStationsA
4615 * Purpose : The EnumWindowStations function enumerates all windowstations
4616 * in the system by passing the name of each window station, in
4617 * turn, to an application-defined callback function.
4618 * Parameters:
4619 * Variables : WINSTAENUMPROC lpEnumFunc points to application's callback function
4620 * LPARAM lParam 32-bit value to pass to the callback function
4621 * Result : If the function succeeds, the return value is TRUE.
4622 * If the function fails the return value is FALSE. To get extended
4623 * error information, call GetLastError.
4624 * Remark :
4625 * Status : UNTESTED STUB
4626 *
4627 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4628 *****************************************************************************/
4629
4630BOOL WIN32API EnumWindowStationsA(WINSTAENUMPROCA lpEnumFunc,
4631 LPARAM lParam)
4632{
4633 dprintf(("USER32:EnumWindowStationsA (%08xh,%08x) not implemented.\n",
4634 lpEnumFunc,
4635 lParam));
4636
4637 return (FALSE);
4638}
4639
4640
4641/*****************************************************************************
4642 * Name : BOOL WIN32API EnumWindowStationsW
4643 * Purpose : The EnumWindowStations function enumerates all windowstations
4644 * in the system by passing the name of each window station, in
4645 * turn, to an application-defined callback function.
4646 * Parameters:
4647 * Variables : WINSTAENUMPROC lpEnumFunc points to application's callback function
4648 * LPARAM lParam 32-bit value to pass to the callback function
4649 * Result : If the function succeeds, the return value is TRUE.
4650 * If the function fails the return value is FALSE. To get extended
4651 * error information, call GetLastError.
4652 * Remark :
4653 * Status : UNTESTED STUB
4654 *
4655 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4656 *****************************************************************************/
4657
4658BOOL WIN32API EnumWindowStationsW(WINSTAENUMPROCW lpEnumFunc,
4659 LPARAM lParam)
4660{
4661 dprintf(("USER32:EnumWindowStationsW (%08xh,%08x) not implemented.\n",
4662 lpEnumFunc,
4663 lParam));
4664
4665 return (FALSE);
4666}
4667
4668
4669/*****************************************************************************
4670 * Name : HWND WIN32API FindWindowExW
4671 * Purpose : The FindWindowEx function retrieves the handle of a window whose
4672 * class name and window name match the specified strings. The
4673 * function searches child windows, beginning with the one following
4674 * the given child window.
4675 * Parameters: HWND hwndParent handle of parent window
4676 * HWND hwndChildAfter handle of a child window
4677 * LPCTSTR lpszClass address of class name
4678 * LPCTSTR lpszWindow address of window name
4679 * Variables :
4680 * Result : If the function succeeds, the return value is the handle of the
4681 * window that has the specified class and window names.
4682 * If the function fails, the return value is NULL. To get extended
4683 * error information, call GetLastError.
4684 * Remark :
4685 * Status : UNTESTED STUB
4686 *
4687 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4688 *****************************************************************************/
4689
4690HWND WIN32API FindWindowExW(HWND hwndParent,
4691 HWND hwndChildAfter,
4692 LPCWSTR lpszClass,
4693 LPCWSTR lpszWindow)
4694{
4695 dprintf(("USER32:FindWindowExW (%08xh,%08xh,%s,%s) not implemented.\n",
4696 hwndParent,
4697 hwndChildAfter,
4698 lpszClass,
4699 lpszWindow));
4700
4701 return (NULL);
4702}
4703
4704/*****************************************************************************
4705 * Name : BOOL WIN32API GetInputState
4706 * Purpose : The GetInputState function determines whether there are
4707 * mouse-button or keyboard messages in the calling thread's message queue.
4708 * Parameters:
4709 * Variables :
4710 * Result : If the queue contains one or more new mouse-button or keyboard
4711 * messages, the return value is TRUE.
4712 * If the function fails, the return value is FALSE.
4713 * Remark :
4714 * Status : UNTESTED STUB
4715 *
4716 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4717 *****************************************************************************/
4718
4719BOOL WIN32API GetInputState(VOID)
4720{
4721 dprintf(("USER32:GetInputState () not implemented.\n"));
4722
4723 return (FALSE);
4724}
4725
4726
4727/*****************************************************************************
4728 * Name : UINT WIN32API GetKBCodePage
4729 * Purpose : The GetKBCodePage function is provided for compatibility with
4730 * earlier versions of Windows. In the Win32 application programming
4731 * interface (API) it just calls the GetOEMCP function.
4732 * Parameters:
4733 * Variables :
4734 * Result : If the function succeeds, the return value is an OEM code-page
4735 * identifier, or it is the default identifier if the registry
4736 * value is not readable. For a list of OEM code-page identifiers,
4737 * see GetOEMCP.
4738 * Remark :
4739 * Status : UNTESTED
4740 *
4741 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4742 *****************************************************************************/
4743
4744UINT WIN32API GetKBCodePage(VOID)
4745{
4746 return (GetOEMCP());
4747}
4748
4749
4750/*****************************************************************************
4751 * Name : BOOL WIN32API GetKeyboardLayoutNameA
4752 * Purpose : The GetKeyboardLayoutName function retrieves the name of the
4753 * active keyboard layout.
4754 * Parameters: LPTSTR pwszKLID address of buffer for layout name
4755 * Variables :
4756 * Result : If the function succeeds, the return value is TRUE.
4757 * If the function fails, the return value is FALSE. To get extended
4758 * error information, call GetLastError.
4759 * Remark :
4760 * Status : UNTESTED STUB
4761 *
4762 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4763 *****************************************************************************/
4764
4765BOOL WIN32API GetKeyboardLayoutNameA(LPTSTR pwszKLID)
4766{
4767 dprintf(("USER32:GetKeyboardLayoutNameA (%08x) not implemented.",
4768 pwszKLID));
4769
4770 return(FALSE);
4771}
4772
4773
4774/*****************************************************************************
4775 * Name : BOOL WIN32API GetKeyboardLayoutNameW
4776 * Purpose : The GetKeyboardLayoutName function retrieves the name of the
4777 * active keyboard layout.
4778 * Parameters: LPTSTR pwszKLID address of buffer for layout name
4779 * Variables :
4780 * Result : If the function succeeds, the return value is TRUE.
4781 * If the function fails, the return value is FALSE. To get extended
4782 * error information, call GetLastError.
4783 * Remark :
4784 * Status : UNTESTED STUB
4785 *
4786 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4787 *****************************************************************************/
4788
4789BOOL WIN32API GetKeyboardLayoutNameW(LPWSTR pwszKLID)
4790{
4791 dprintf(("USER32:GetKeyboardLayoutNameW (%08x) not implemented.",
4792 pwszKLID));
4793
4794 return(FALSE);
4795}
4796
4797
4798
4799
4800/*****************************************************************************
4801 * Name : HWINSTA WIN32API GetProcessWindowStation
4802 * Purpose : The GetProcessWindowStation function returns a handle of the
4803 * window station associated with the calling process.
4804 * Parameters:
4805 * Variables :
4806 * Result : If the function succeeds, the return value is a handle of the
4807 * window station associated with the calling process.
4808 * If the function fails, the return value is NULL. This can occur
4809 * if the calling process is not an application written for Windows
4810 * NT. To get extended error information, call GetLastError.
4811 * Remark :
4812 * Status : UNTESTED STUB
4813 *
4814 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4815 *****************************************************************************/
4816
4817HWINSTA WIN32API GetProcessWindowStation(VOID)
4818{
4819 dprintf(("USER32:GetProcessWindowStation () not implemented.\n"));
4820
4821 return (NULL);
4822}
4823
4824
4825
4826/*****************************************************************************
4827 * Name : HDESK WIN32API GetThreadDesktop
4828 * Purpose : The GetThreadDesktop function returns a handle to the desktop
4829 * associated with a specified thread.
4830 * Parameters: DWORD dwThreadId thread identifier
4831 * Variables :
4832 * Result : If the function succeeds, the return value is the handle of the
4833 * desktop associated with the specified thread.
4834 * Remark :
4835 * Status : UNTESTED STUB
4836 *
4837 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4838 *****************************************************************************/
4839
4840HDESK WIN32API GetThreadDesktop(DWORD dwThreadId)
4841{
4842 dprintf(("USER32:GetThreadDesktop (%u) not implemented.\n",
4843 dwThreadId));
4844
4845 return (NULL);
4846}
4847
4848
4849/*****************************************************************************
4850 * Name : BOOL WIN32API GetUserObjectInformationA
4851 * Purpose : The GetUserObjectInformation function returns information about
4852 * a window station or desktop object.
4853 * Parameters: HANDLE hObj handle of object to get information for
4854 * int nIndex type of information to get
4855 * PVOID pvInfo points to buffer that receives the information
4856 * DWORD nLength size, in bytes, of pvInfo buffer
4857 * LPDWORD lpnLengthNeeded receives required size, in bytes, of pvInfo buffer
4858 * Variables :
4859 * Result : If the function succeeds, the return value is TRUE.
4860 * If the function fails, the return value is FALSE. To get extended
4861 * error information, call GetLastError.
4862 * Remark :
4863 * Status : UNTESTED STUB
4864 *
4865 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4866 *****************************************************************************/
4867
4868BOOL WIN32API GetUserObjectInformationA(HANDLE hObj,
4869 int nIndex,
4870 PVOID pvInfo,
4871 DWORD nLength,
4872 LPDWORD lpnLengthNeeded)
4873{
4874 dprintf(("USER32:GetUserObjectInformationA (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
4875 hObj,
4876 nIndex,
4877 pvInfo,
4878 nLength,
4879 lpnLengthNeeded));
4880
4881 return (FALSE);
4882}
4883
4884
4885/*****************************************************************************
4886 * Name : BOOL WIN32API GetUserObjectInformationW
4887 * Purpose : The GetUserObjectInformation function returns information about
4888 * a window station or desktop object.
4889 * Parameters: HANDLE hObj handle of object to get information for
4890 * int nIndex type of information to get
4891 * PVOID pvInfo points to buffer that receives the information
4892 * DWORD nLength size, in bytes, of pvInfo buffer
4893 * LPDWORD lpnLengthNeeded receives required size, in bytes, of pvInfo buffer
4894 * Variables :
4895 * Result : If the function succeeds, the return value is TRUE.
4896 * If the function fails, the return value is FALSE. To get extended
4897 * error information, call GetLastError.
4898 * Remark :
4899 * Status : UNTESTED STUB
4900 *
4901 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4902 *****************************************************************************/
4903
4904BOOL WIN32API GetUserObjectInformationW(HANDLE hObj,
4905 int nIndex,
4906 PVOID pvInfo,
4907 DWORD nLength,
4908 LPDWORD lpnLengthNeeded)
4909{
4910 dprintf(("USER32:GetUserObjectInformationW (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
4911 hObj,
4912 nIndex,
4913 pvInfo,
4914 nLength,
4915 lpnLengthNeeded));
4916
4917 return (FALSE);
4918}
4919
4920
4921/*****************************************************************************
4922 * Name : BOOL WIN32API GetUserObjectSecurity
4923 * Purpose : The GetUserObjectSecurity function retrieves security information
4924 * for the specified user object.
4925 * Parameters: HANDLE hObj handle of user object
4926 * SECURITY_INFORMATION * pSIRequested address of requested security information
4927 * LPSECURITY_DESCRIPTOR pSID address of security descriptor
4928 * DWORD nLength size of buffer for security descriptor
4929 * LPDWORD lpnLengthNeeded address of required size of buffer
4930 * Variables :
4931 * Result : If the function succeeds, the return value is TRUE.
4932 * If the function fails, the return value is FALSE. To get extended
4933 * error information, call GetLastError.
4934 * Remark :
4935 * Status : UNTESTED STUB
4936 *
4937 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4938 *****************************************************************************/
4939
4940BOOL WIN32API GetUserObjectSecurity(HANDLE hObj,
4941 SECURITY_INFORMATION * pSIRequested,
4942 LPSECURITY_DESCRIPTOR pSID,
4943 DWORD nLength,
4944 LPDWORD lpnLengthNeeded)
4945{
4946 dprintf(("USER32:GetUserObjectSecurity (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
4947 hObj,
4948 pSIRequested,
4949 pSID,
4950 nLength,
4951 lpnLengthNeeded));
4952
4953 return (FALSE);
4954}
4955
4956
4957
4958/*****************************************************************************
4959 * Name : int WIN32API GetWindowRgn
4960 * Purpose : The GetWindowRgn function obtains a copy of the window region of a window.
4961 * Parameters: HWND hWnd handle to window whose window region is to be obtained
4962 * HRGN hRgn handle to region that receives a copy of the window region
4963 * Variables :
4964 * Result : NULLREGION, SIMPLEREGION, COMPLEXREGION, ERROR
4965 * Remark :
4966 * Status : UNTESTED STUB
4967 *
4968 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4969 *****************************************************************************/
4970
4971int WIN32API GetWindowRgn (HWND hWnd,
4972 HRGN hRgn)
4973{
4974 dprintf(("USER32:GetWindowRgn (%08xh,%08x) not implemented.\n",
4975 hWnd,
4976 hRgn));
4977
4978 return (NULLREGION);
4979}
4980
4981
4982
4983/*****************************************************************************
4984 * Name : HCURSOR WIN32API LoadCursorFromFileA
4985 * Purpose : The LoadCursorFromFile function creates a cursor based on data
4986 * contained in a file. The file is specified by its name or by a
4987 * system cursor identifier. The function returns a handle to the
4988 * newly created cursor. Files containing cursor data may be in
4989 * either cursor (.CUR) or animated cursor (.ANI) format.
4990 * Parameters: LPCTSTR lpFileName pointer to cursor file, or system cursor id
4991 * Variables :
4992 * Result : If the function is successful, the return value is a handle to
4993 * the new cursor.
4994 * If the function fails, the return value is NULL. To get extended
4995 * error information, call GetLastError. GetLastError may return
4996 * the following
4997 * Remark :
4998 * Status : UNTESTED STUB
4999 *
5000 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5001 *****************************************************************************/
5002
5003HCURSOR WIN32API LoadCursorFromFileA(LPCTSTR lpFileName)
5004{
5005 dprintf(("USER32:LoadCursorFromFileA (%s) not implemented.\n",
5006 lpFileName));
5007
5008 return (NULL);
5009}
5010
5011
5012/*****************************************************************************
5013 * Name : HCURSOR WIN32API LoadCursorFromFileW
5014 * Purpose : The LoadCursorFromFile function creates a cursor based on data
5015 * contained in a file. The file is specified by its name or by a
5016 * system cursor identifier. The function returns a handle to the
5017 * newly created cursor. Files containing cursor data may be in
5018 * either cursor (.CUR) or animated cursor (.ANI) format.
5019 * Parameters: LPCTSTR lpFileName pointer to cursor file, or system cursor id
5020 * Variables :
5021 * Result : If the function is successful, the return value is a handle to
5022 * the new cursor.
5023 * If the function fails, the return value is NULL. To get extended
5024 * error information, call GetLastError. GetLastError may return
5025 * the following
5026 * Remark :
5027 * Status : UNTESTED STUB
5028 *
5029 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5030 *****************************************************************************/
5031
5032HCURSOR WIN32API LoadCursorFromFileW(LPCWSTR lpFileName)
5033{
5034 dprintf(("USER32:LoadCursorFromFileW (%s) not implemented.\n",
5035 lpFileName));
5036
5037 return (NULL);
5038}
5039
5040
5041/*****************************************************************************
5042 * Name : HLK WIN32API LoadKeyboardLayoutA
5043 * Purpose : The LoadKeyboardLayout function loads a new keyboard layout into
5044 * the system. Several keyboard layouts can be loaded at a time, but
5045 * only one per process is active at a time. Loading multiple keyboard
5046 * layouts makes it possible to rapidly switch between layouts.
5047 * Parameters:
5048 * Variables :
5049 * Result : If the function succeeds, the return value is the handle of the
5050 * keyboard layout.
5051 * If the function fails, the return value is NULL. To get extended
5052 * error information, call GetLastError.
5053 * Remark :
5054 * Status : UNTESTED STUB
5055 *
5056 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5057 *****************************************************************************/
5058
5059HKL WIN32API LoadKeyboardLayoutA(LPCTSTR pwszKLID,
5060 UINT Flags)
5061{
5062 dprintf(("USER32:LeadKeyboardLayoutA (%s,%u) not implemented.\n",
5063 pwszKLID,
5064 Flags));
5065
5066 return (NULL);
5067}
5068
5069
5070/*****************************************************************************
5071 * Name : HLK WIN32API LoadKeyboardLayoutW
5072 * Purpose : The LoadKeyboardLayout function loads a new keyboard layout into
5073 * the system. Several keyboard layouts can be loaded at a time, but
5074 * only one per process is active at a time. Loading multiple keyboard
5075 * layouts makes it possible to rapidly switch between layouts.
5076 * Parameters:
5077 * Variables :
5078 * Result : If the function succeeds, the return value is the handle of the
5079 * keyboard layout.
5080 * If the function fails, the return value is NULL. To get extended
5081 * error information, call GetLastError.
5082 * Remark :
5083 * Status : UNTESTED STUB
5084 *
5085 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5086 *****************************************************************************/
5087
5088HKL WIN32API LoadKeyboardLayoutW(LPCWSTR pwszKLID,
5089 UINT Flags)
5090{
5091 dprintf(("USER32:LeadKeyboardLayoutW (%s,%u) not implemented.\n",
5092 pwszKLID,
5093 Flags));
5094
5095 return (NULL);
5096}
5097
5098
5099/*****************************************************************************
5100 * Name : UINT WIN32API MapVirtualKeyExA
5101 * Purpose : The MapVirtualKeyEx function translates (maps) a virtual-key
5102 * code into a scan code or character value, or translates a scan
5103 * code into a virtual-key code. The function translates the codes
5104 * using the input language and physical keyboard layout identified
5105 * by the given keyboard layout handle.
5106 * Parameters:
5107 * Variables :
5108 * Result : The return value is either a scan code, a virtual-key code, or
5109 * a character value, depending on the value of uCode and uMapType.
5110 * If there is no translation, the return value is zero.
5111 * Remark :
5112 * Status : UNTESTED STUB
5113 *
5114 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5115 *****************************************************************************/
5116
5117UINT WIN32API MapVirtualKeyExA(UINT uCode,
5118 UINT uMapType,
5119 HKL dwhkl)
5120{
5121 dprintf(("USER32:MapVirtualKeyExA (%u,%u,%08x) not implemented.\n",
5122 uCode,
5123 uMapType,
5124 dwhkl));
5125
5126 return (0);
5127}
5128
5129
5130/*****************************************************************************
5131 * Name : UINT WIN32API MapVirtualKeyExW
5132 * Purpose : The MapVirtualKeyEx function translates (maps) a virtual-key
5133 * code into a scan code or character value, or translates a scan
5134 * code into a virtual-key code. The function translates the codes
5135 * using the input language and physical keyboard layout identified
5136 * by the given keyboard layout handle.
5137 * Parameters:
5138 * Variables :
5139 * Result : The return value is either a scan code, a virtual-key code, or
5140 * a character value, depending on the value of uCode and uMapType.
5141 * If there is no translation, the return value is zero.
5142 * Remark :
5143 * Status : UNTESTED STUB
5144 *
5145 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5146 *****************************************************************************/
5147
5148UINT WIN32API MapVirtualKeyExW(UINT uCode,
5149 UINT uMapType,
5150 HKL dwhkl)
5151{
5152 dprintf(("USER32:MapVirtualKeyExW (%u,%u,%08x) not implemented.\n",
5153 uCode,
5154 uMapType,
5155 dwhkl));
5156
5157 return (0);
5158}
5159
5160
5161/*****************************************************************************
5162 * Name : int WIN32API MessageBoxExA
5163 * Purpose : The MessageBoxEx function creates, displays, and operates a message box.
5164 * Parameters: HWND hWnd handle of owner window
5165 * LPCTSTR lpText address of text in message box
5166 * LPCTSTR lpCaption address of title of message box
5167 * UINT uType style of message box
5168 * WORD wLanguageId language identifier
5169 * Variables :
5170 * Result : If the function succeeds, the return value is a nonzero menu-item
5171 * value returned by the dialog box.
5172 * Remark :
5173 * Status : UNTESTED STUB
5174 *
5175 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5176 *****************************************************************************/
5177
5178int WIN32API MessageBoxExA(HWND hWnd,
5179 LPCTSTR lpText,
5180 LPCTSTR lpCaption,
5181 UINT uType,
5182 WORD wLanguageId)
5183{
5184 dprintf(("USER32:MessageBoxExA (%08xh,%s,%s,%u,%08w) not implemented.\n",
5185 hWnd,
5186 lpText,
5187 lpCaption,
5188 uType,
5189 wLanguageId));
5190
5191 return (MessageBoxA(hWnd,
5192 lpText,
5193 lpCaption,
5194 uType));
5195}
5196
5197
5198/*****************************************************************************
5199 * Name : int WIN32API MessageBoxExW
5200 * Purpose : The MessageBoxEx function creates, displays, and operates a message box.
5201 * Parameters: HWND hWnd handle of owner window
5202 * LPCTSTR lpText address of text in message box
5203 * LPCTSTR lpCaption address of title of message box
5204 * UINT uType style of message box
5205 * WORD wLanguageId language identifier
5206 * Variables :
5207 * Result : If the function succeeds, the return value is a nonzero menu-item
5208 * value returned by the dialog box.
5209 * Remark :
5210 * Status : UNTESTED STUB
5211 *
5212 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5213 *****************************************************************************/
5214
5215int WIN32API MessageBoxExW(HWND hWnd,
5216 LPCWSTR lpText,
5217 LPCWSTR lpCaption,
5218 UINT uType,
5219 WORD wLanguageId)
5220{
5221
5222 dprintf(("USER32:MessageBoxExW (%08xh,%x,%x,%u,%08w) not implemented.\n",
5223 hWnd,
5224 lpText,
5225 lpCaption,
5226 uType,
5227 wLanguageId));
5228
5229 return MessageBoxW(hWnd, lpText, lpCaption, uType);
5230}
5231
5232
5233/*****************************************************************************
5234 * Name : BOOL WIN32API MessageBoxIndirectW
5235 * Purpose : The MessageBoxIndirect function creates, displays, and operates
5236 * a message box. The message box contains application-defined
5237 * message text and title, any icon, and any combination of
5238 * predefined push buttons.
5239 * Parameters:
5240 * Variables :
5241 * Result :
5242 * Remark :
5243 * Status : UNTESTED STUB
5244 *
5245 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5246 *****************************************************************************/
5247
5248BOOL WIN32API MessageBoxIndirectW(LPMSGBOXPARAMSW lpMsgBoxParams)
5249{
5250 dprintf(("USER32:MessageBoxIndirectW (%08x) not implemented.\n",
5251 lpMsgBoxParams));
5252
5253 return (FALSE);
5254}
5255
5256
5257/*****************************************************************************
5258 * Name : BOOL WIN32API MessageBoxIndirectA
5259 * Purpose : The MessageBoxIndirect function creates, displays, and operates
5260 * a message box. The message box contains application-defined
5261 * message text and title, any icon, and any combination of
5262 * predefined push buttons.
5263 * Parameters:
5264 * Variables :
5265 * Result :
5266 * Remark :
5267 * Status : UNTESTED STUB
5268 *
5269 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5270 *****************************************************************************/
5271
5272BOOL WIN32API MessageBoxIndirectA(LPMSGBOXPARAMSA lpMsgBoxParams)
5273{
5274 dprintf(("USER32:MessageBoxIndirectA (%08x) not implemented.\n",
5275 lpMsgBoxParams));
5276
5277 return (FALSE);
5278}
5279
5280
5281/*****************************************************************************
5282 * Name : DWORD WIN32API OemKeyScan
5283 * Purpose : The OemKeyScan function maps OEM ASCII codes 0 through 0x0FF
5284 * into the OEM scan codes and shift states. The function provides
5285 * information that allows a program to send OEM text to another
5286 * program by simulating keyboard input.
5287 * Parameters:
5288 * Variables :
5289 * Result :
5290 * Remark :
5291 * Status : UNTESTED STUB
5292 *
5293 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5294 *****************************************************************************/
5295
5296DWORD WIN32API OemKeyScan(WORD wOemChar)
5297{
5298 dprintf(("USER32:OemKeyScan (%u) not implemented.\n",
5299 wOemChar));
5300
5301 return (wOemChar);
5302}
5303
5304
5305/*****************************************************************************
5306 * Name : HDESK WIN32API OpenDesktopA
5307 * Purpose : The OpenDesktop function returns a handle to an existing desktop.
5308 * A desktop is a secure object contained within a window station
5309 * object. A desktop has a logical display surface and contains
5310 * windows, menus and hooks.
5311 * Parameters: LPCTSTR lpszDesktopName name of the desktop to open
5312 * DWORD dwFlags flags to control interaction with other applications
5313 * BOOL fInherit specifies whether returned handle is inheritable
5314 * DWORD dwDesiredAccess specifies access of returned handle
5315 * Variables :
5316 * Result : If the function succeeds, the return value is the handle to the
5317 * opened desktop.
5318 * If the function fails, the return value is NULL. To get extended
5319 * error information, call GetLastError.
5320 * Remark :
5321 * Status : UNTESTED STUB
5322 *
5323 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5324 *****************************************************************************/
5325
5326HDESK WIN32API OpenDesktopA(LPCTSTR lpszDesktopName,
5327 DWORD dwFlags,
5328 BOOL fInherit,
5329 DWORD dwDesiredAccess)
5330{
5331 dprintf(("USER32:OpenDesktopA (%s,%08xh,%08xh,%08x) not implemented.\n",
5332 lpszDesktopName,
5333 dwFlags,
5334 fInherit,
5335 dwDesiredAccess));
5336
5337 return (NULL);
5338}
5339
5340
5341/*****************************************************************************
5342 * Name : HDESK WIN32API OpenDesktopW
5343 * Purpose : The OpenDesktop function returns a handle to an existing desktop.
5344 * A desktop is a secure object contained within a window station
5345 * object. A desktop has a logical display surface and contains
5346 * windows, menus and hooks.
5347 * Parameters: LPCTSTR lpszDesktopName name of the desktop to open
5348 * DWORD dwFlags flags to control interaction with other applications
5349 * BOOL fInherit specifies whether returned handle is inheritable
5350 * DWORD dwDesiredAccess specifies access of returned handle
5351 * Variables :
5352 * Result : If the function succeeds, the return value is the handle to the
5353 * opened desktop.
5354 * If the function fails, the return value is NULL. To get extended
5355 * error information, call GetLastError.
5356 * Remark :
5357 * Status : UNTESTED STUB
5358 *
5359 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5360 *****************************************************************************/
5361
5362HDESK WIN32API OpenDesktopW(LPCTSTR lpszDesktopName,
5363 DWORD dwFlags,
5364 BOOL fInherit,
5365 DWORD dwDesiredAccess)
5366{
5367 dprintf(("USER32:OpenDesktopW (%s,%08xh,%08xh,%08x) not implemented.\n",
5368 lpszDesktopName,
5369 dwFlags,
5370 fInherit,
5371 dwDesiredAccess));
5372
5373 return (NULL);
5374}
5375
5376
5377/*****************************************************************************
5378 * Name : HDESK WIN32API OpenInputDesktop
5379 * Purpose : The OpenInputDesktop function returns a handle to the desktop
5380 * that receives user input. The input desktop is a desktop on the
5381 * window station associated with the logged-on user.
5382 * Parameters: DWORD dwFlags flags to control interaction with other applications
5383 * BOOL fInherit specifies whether returned handle is inheritable
5384 * DWORD dwDesiredAccess specifies access of returned handle
5385 * Variables :
5386 * Result : If the function succeeds, the return value is a handle of the
5387 * desktop that receives user input.
5388 * If the function fails, the return value is NULL. To get extended
5389 * error information, call GetLastError.
5390 * Remark :
5391 * Status : UNTESTED STUB
5392 *
5393 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5394 *****************************************************************************/
5395
5396HDESK WIN32API OpenInputDesktop(DWORD dwFlags,
5397 BOOL fInherit,
5398 DWORD dwDesiredAccess)
5399{
5400 dprintf(("USER32:OpenInputDesktop (%08xh,%08xh,%08x) not implemented.\n",
5401 dwFlags,
5402 fInherit,
5403 dwDesiredAccess));
5404
5405 return (NULL);
5406}
5407
5408
5409/*****************************************************************************
5410 * Name : HWINSTA WIN32API OpenWindowStationA
5411 * Purpose : The OpenWindowStation function returns a handle to an existing
5412 * window station.
5413 * Parameters: LPCTSTR lpszWinStaName name of the window station to open
5414 * BOOL fInherit specifies whether returned handle is inheritable
5415 * DWORD dwDesiredAccess specifies access of returned handle
5416 * Variables :
5417 * Result : If the function succeeds, the return value is the handle to the
5418 * specified window station.
5419 * If the function fails, the return value is NULL. To get extended
5420 * error information, call GetLastError.
5421 * Remark :
5422 * Status : UNTESTED STUB
5423 *
5424 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5425 *****************************************************************************/
5426
5427HWINSTA WIN32API OpenWindowStationA(LPCTSTR lpszWinStaName,
5428 BOOL fInherit,
5429 DWORD dwDesiredAccess)
5430{
5431 dprintf(("USER32:OpenWindowStatieonA (%s,%08xh,%08x) not implemented.\n",
5432 lpszWinStaName,
5433 fInherit,
5434 dwDesiredAccess));
5435
5436 return (NULL);
5437}
5438
5439
5440/*****************************************************************************
5441 * Name : HWINSTA WIN32API OpenWindowStationW
5442 * Purpose : The OpenWindowStation function returns a handle to an existing
5443 * window station.
5444 * Parameters: LPCTSTR lpszWinStaName name of the window station to open
5445 * BOOL fInherit specifies whether returned handle is inheritable
5446 * DWORD dwDesiredAccess specifies access of returned handle
5447 * Variables :
5448 * Result : If the function succeeds, the return value is the handle to the
5449 * specified window station.
5450 * If the function fails, the return value is NULL. To get extended
5451 * error information, call GetLastError.
5452
5453 * Remark :
5454 * Status : UNTESTED STUB
5455 *
5456 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5457 *****************************************************************************/
5458
5459HWINSTA WIN32API OpenWindowStationW(LPCTSTR lpszWinStaName,
5460 BOOL fInherit,
5461 DWORD dwDesiredAccess)
5462{
5463 dprintf(("USER32:OpenWindowStatieonW (%s,%08xh,%08x) not implemented.\n",
5464 lpszWinStaName,
5465 fInherit,
5466 dwDesiredAccess));
5467
5468 return (NULL);
5469}
5470
5471
5472/*****************************************************************************
5473 * Name : BOOL WIN32API PaintDesktop
5474 * Purpose : The PaintDesktop function fills the clipping region in the
5475 * specified device context with the desktop pattern or wallpaper.
5476 * The function is provided primarily for shell desktops.
5477 * Parameters:
5478 * Variables :
5479 * Result : If the function succeeds, the return value is TRUE.
5480 * If the function fails, the return value is FALSE.
5481 * Remark :
5482 * Status : UNTESTED STUB
5483 *
5484 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5485 *****************************************************************************/
5486
5487BOOL WIN32API PaintDesktop(HDC hdc)
5488{
5489 dprintf(("USER32:PaintDesktop (%08x) not implemented.\n",
5490 hdc));
5491
5492 return (FALSE);
5493}
5494
5495
5496/*****************************************************************************
5497 * Name : BOOL WIN32API SendMessageCallbackA
5498 * Purpose : The SendMessageCallback function sends the specified message to
5499 * a window or windows. The function calls the window procedure for
5500 * the specified window and returns immediately. After the window
5501 * procedure processes the message, the system calls the specified
5502 * callback function, passing the result of the message processing
5503 * and an application-defined value to the callback function.
5504 * Parameters: HWND hwnd handle of destination window
5505 * UINT uMsg message to send
5506 * WPARAM wParam first message parameter
5507 * LPARAM lParam second message parameter
5508 * SENDASYNCPROC lpResultCallBack function to receive message value
5509 * DWORD dwData value to pass to callback function
5510 * Variables :
5511 * Result : If the function succeeds, the return value is TRUE.
5512 * If the function fails, the return value is FALSE. To get extended
5513 * error information, call GetLastError.
5514 * Remark :
5515 * Status : UNTESTED STUB
5516 *
5517 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5518 *****************************************************************************/
5519
5520BOOL WIN32API SendMessageCallbackA(HWND hWnd,
5521 UINT uMsg,
5522 WPARAM wParam,
5523 LPARAM lParam,
5524 SENDASYNCPROC lpResultCallBack,
5525 DWORD dwData)
5526{
5527 dprintf(("USER32:SendMessageCallBackA (%08xh,%08xh,%08xh,%08xh,%08xh,%08x) not implemented.\n",
5528 hWnd,
5529 uMsg,
5530 wParam,
5531 lParam,
5532 lpResultCallBack,
5533 dwData));
5534
5535 return (FALSE);
5536}
5537
5538
5539/*****************************************************************************
5540 * Name : BOOL WIN32API SendMessageCallbackW
5541 * Purpose : The SendMessageCallback function sends the specified message to
5542 * a window or windows. The function calls the window procedure for
5543 * the specified window and returns immediately. After the window
5544 * procedure processes the message, the system calls the specified
5545 * callback function, passing the result of the message processing
5546 * and an application-defined value to the callback function.
5547 * Parameters: HWND hwnd handle of destination window
5548 * UINT uMsg message to send
5549 * WPARAM wParam first message parameter
5550 * LPARAM lParam second message parameter
5551 * SENDASYNCPROC lpResultCallBack function to receive message value
5552 * DWORD dwData value to pass to callback function
5553 * Variables :
5554 * Result : If the function succeeds, the return value is TRUE.
5555 * If the function fails, the return value is FALSE. To get extended
5556 * error information, call GetLastError.
5557 * Remark :
5558 * Status : UNTESTED STUB
5559 *
5560 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5561 *****************************************************************************/
5562
5563BOOL WIN32API SendMessageCallbackW(HWND hWnd,
5564 UINT uMsg,
5565 WPARAM wParam,
5566 LPARAM lParam,
5567 SENDASYNCPROC lpResultCallBack,
5568 DWORD dwData)
5569{
5570 dprintf(("USER32:SendMessageCallBackW (%08xh,%08xh,%08xh,%08xh,%08xh,%08x) not implemented.\n",
5571 hWnd,
5572 uMsg,
5573 wParam,
5574 lParam,
5575 lpResultCallBack,
5576 dwData));
5577
5578 return (FALSE);
5579}
5580
5581
5582/*****************************************************************************
5583 * Name : VOID WIN32API SetDebugErrorLevel
5584 * Purpose : The SetDebugErrorLevel function sets the minimum error level at
5585 * which Windows will generate debugging events and pass them to a debugger.
5586 * Parameters: DWORD dwLevel debugging error level
5587 * Variables :
5588 * Result :
5589 * Remark :
5590 * Status : UNTESTED STUB
5591 *
5592 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5593 *****************************************************************************/
5594
5595VOID WIN32API SetDebugErrorLevel(DWORD dwLevel)
5596{
5597 dprintf(("USER32:SetDebugErrorLevel (%08x) not implemented.\n",
5598 dwLevel));
5599}
5600
5601
5602/*****************************************************************************
5603 * Name : BOOL WIN32API SetProcessWindowStation
5604 * Purpose : The SetProcessWindowStation function assigns a window station
5605 * to the calling process. This enables the process to access
5606 * objects in the window station such as desktops, the clipboard,
5607 * and global atoms. All subsequent operations on the window station
5608 * use the access rights granted to hWinSta.
5609 * Parameters:
5610 * Variables :
5611 * Result : If the function succeeds, the return value is TRUE.
5612 * If the function fails, the return value is FALSE. To get extended
5613 * error information, call GetLastError.
5614 * Remark :
5615 * Status : UNTESTED STUB
5616 *
5617 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5618 *****************************************************************************/
5619
5620BOOL WIN32API SetProcessWindowStation(HWINSTA hWinSta)
5621{
5622 dprintf(("USER32:SetProcessWindowStation (%08x) not implemented.\n",
5623 hWinSta));
5624
5625 return (FALSE);
5626}
5627
5628
5629/*****************************************************************************
5630 * Name : BOOL WIN32API SetSystemCursor
5631 * Purpose : The SetSystemCursor function replaces the contents of the system
5632 * cursor specified by dwCursorId with the contents of the cursor
5633 * specified by hCursor, and then destroys hCursor. This function
5634 * lets an application customize the system cursors.
5635 * Parameters: HCURSOR hCursor set specified system cursor to this cursor's
5636 * contents, then destroy this
5637 * DWORD dwCursorID system cursor specified by its identifier
5638 * Variables :
5639 * Result : If the function succeeds, the return value is TRUE.
5640 * If the function fails, the return value is FALSE. To get extended
5641 * error information, call GetLastError.
5642 * Remark :
5643 * Status : UNTESTED STUB
5644 *
5645 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5646 *****************************************************************************/
5647
5648BOOL WIN32API SetSystemCursor(HCURSOR hCursor,
5649 DWORD dwCursorId)
5650{
5651 dprintf(("USER32:SetSystemCursor (%08xh,%08x) not implemented.\n",
5652 hCursor,
5653 dwCursorId));
5654
5655 return (FALSE);
5656}
5657
5658
5659/*****************************************************************************
5660 * Name : BOOL WIN32API SetThreadDesktop
5661 * Purpose : The SetThreadDesktop function assigns a desktop to the calling
5662 * thread. All subsequent operations on the desktop use the access
5663 * rights granted to hDesk.
5664 * Parameters: HDESK hDesk handle of the desktop to assign to this thread
5665 * Variables :
5666 * Result : If the function succeeds, the return value is TRUE.
5667 * If the function fails, the return value is FALSE. To get extended
5668 * error information, call GetLastError.
5669 * Remark :
5670 * Status : UNTESTED STUB
5671 *
5672 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5673 *****************************************************************************/
5674
5675BOOL WIN32API SetThreadDesktop(HDESK hDesktop)
5676{
5677 dprintf(("USER32:SetThreadDesktop (%08x) not implemented.\n",
5678 hDesktop));
5679
5680 return (FALSE);
5681}
5682
5683
5684/*****************************************************************************
5685 * Name : BOOL WIN32API SetUserObjectInformationA
5686 * Purpose : The SetUserObjectInformation function sets information about a
5687 * window station or desktop object.
5688 * Parameters: HANDLE hObject handle of the object for which to set information
5689 * int nIndex type of information to set
5690 * PVOID lpvInfo points to a buffer that contains the information
5691 * DWORD cbInfo size, in bytes, of lpvInfo buffer
5692 * Variables :
5693 * Result : If the function succeeds, the return value is TRUE.
5694 * If the function fails the return value is FALSE. To get extended
5695 * error information, call GetLastError.
5696 * Remark :
5697 * Status : UNTESTED STUB
5698 *
5699 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5700 *****************************************************************************/
5701
5702BOOL WIN32API SetUserObjectInformationA(HANDLE hObject,
5703 int nIndex,
5704 PVOID lpvInfo,
5705 DWORD cbInfo)
5706{
5707 dprintf(("USER32:SetUserObjectInformationA (%08xh,%u,%08xh,%08x) not implemented.\n",
5708 hObject,
5709 nIndex,
5710 lpvInfo,
5711 cbInfo));
5712
5713 return (FALSE);
5714}
5715
5716
5717/*****************************************************************************
5718 * Name : BOOL WIN32API SetUserObjectInformationW
5719 * Purpose : The SetUserObjectInformation function sets information about a
5720 * window station or desktop object.
5721 * Parameters: HANDLE hObject handle of the object for which to set information
5722 * int nIndex type of information to set
5723 * PVOID lpvInfo points to a buffer that contains the information
5724 * DWORD cbInfo size, in bytes, of lpvInfo buffer
5725 * Variables :
5726 * Result : If the function succeeds, the return value is TRUE.
5727 * If the function fails the return value is FALSE. To get extended
5728 * error information, call GetLastError.
5729 * Remark :
5730 * Status : UNTESTED STUB
5731 *
5732 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5733 *****************************************************************************/
5734
5735BOOL WIN32API SetUserObjectInformationW(HANDLE hObject,
5736 int nIndex,
5737 PVOID lpvInfo,
5738 DWORD cbInfo)
5739{
5740 dprintf(("USER32:SetUserObjectInformationW (%08xh,%u,%08xh,%08x) not implemented.\n",
5741 hObject,
5742 nIndex,
5743 lpvInfo,
5744 cbInfo));
5745
5746 return (FALSE);
5747}
5748
5749
5750/*****************************************************************************
5751 * Name : BOOL WIN32API SetUserObjectSecurity
5752 * Purpose : The SetUserObjectSecurity function sets the security of a user
5753 * object. This can be, for example, a window or a DDE conversation
5754 * Parameters: HANDLE hObject handle of user object
5755 * SECURITY_INFORMATION * psi address of security information
5756 * LPSECURITY_DESCRIPTOR psd address of security descriptor
5757 * Variables :
5758 * Result : If the function succeeds, the return value is TRUE.
5759 * If the function fails, the return value is FALSE. To get extended
5760 * error information, call GetLastError.
5761 * Remark :
5762 * Status : UNTESTED STUB
5763 *
5764 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5765 *****************************************************************************/
5766
5767BOOL WIN32API SetUserObjectSecurity(HANDLE hObject,
5768 SECURITY_INFORMATION * psi,
5769 LPSECURITY_DESCRIPTOR psd)
5770{
5771 dprintf(("USER32:SetUserObjectSecuroty (%08xh,%08xh,%08x) not implemented.\n",
5772 hObject,
5773 psi,
5774 psd));
5775
5776 return (FALSE);
5777}
5778
5779
5780/*****************************************************************************
5781 * Name : int WIN32API SetWindowRgn
5782 * Purpose : The SetWindowRgn function sets the window region of a window. The
5783 * window region determines the area within the window where the
5784 * operating system permits drawing. The operating system does not
5785 * display any portion of a window that lies outside of the window region
5786 * Parameters: HWND hWnd handle to window whose window region is to be set
5787 * HRGN hRgn handle to region
5788 * BOOL bRedraw window redraw flag
5789 * Variables :
5790 * Result : If the function succeeds, the return value is non-zero.
5791 * If the function fails, the return value is zero.
5792 * Remark :
5793 * Status : UNTESTED STUB
5794 *
5795 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5796 *****************************************************************************/
5797
5798int WIN32API SetWindowRgn(HWND hWnd,
5799 HRGN hRgn,
5800 BOOL bRedraw)
5801{
5802 dprintf(("USER32:SetWindowRgn (%08xh,%08xh,%u) not implemented.\n",
5803 hWnd,
5804 hRgn,
5805 bRedraw));
5806
5807 return (0);
5808}
5809
5810
5811/*****************************************************************************
5812 * Name : BOOL WIN32API SetWindowsHookW
5813 * Purpose : The SetWindowsHook function is not implemented in the Win32 API.
5814 * Win32-based applications should use the SetWindowsHookEx function.
5815 * Parameters:
5816 * Variables :
5817 * Result :
5818 * Remark : ARGH ! MICROSOFT !
5819 * Status : UNTESTED STUB
5820 *
5821 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5822 *****************************************************************************/
5823
5824HHOOK WIN32API SetWindowsHookW(int nFilterType, HOOKPROC pfnFilterProc)
5825
5826{
5827 return (FALSE);
5828}
5829
5830
5831/*****************************************************************************
5832 * Name : BOOL WIN32API ShowWindowAsync
5833 * Purpose : The ShowWindowAsync function sets the show state of a window
5834 * created by a different thread.
5835 * Parameters: HWND hwnd handle of window
5836 * int nCmdShow show state of window
5837 * Variables :
5838 * Result : If the window was previously visible, the return value is TRUE.
5839 * If the window was previously hidden, the return value is FALSE.
5840 * Remark :
5841 * Status : UNTESTED STUB
5842 *
5843 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5844 *****************************************************************************/
5845
5846BOOL WIN32API ShowWindowAsync (HWND hWnd,
5847 int nCmdShow)
5848{
5849 dprintf(("USER32:ShowWindowAsync (%08xh,%08x) not implemented.\n",
5850 hWnd,
5851 nCmdShow));
5852
5853 return (FALSE);
5854}
5855
5856
5857/*****************************************************************************
5858 * Name : BOOL WIN32API SwitchDesktop
5859 * Purpose : The SwitchDesktop function makes a desktop visible and activates
5860 * it. This enables the desktop to receive input from the user. The
5861 * calling process must have DESKTOP_SWITCHDESKTOP access to the
5862 * desktop for the SwitchDesktop function to succeed.
5863 * Parameters:
5864 * Variables :
5865 * Result : If the function succeeds, the return value is TRUE.
5866 * If the function fails, the return value is FALSE. To get extended
5867 * error information, call GetLastError.
5868 * Remark :
5869 * Status : UNTESTED STUB
5870 *
5871 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5872 *****************************************************************************/
5873
5874BOOL WIN32API SwitchDesktop(HDESK hDesktop)
5875{
5876 dprintf(("USER32:SwitchDesktop (%08x) not implemented.\n",
5877 hDesktop));
5878
5879 return (FALSE);
5880}
5881
5882
5883/*****************************************************************************
5884 * Name : WORD WIN32API TileWindows
5885 * Purpose : The TileWindows function tiles the specified windows, or the child
5886 * windows of the specified parent window.
5887 * Parameters: HWND hwndParent handle of parent window
5888 * WORD wFlags types of windows not to arrange
5889 * LPCRECT lpRect rectangle to arrange windows in
5890 * WORD cChildrenb number of windows to arrange
5891 * const HWND *ahwndChildren array of window handles
5892 * Variables :
5893 * Result : If the function succeeds, the return value is the number of
5894 * windows arranged.
5895 * If the function fails, the return value is zero.
5896 * Remark :
5897 * Status : UNTESTED STUB
5898 *
5899 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5900 *****************************************************************************/
5901
5902WORD WIN32API TileWindows(HWND hwndParent,
5903 UINT wFlags,
5904 const LPRECT lpRect,
5905 UINT cChildrenb,
5906 const HWND *ahwndChildren)
5907{
5908 dprintf(("USER32:TileWindows (%08xh,%08xh,%08xh,%08xh,%08x) not implemented.\n",
5909 hwndParent,
5910 wFlags,
5911 lpRect,
5912 cChildrenb,
5913 ahwndChildren));
5914
5915 return (0);
5916}
5917
5918
5919/*****************************************************************************
5920 * Name : int WIN32API ToAscii
5921 * Purpose : The ToAscii function translates the specified virtual-key code
5922 * and keyboard state to the corresponding Windows character or characters.
5923 * Parameters: UINT uVirtKey virtual-key code
5924 * UINT uScanCode scan code
5925 * PBYTE lpbKeyState address of key-state array
5926 * LPWORD lpwTransKey buffer for translated key
5927 * UINT fuState active-menu flag
5928 * Variables :
5929 * Result : 0 The specified virtual key has no translation for the current
5930 * state of the keyboard.
5931 * 1 One Windows character was copied to the buffer.
5932 * 2 Two characters were copied to the buffer. This usually happens
5933 * when a dead-key character (accent or diacritic) stored in the
5934 * keyboard layout cannot be composed with the specified virtual
5935 * key to form a single character.
5936 * Remark :
5937 * Status : UNTESTED STUB
5938 *
5939 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5940 *****************************************************************************/
5941
5942int WIN32API ToAscii(UINT uVirtKey,
5943 UINT uScanCode,
5944 PBYTE lpbKeyState,
5945 LPWORD lpwTransKey,
5946 UINT fuState)
5947{
5948 dprintf(("USER32:ToAscii (%u,%u,%08xh,%08xh,%u) not implemented.\n",
5949 uVirtKey,
5950 uScanCode,
5951 lpbKeyState,
5952 lpwTransKey,
5953 fuState));
5954
5955 return (0);
5956}
5957
5958
5959/*****************************************************************************
5960 * Name : int WIN32API ToAsciiEx
5961 * Purpose : The ToAscii function translates the specified virtual-key code
5962 * and keyboard state to the corresponding Windows character or characters.
5963 * Parameters: UINT uVirtKey virtual-key code
5964 * UINT uScanCode scan code
5965 * PBYTE lpbKeyState address of key-state array
5966 * LPWORD lpwTransKey buffer for translated key
5967 * UINT fuState active-menu flag
5968 * HLK hlk keyboard layout handle
5969 * Variables :
5970 * Result : 0 The specified virtual key has no translation for the current
5971 * state of the keyboard.
5972 * 1 One Windows character was copied to the buffer.
5973 * 2 Two characters were copied to the buffer. This usually happens
5974 * when a dead-key character (accent or diacritic) stored in the
5975 * keyboard layout cannot be composed with the specified virtual
5976 * key to form a single character.
5977 * Remark :
5978 * Status : UNTESTED STUB
5979 *
5980 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5981 *****************************************************************************/
5982
5983int WIN32API ToAsciiEx(UINT uVirtKey,
5984 UINT uScanCode,
5985 PBYTE lpbKeyState,
5986 LPWORD lpwTransKey,
5987 UINT fuState,
5988 HKL hkl)
5989{
5990 dprintf(("USER32:ToAsciiEx (%u,%u,%08xh,%08xh,%u,%08x) not implemented.\n",
5991 uVirtKey,
5992 uScanCode,
5993 lpbKeyState,
5994 lpwTransKey,
5995 fuState,
5996 hkl));
5997
5998 return (0);
5999}
6000
6001
6002/*****************************************************************************
6003 * Name : int WIN32API ToUnicode
6004 * Purpose : The ToUnicode function translates the specified virtual-key code
6005 * and keyboard state to the corresponding Unicode character or characters.
6006 * Parameters: UINT wVirtKey virtual-key code
6007 * UINT wScanCode scan code
6008 * PBYTE lpKeyState address of key-state array
6009 * LPWSTR pwszBuff buffer for translated key
6010 * int cchBuff size of translated key buffer
6011 * UINT wFlags set of function-conditioning flags
6012 * Variables :
6013 * Result : - 1 The specified virtual key is a dead-key character (accent or
6014 * diacritic). This value is returned regardless of the keyboard
6015 * layout, even if several characters have been typed and are
6016 * stored in the keyboard state. If possible, even with Unicode
6017 * keyboard layouts, the function has written a spacing version of
6018 * the dead-key character to the buffer specified by pwszBuffer.
6019 * For example, the function writes the character SPACING ACUTE
6020 * (0x00B4), rather than the character NON_SPACING ACUTE (0x0301).
6021 * 0 The specified virtual key has no translation for the current
6022 * state of the keyboard. Nothing was written to the buffer
6023 * specified by pwszBuffer.
6024 * 1 One character was written to the buffer specified by pwszBuffer.
6025 * 2 or more Two or more characters were written to the buffer specified by
6026 * pwszBuff. The most common cause for this is that a dead-key
6027 * character (accent or diacritic) stored in the keyboard layout
6028 * could not be combined with the specified virtual key to form a
6029 * single character.
6030 * Remark :
6031 * Status : UNTESTED STUB
6032 *
6033 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
6034 *****************************************************************************/
6035
6036int WIN32API ToUnicode(UINT uVirtKey,
6037 UINT uScanCode,
6038 PBYTE lpKeyState,
6039 LPWSTR pwszBuff,
6040 int cchBuff,
6041 UINT wFlags)
6042{
6043 dprintf(("USER32:ToUnicode (%u,%u,%08xh,%08xh,%u,%08x) not implemented.\n",
6044 uVirtKey,
6045 uScanCode,
6046 lpKeyState,
6047 pwszBuff,
6048 cchBuff,
6049 wFlags));
6050
6051 return (0);
6052}
6053
6054
6055/*****************************************************************************
6056 * Name : BOOL WIN32API UnloadKeyboardLayout
6057 * Purpose : The UnloadKeyboardLayout function removes a keyboard layout.
6058 * Parameters: HKL hkl handle of keyboard layout
6059 * Variables :
6060 * Result : If the function succeeds, the return value is the handle of the
6061 * keyboard layout; otherwise, it is NULL. To get extended error
6062 * information, use the GetLastError function.
6063 * Remark :
6064 * Status : UNTESTED STUB
6065 *
6066 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
6067 *****************************************************************************/
6068
6069BOOL WIN32API UnloadKeyboardLayout (HKL hkl)
6070{
6071 dprintf(("USER32:UnloadKeyboardLayout (%08x) not implemented.\n",
6072 hkl));
6073
6074 return (0);
6075}
6076
6077
6078/*****************************************************************************
6079 * Name : SHORT WIN32API VkKeyScanExW
6080 * Purpose : The VkKeyScanEx function translates a character to the
6081 * corresponding virtual-key code and shift state. The function
6082 * translates the character using the input language and physical
6083 * keyboard layout identified by the given keyboard layout handle.
6084 * Parameters: UINT uChar character to translate
6085 * HKL hkl keyboard layout handle
6086 * Variables :
6087 * Result : see docs
6088 * Remark :
6089 * Status : UNTESTED STUB
6090 *
6091 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
6092 *****************************************************************************/
6093
6094WORD WIN32API VkKeyScanExW(WCHAR uChar,
6095 HKL hkl)
6096{
6097 dprintf(("USER32:VkKeyScanExW (%u,%08x) not implemented.\n",
6098 uChar,
6099 hkl));
6100
6101 return (uChar);
6102}
6103
6104
6105/*****************************************************************************
6106 * Name : SHORT WIN32API VkKeyScanExA
6107 * Purpose : The VkKeyScanEx function translates a character to the
6108 * corresponding virtual-key code and shift state. The function
6109 * translates the character using the input language and physical
6110 * keyboard layout identified by the given keyboard layout handle.
6111 * Parameters: UINT uChar character to translate
6112 * HKL hkl keyboard layout handle
6113 * Variables :
6114 * Result : see docs
6115 * Remark :
6116 * Status : UNTESTED STUB
6117 *
6118 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
6119 *****************************************************************************/
6120
6121WORD WIN32API VkKeyScanExA(CHAR uChar,
6122 HKL hkl)
6123{
6124 dprintf(("USER32:VkKeyScanExA (%u,%08x) not implemented.\n",
6125 uChar,
6126 hkl));
6127
6128 return (uChar);
6129}
6130
6131
6132/*****************************************************************************
6133 * Name : VOID WIN32API keybd_event
6134 * Purpose : The keybd_event function synthesizes a keystroke. The system
6135 * can use such a synthesized keystroke to generate a WM_KEYUP or
6136 * WM_KEYDOWN message. The keyboard driver's interrupt handler calls
6137 * the keybd_event function.
6138 * Parameters: BYTE bVk virtual-key code
6139
6140 * BYTE bScan hardware scan code
6141 * DWORD dwFlags flags specifying various function options
6142 * DWORD dwExtraInfo additional data associated with keystroke
6143 * Variables :
6144 * Result :
6145 * Remark :
6146 * Status : UNTESTED STUB
6147 *
6148 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
6149 *****************************************************************************/
6150
6151VOID WIN32API keybd_event (BYTE bVk,
6152 BYTE bScan,
6153 DWORD dwFlags,
6154 DWORD dwExtraInfo)
6155{
6156 dprintf(("USER32:keybd_event (%u,%u,%08xh,%08x) not implemented.\n",
6157 bVk,
6158 bScan,
6159 dwFlags,
6160 dwExtraInfo));
6161}
6162
6163
6164/*****************************************************************************
6165 * Name : VOID WIN32API mouse_event
6166 * Purpose : The mouse_event function synthesizes mouse motion and button clicks.
6167 * Parameters: DWORD dwFlags flags specifying various motion/click variants
6168 * DWORD dx horizontal mouse position or position change
6169 * DWORD dy vertical mouse position or position change
6170 * DWORD cButtons unused, reserved for future use, set to zero
6171 * DWORD dwExtraInfo 32 bits of application-defined information
6172 * Variables :
6173 * Result :
6174 * Remark :
6175 * Status : UNTESTED STUB
6176 *
6177 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
6178 *****************************************************************************/
6179
6180VOID WIN32API mouse_event(DWORD dwFlags,
6181 DWORD dx,
6182 DWORD dy,
6183 DWORD cButtons,
6184 DWORD dwExtraInfo)
6185{
6186 dprintf(("USER32:mouse_event (%08xh,%u,%u,%u,%08x) not implemented.\n",
6187 dwFlags,
6188 dx,
6189 dy,
6190 cButtons,
6191 dwExtraInfo));
6192}
6193
6194
6195/*****************************************************************************
6196 * Name : BOOL WIN32API SetShellWindow
6197 * Purpose : Unknown
6198 * Parameters: Unknown
6199 * Variables :
6200 * Result :
6201 * Remark :
6202 * Status : UNTESTED UNKNOWN STUB
6203 *
6204 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6205 *****************************************************************************/
6206
6207BOOL WIN32API SetShellWindow(DWORD x1)
6208{
6209 dprintf(("USER32: SetShellWindow(%08x) not implemented.\n",
6210 x1));
6211
6212 return (FALSE); /* default */
6213}
6214
6215
6216/*****************************************************************************
6217 * Name : BOOL WIN32API PlaySoundEvent
6218 * Purpose : Unknown
6219 * Parameters: Unknown
6220 * Variables :
6221 * Result :
6222 * Remark :
6223 * Status : UNTESTED UNKNOWN STUB
6224 *
6225 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6226 *****************************************************************************/
6227
6228BOOL WIN32API PlaySoundEvent(DWORD x1)
6229{
6230 dprintf(("USER32: PlaySoundEvent(%08x) not implemented.\n",
6231 x1));
6232
6233 return (FALSE); /* default */
6234}
6235
6236
6237/*****************************************************************************
6238 * Name : BOOL WIN32API TileChildWindows
6239 * Purpose : Unknown
6240 * Parameters: Unknown
6241 * Variables :
6242 * Result :
6243 * Remark :
6244 * Status : UNTESTED UNKNOWN STUB
6245 *
6246 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6247 *****************************************************************************/
6248
6249BOOL WIN32API TileChildWindows(DWORD x1,
6250 DWORD x2)
6251{
6252 dprintf(("USER32: TileChildWindows(%08xh,%08xh) not implemented.\n",
6253 x1,
6254 x2));
6255
6256 return (FALSE); /* default */
6257}
6258
6259
6260/*****************************************************************************
6261 * Name : BOOL WIN32API SetSysColorsTemp
6262 * Purpose : Unknown
6263 * Parameters: Unknown
6264 * Variables :
6265 * Result :
6266 * Remark :
6267 * Status : UNTESTED UNKNOWN STUB
6268 *
6269 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6270 *****************************************************************************/
6271
6272BOOL WIN32API SetSysColorsTemp(void)
6273{
6274 dprintf(("USER32: SetSysColorsTemp() not implemented.\n"));
6275
6276 return (FALSE); /* default */
6277}
6278
6279
6280/*****************************************************************************
6281 * Name : BOOL WIN32API RegisterNetworkCapabilities
6282 * Purpose : Unknown
6283 * Parameters: Unknown
6284 * Variables :
6285 * Result :
6286 * Remark :
6287 * Status : UNTESTED UNKNOWN STUB
6288 *
6289 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6290 *****************************************************************************/
6291
6292BOOL WIN32API RegisterNetworkCapabilities(DWORD x1,
6293 DWORD x2)
6294{
6295 dprintf(("USER32: RegisterNetworkCapabilities(%08xh,%08xh) not implemented.\n",
6296 x1,
6297 x2));
6298
6299 return (FALSE); /* default */
6300}
6301
6302
6303/*****************************************************************************
6304 * Name : BOOL WIN32API EndTask
6305 * Purpose : Unknown
6306 * Parameters: Unknown
6307 * Variables :
6308 * Result :
6309 * Remark :
6310 * Status : UNTESTED UNKNOWN STUB
6311 *
6312 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6313 *****************************************************************************/
6314
6315BOOL WIN32API EndTask(DWORD x1,
6316 DWORD x2,
6317 DWORD x3)
6318{
6319 dprintf(("USER32: EndTask(%08xh,%08xh,%08xh) not implemented.\n",
6320 x1,
6321 x2,
6322 x3));
6323
6324 return (FALSE); /* default */
6325}
6326
6327
6328/*****************************************************************************
6329 * Name : BOOL WIN32API SwitchToThisWindow
6330 * Purpose : Unknown
6331 * Parameters: Unknown
6332 * Variables :
6333 * Result :
6334 * Remark :
6335 * Status : UNTESTED UNKNOWN STUB
6336 *
6337 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6338 *****************************************************************************/
6339
6340BOOL WIN32API SwitchToThisWindow(HWND hwnd,
6341 BOOL x2)
6342{
6343 dprintf(("USER32: SwitchToThisWindow(%08xh,%08xh) not implemented.\n",
6344 hwnd,
6345 x2));
6346
6347 return (FALSE); /* default */
6348}
6349
6350
6351/*****************************************************************************
6352 * Name : BOOL WIN32API GetNextQueueWindow
6353 * Purpose : Unknown
6354 * Parameters: Unknown
6355 * Variables :
6356 * Result :
6357 * Remark :
6358 * Status : UNTESTED UNKNOWN STUB
6359 *
6360 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6361 *****************************************************************************/
6362
6363BOOL WIN32API GetNextQueueWindow(DWORD x1,
6364 DWORD x2)
6365{
6366 dprintf(("USER32: GetNextQueueWindow(%08xh,%08xh) not implemented.\n",
6367 x1,
6368 x2));
6369
6370 return (FALSE); /* default */
6371}
6372
6373
6374/*****************************************************************************
6375 * Name : BOOL WIN32API YieldTask
6376 * Purpose : Unknown
6377 * Parameters: Unknown
6378 * Variables :
6379 * Result :
6380 * Remark :
6381 * Status : UNTESTED UNKNOWN STUB
6382 *
6383 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6384 *****************************************************************************/
6385
6386BOOL WIN32API YieldTask(void)
6387{
6388 dprintf(("USER32: YieldTask() not implemented.\n"));
6389
6390 return (FALSE); /* default */
6391}
6392
6393
6394/*****************************************************************************
6395 * Name : BOOL WIN32API WinOldAppHackoMatic
6396 * Purpose : Unknown
6397 * Parameters: Unknown
6398 * Variables :
6399 * Result :
6400 * Remark :
6401 * Status : UNTESTED UNKNOWN STUB
6402 *
6403 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6404 *****************************************************************************/
6405
6406BOOL WIN32API WinOldAppHackoMatic(DWORD x1)
6407{
6408 dprintf(("USER32: WinOldAppHackoMatic(%08x) not implemented.\n",
6409 x1));
6410
6411 return (FALSE); /* default */
6412}
6413
6414
6415/*****************************************************************************
6416 * Name : BOOL WIN32API DragObject
6417 * Purpose : Unknown
6418 * Parameters: Unknown
6419 * Variables :
6420 * Result :
6421 * Remark :
6422 * Status : UNTESTED UNKNOWN STUB
6423 *
6424 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6425 *****************************************************************************/
6426
6427DWORD WIN32API DragObject(HWND x1,HWND x2,UINT x3,DWORD x4,HCURSOR x5)
6428{
6429 dprintf(("USER32: DragObject(%08x,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
6430 x1,
6431 x2,
6432 x3,
6433 x4,
6434 x5));
6435
6436 return (FALSE); /* default */
6437}
6438
6439
6440/*****************************************************************************
6441 * Name : BOOL WIN32API CascadeChildWindows
6442 * Purpose : Unknown
6443 * Parameters: Unknown
6444 * Variables :
6445 * Result :
6446 * Remark :
6447 * Status : UNTESTED UNKNOWN STUB
6448 *
6449 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6450 *****************************************************************************/
6451
6452BOOL WIN32API CascadeChildWindows(DWORD x1,
6453 DWORD x2)
6454{
6455 dprintf(("USER32: CascadeChildWindows(%08xh,%08xh) not implemented.\n",
6456 x1,
6457 x2));
6458
6459 return (FALSE); /* default */
6460}
6461
6462
6463/*****************************************************************************
6464 * Name : BOOL WIN32API RegisterSystemThread
6465 * Purpose : Unknown
6466 * Parameters: Unknown
6467 * Variables :
6468 * Result :
6469 * Remark :
6470 * Status : UNTESTED UNKNOWN STUB
6471 *
6472 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6473 *****************************************************************************/
6474
6475BOOL WIN32API RegisterSystemThread(DWORD x1,
6476 DWORD x2)
6477{
6478 dprintf(("USER32: RegisterSystemThread(%08xh,%08xh) not implemented.\n",
6479 x1,
6480 x2));
6481
6482 return (FALSE); /* default */
6483}
6484
6485
6486/*****************************************************************************
6487 * Name : BOOL WIN32API IsHungThread
6488 * Purpose : Unknown
6489 * Parameters: Unknown
6490 * Variables :
6491 * Result :
6492 * Remark :
6493 * Status : UNTESTED UNKNOWN STUB
6494 *
6495 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6496 *****************************************************************************/
6497
6498BOOL WIN32API IsHungThread(DWORD x1)
6499{
6500 dprintf(("USER32: IsHungThread(%08xh) not implemented.\n",
6501 x1));
6502
6503 return (FALSE); /* default */
6504}
6505
6506
6507/*****************************************************************************
6508 * Name : BOOL WIN32API SysErrorBox
6509 * Purpose : Unknown
6510 * Parameters: Unknown
6511 * Variables :
6512 * Result :
6513 * Remark : HARDERR like ?
6514 * Status : UNTESTED UNKNOWN STUB
6515 *
6516 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6517 *****************************************************************************/
6518
6519BOOL WIN32API SysErrorBox(DWORD x1,
6520 DWORD x2,
6521 DWORD x3)
6522{
6523 dprintf(("USER32: SysErrorBox(%08xh,%08xh,%08xh) not implemented.\n",
6524 x1,
6525 x2,
6526 x3));
6527
6528 return (FALSE); /* default */
6529}
6530
6531
6532/*****************************************************************************
6533 * Name : BOOL WIN32API UserSignalProc
6534 * Purpose : Unknown
6535 * Parameters: Unknown
6536 * Variables :
6537 * Result :
6538 * Remark :
6539 * Status : UNTESTED UNKNOWN STUB
6540 *
6541 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6542 *****************************************************************************/
6543
6544BOOL WIN32API UserSignalProc(DWORD x1,
6545 DWORD x2,
6546 DWORD x3,
6547 DWORD x4)
6548{
6549 dprintf(("USER32: SysErrorBox(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
6550 x1,
6551 x2,
6552 x3,
6553 x4));
6554
6555 return (FALSE); /* default */
6556}
6557
6558
6559/*****************************************************************************
6560 * Name : BOOL WIN32API GetShellWindow
6561 * Purpose : Unknown
6562 * Parameters: Unknown
6563 * Variables :
6564 * Result :
6565 * Remark :
6566 * Status : UNTESTED UNKNOWN STUB
6567 *
6568 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6569 *****************************************************************************/
6570
6571HWND WIN32API GetShellWindow(void)
6572{
6573 dprintf(("USER32: GetShellWindow() not implemented.\n"));
6574
6575 return (0); /* default */
6576}
6577
6578
6579/***********************************************************************
6580 * RegisterTasklist32 [USER32.436]
6581 */
6582DWORD WIN32API RegisterTasklist (DWORD x)
6583{
6584 dprintf(("USER32: RegisterTasklist(%08xh) not implemented.\n",
6585 x));
6586
6587 return TRUE;
6588}
6589
6590
6591/***********************************************************************
6592 * DrawCaptionTemp32A [USER32.599]
6593 *
6594 * PARAMS
6595 *
6596 * RETURNS
6597 * Success:
6598 * Failure:
6599 */
6600
6601BOOL WIN32API DrawCaptionTempA(HWND hwnd,
6602 HDC hdc,
6603 const RECT *rect,
6604 HFONT hFont,
6605 HICON hIcon,
6606 LPCSTR str,
6607 UINT uFlags)
6608{
6609 RECT rc = *rect;
6610
6611 dprintf(("USER32: DrawCaptionTempA(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh)\n",
6612 hwnd,
6613 hdc,
6614 rect,
6615 hFont,
6616 hIcon,
6617 str,
6618 uFlags));
6619
6620 /* drawing background */
6621 if (uFlags & DC_INBUTTON)
6622 {
6623 O32_FillRect (hdc,
6624 &rc,
6625 GetSysColorBrush (COLOR_3DFACE));
6626
6627 if (uFlags & DC_ACTIVE)
6628 {
6629 HBRUSH hbr = O32_SelectObject (hdc,
6630 GetSysColorBrush (COLOR_ACTIVECAPTION));
6631 O32_PatBlt (hdc,
6632 rc.left,
6633 rc.top,
6634 rc.right - rc.left,
6635 rc.bottom - rc.top,
6636 0xFA0089);
6637
6638 O32_SelectObject (hdc,
6639 hbr);
6640 }
6641 }
6642 else
6643 {
6644 O32_FillRect (hdc,
6645 &rc,
6646 GetSysColorBrush ((uFlags & DC_ACTIVE) ?
6647 COLOR_ACTIVECAPTION : COLOR_INACTIVECAPTION));
6648 }
6649
6650
6651 /* drawing icon */
6652 if ((uFlags & DC_ICON) && !(uFlags & DC_SMALLCAP))
6653 {
6654 POINT pt;
6655
6656 pt.x = rc.left + 2;
6657 pt.y = (rc.bottom + rc.top - O32_GetSystemMetrics(SM_CYSMICON)) / 2;
6658
6659 if (hIcon)
6660 {
6661 DrawIconEx (hdc,
6662 pt.x,
6663 pt.y,
6664 hIcon,
6665 O32_GetSystemMetrics(SM_CXSMICON),
6666 O32_GetSystemMetrics(SM_CYSMICON),
6667 0,
6668 0,
6669 DI_NORMAL);
6670 }
6671 else
6672 {
6673 /* @@@PH 1999/06/08 not ported yet, just don't draw any icon
6674 WND *wndPtr = WIN_FindWndPtr(hwnd);
6675 HICON hAppIcon = 0;
6676
6677 if (wndPtr->class->hIconSm)
6678 hAppIcon = wndPtr->class->hIconSm;
6679 else
6680 if (wndPtr->class->hIcon)
6681 hAppIcon = wndPtr->class->hIcon;
6682
6683 DrawIconEx (hdc,
6684 pt.x,
6685 pt.y,
6686 hAppIcon,
6687 GetSystemMetrics(SM_CXSMICON),
6688 GetSystemMetrics(SM_CYSMICON),
6689 0,
6690 0,
6691 DI_NORMAL);
6692
6693 WIN_ReleaseWndPtr(wndPtr);
6694 */
6695 }
6696
6697 rc.left += (rc.bottom - rc.top);
6698 }
6699
6700 /* drawing text */
6701 if (uFlags & DC_TEXT)
6702 {
6703 HFONT hOldFont;
6704
6705 if (uFlags & DC_INBUTTON)
6706 O32_SetTextColor (hdc,
6707 O32_GetSysColor (COLOR_BTNTEXT));
6708 else
6709 if (uFlags & DC_ACTIVE)
6710 O32_SetTextColor (hdc,
6711 O32_GetSysColor (COLOR_CAPTIONTEXT));
6712 else
6713 O32_SetTextColor (hdc,
6714 O32_GetSysColor (COLOR_INACTIVECAPTIONTEXT));
6715
6716 O32_SetBkMode (hdc,
6717 TRANSPARENT);
6718
6719 if (hFont)
6720 hOldFont = O32_SelectObject (hdc,
6721 hFont);
6722 else
6723 {
6724 NONCLIENTMETRICSA nclm;
6725 HFONT hNewFont;
6726
6727 nclm.cbSize = sizeof(NONCLIENTMETRICSA);
6728 O32_SystemParametersInfo (SPI_GETNONCLIENTMETRICS,
6729 0,
6730 &nclm,
6731 0);
6732 hNewFont = O32_CreateFontIndirect ((uFlags & DC_SMALLCAP) ?
6733 &nclm.lfSmCaptionFont : &nclm.lfCaptionFont);
6734 hOldFont = O32_SelectObject (hdc,
6735 hNewFont);
6736 }
6737
6738 if (str)
6739 O32_DrawText (hdc,
6740 str,
6741 -1,
6742 &rc,
6743 DT_SINGLELINE | DT_VCENTER | DT_NOPREFIX | DT_LEFT);
6744 else
6745 {
6746 CHAR szText[128];
6747 INT nLen;
6748
6749 nLen = O32_GetWindowText (hwnd,
6750 szText,
6751 128);
6752
6753 O32_DrawText (hdc,
6754 szText,
6755 nLen,
6756 &rc,
6757 DT_SINGLELINE | DT_VCENTER | DT_NOPREFIX | DT_LEFT);
6758 }
6759
6760 if (hFont)
6761 O32_SelectObject (hdc,
6762 hOldFont);
6763 else
6764 O32_DeleteObject (O32_SelectObject (hdc,
6765 hOldFont));
6766 }
6767
6768 /* drawing focus ??? */
6769 if (uFlags & 0x2000)
6770 {
6771 dprintf(("USER32: DrawCaptionTempA undocumented flag (0x2000)!\n"));
6772 }
6773
6774 return 0;
6775}
6776
6777
6778/***********************************************************************
6779 * DrawCaptionTemp32W [USER32.602]
6780 *
6781 * PARAMS
6782 *
6783 * RETURNS
6784 * Success:
6785 * Failure:
6786 */
6787
6788BOOL WIN32API DrawCaptionTempW (HWND hwnd,
6789 HDC hdc,
6790 const RECT *rect,
6791 HFONT hFont,
6792 HICON hIcon,
6793 LPCWSTR str,
6794 UINT uFlags)
6795{
6796 LPSTR strAscii = UnicodeToAsciiString((LPWSTR)str);
6797
6798 BOOL res = DrawCaptionTempA (hwnd,
6799 hdc,
6800 rect,
6801 hFont,
6802 hIcon,
6803 strAscii,
6804 uFlags);
6805
6806 FreeAsciiString(strAscii);
6807
6808 return res;
6809}
Note: See TracBrowser for help on using the repository browser.