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

Last change on this file since 106 was 106, checked in by cbratschi, 26 years ago

aaa

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