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

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

Removed WS_CLIPCHILDREN in CreateWindowEx (due to EB's bugfix it's no longer necessary)

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