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

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

* empty log message *

File size: 231.6 KB
Line 
1/* $Id: user32.cpp,v 1.22 1999-08-31 14:37:27 sandervl Exp $ */
2
3/*
4 * Win32 misc user32 API functions for OS/2
5 *
6 * Copyright 1998 Sander van Leeuwen
7 * Copyright 1998 Patrick Haller
8 * Copyright 1998 Peter Fitzsimmons
9 * Copyright 1999 Christoph Bratschi
10 *
11 *
12 * Project Odin Software License can be found in LICENSE.TXT
13 *
14 */
15/*****************************************************************************
16 * Name : USER32.CPP
17 * Purpose : This module maps all Win32 functions contained in USER32.DLL
18 * to their OS/2-specific counterparts as far as possible.
19 *****************************************************************************/
20
21#include <os2win.h>
22#include "misc.h"
23
24#include "user32.h"
25#include "wndproc.h"
26#include "wndclass.h"
27#include "usrcall.h"
28#include "syscolor.h"
29
30#include <wchar.h>
31#include <stdlib.h>
32#include <string.h>
33#include <winicon.h>
34
35//undocumented stuff
36// WIN32API CalcChildScroll
37// WIN32API CascadeChildWindows
38// WIN32API ClientThreadConnect
39// WIN32API DragObject
40// WIN32API DrawFrame
41// WIN32API EditWndProc
42// WIN32API EndTask
43// WIN32API GetInputDesktop
44// WIN32API GetNextQueueWindow
45// WIN32API GetShellWindow
46// WIN32API InitSharedTable
47// WIN32API InitTask
48// WIN32API IsHungThread
49// WIN32API LockWindowStation
50// WIN32API ModifyAccess
51// WIN32API PlaySoundEvent
52// WIN32API RegisterLogonProcess
53// WIN32API RegisterNetworkCapabilities
54// WIN32API RegisterSystemThread
55// WIN32API SetDeskWallpaper
56// WIN32API SetDesktopBitmap
57// WIN32API SetInternalWindowPos
58// WIN32API SetLogonNotifyWindow
59// WIN32API SetShellWindow
60// WIN32API SetSysColorsTemp
61// WIN32API SetWindowFullScreenState
62// WIN32API SwitchToThisWindow
63// WIN32API SysErrorBox
64// WIN32API TileChildWindows
65// WIN32API UnlockWindowStation
66// WIN32API UserClientDllInitialize
67// WIN32API UserSignalProc
68// WIN32API WinOldAppHackoMatic
69// WIN32API WNDPROC_CALLBACK
70// WIN32API YieldTask
71
72
73
74
75//******************************************************************************
76//******************************************************************************
77HWND WIN32API GetActiveWindow()
78{
79 return(O32_GetActiveWindow());
80}
81//******************************************************************************
82//******************************************************************************
83int __cdecl wsprintfA(char *lpOut, LPCSTR lpFmt, ...)
84{
85 int rc;
86 va_list argptr;
87
88#ifdef DEBUG
89 WriteLog("USER32: wsprintfA\n");
90 WriteLog("USER32: %s\n", lpFmt);
91#endif
92 va_start(argptr, lpFmt);
93 rc = O32_wvsprintf(lpOut, (char *)lpFmt, argptr);
94 va_end(argptr);
95#ifdef DEBUG
96 WriteLog("USER32: %s\n", lpOut);
97#endif
98 return(rc);
99}
100//******************************************************************************
101//******************************************************************************
102int __cdecl wsprintfW(LPWSTR lpOut, LPCWSTR lpFmt, ...)
103{
104 int rc;
105 char *lpFmtA;
106 char szOut[512];
107 va_list argptr;
108
109 dprintf(("USER32: wsprintfW(%08xh,%08xh).\n",
110 lpOut,
111 lpFmt));
112
113 lpFmtA = UnicodeToAsciiString((LPWSTR)lpFmt);
114
115 /* @@@PH 98/07/13 transform "%s" to "%ls" does the unicode magic */
116 {
117 PSZ pszTemp;
118 PSZ pszTemp1;
119 ULONG ulStrings;
120 ULONG ulIndex; /* temporary string counter */
121
122 for (ulStrings = 0, /* determine number of placeholders */
123 pszTemp = lpFmtA;
124
125 (pszTemp != NULL) &&
126 (*pszTemp != 0);
127
128 ulStrings++)
129 {
130 pszTemp = strstr(pszTemp,
131 "%s");
132 if (pszTemp != NULL) /* skip 2 characters */
133 {
134 pszTemp++;
135 pszTemp++;
136 }
137 else
138 break; /* leave loop immediately */
139 }
140
141 if (ulStrings != 0) /* transformation required ? */
142 {
143 /* now reallocate lpFmt */
144 ulStrings += strlen(lpFmtA); /* calculate total string length */
145 pszTemp = lpFmtA; /* save string pointer */
146 pszTemp1 = lpFmtA; /* save string pointer */
147
148 /* @@@PH allocation has to be compatible to FreeAsciiString !!! */
149 lpFmtA = (char *)malloc(ulStrings + 1);
150 if (lpFmtA == NULL) /* check proper allocation */
151 return (0); /* raise error condition */
152
153 for (ulIndex = 0;
154 ulIndex <= ulStrings;
155 ulIndex++,
156 pszTemp++)
157 {
158 if ((pszTemp[0] == '%') &&
159 (pszTemp[1] == 's') )
160 {
161 /* replace %s by %ls */
162 lpFmtA[ulIndex++] = '%';
163 lpFmtA[ulIndex ] = 'l';
164 lpFmtA[ulIndex+1] = 's';
165 }
166 else
167 lpFmtA[ulIndex] = *pszTemp; /* just copy over the character */
168 }
169
170 lpFmtA[ulStrings] = 0; /* string termination */
171
172 FreeAsciiString(pszTemp1); /* the original string is obsolete */
173 }
174 }
175
176 dprintf(("USER32: wsprintfW (%s).\n",
177 lpFmt));
178
179 va_start(argptr,
180 lpFmt);
181
182 rc = O32_wvsprintf(szOut,
183 lpFmtA,
184 argptr);
185
186 AsciiToUnicode(szOut,
187 lpOut);
188
189 FreeAsciiString(lpFmtA);
190 return(rc);
191}
192//******************************************************************************
193//******************************************************************************
194int WIN32API MessageBoxA(HWND hwndOwner, LPCTSTR lpszText, LPCTSTR lpszTitle, UINT fuStyle)
195{
196 dprintf(("USER32: MessageBoxA %s %s\n", lpszText, lpszTitle));
197 return(O32_MessageBox(hwndOwner, lpszText, lpszTitle, fuStyle));
198}
199//******************************************************************************
200//******************************************************************************
201BOOL WIN32API MessageBeep( UINT arg1)
202{
203#ifdef DEBUG
204 WriteLog("USER32: MessageBeep\n");
205#endif
206 return O32_MessageBeep(arg1);
207}
208//******************************************************************************
209//******************************************************************************
210LONG WIN32API SendDlgItemMessageA( HWND arg1, int arg2, UINT arg3, WPARAM arg4, LPARAM arg5)
211{
212#ifdef DEBUG
213 WriteLog("USER32: SendDlgItemMessageA\n");
214#endif
215 return O32_SendDlgItemMessage(arg1, arg2, arg3, arg4, arg5);
216}
217//******************************************************************************
218//******************************************************************************
219VOID WIN32API PostQuitMessage( int arg1)
220{
221 dprintf(("USER32: PostQuitMessage\n"));
222 O32_PostQuitMessage(arg1);
223}
224//******************************************************************************
225// Not implemented by Open32 (31-5-99 Christoph Bratschi)
226//******************************************************************************
227BOOL WIN32API IsDlgButtonChecked( HWND arg1, UINT arg2)
228{
229#ifdef DEBUG
230 WriteLog("USER32: IsDlgButtonChecked\n");
231#endif
232// return O32_IsDlgButtonChecked(arg1, arg2);
233 return (BOOL)SendDlgItemMessageA(arg1,arg2,BM_GETCHECK,0,0);
234}
235//******************************************************************************
236//******************************************************************************
237int WIN32API GetWindowTextLengthA( HWND arg1)
238{
239 dprintf(("USER32: GetWindowTextLength\n"));
240 return O32_GetWindowTextLength(arg1);
241}
242//******************************************************************************
243//******************************************************************************
244int WIN32API GetWindowTextA( HWND arg1, LPSTR arg2, int arg3)
245{
246 dprintf(("USER32: GetWindowTextA\n"));
247 return O32_GetWindowText(arg1, arg2, arg3);
248}
249//******************************************************************************
250
251/*******************************************************************
252 * InternalGetWindowText (USER32.326)
253 */
254int WIN32API InternalGetWindowText(HWND hwnd,
255 LPWSTR lpString,
256 INT nMaxCount )
257{
258 dprintf(("USER32: InternalGetWindowText(%08xh,%08xh,%08xh) not properly implemented.\n",
259 hwnd,
260 lpString,
261 nMaxCount));
262
263 return GetWindowTextW(hwnd,lpString,nMaxCount);
264}
265
266
267//******************************************************************************
268BOOL WIN32API GetWindowRect( HWND arg1, PRECT arg2)
269{
270 BOOL rc;
271
272 rc = O32_GetWindowRect(arg1, arg2);
273 dprintf(("USER32: GetWindowRect %X returned %d\n", arg1, rc));
274 return(rc);
275}
276//******************************************************************************
277//******************************************************************************
278HWND WIN32API GetNextDlgTabItem( HWND arg1, HWND arg2, BOOL arg3)
279{
280 dprintf(("USER32: GetNextDlgTabItem\n"));
281 return O32_GetNextDlgTabItem(arg1, arg2, arg3);
282}
283//******************************************************************************
284//******************************************************************************
285BOOL WIN32API GetMessageA( LPMSG arg1, HWND arg2, UINT arg3, UINT arg4)
286{
287//// dprintf(("USER32: GetMessage\n"));
288 return O32_GetMessage(arg1, arg2, arg3, arg4);
289}
290//******************************************************************************
291//******************************************************************************
292HWND WIN32API GetFocus(void)
293{
294// dprintf(("USER32: GetFocus\n"));
295 return O32_GetFocus();
296}
297//******************************************************************************
298//******************************************************************************
299HWND WIN32API GetDlgItem(HWND arg1, int arg2)
300{
301 HWND rc;
302
303 rc = O32_GetDlgItem(arg1, arg2);
304 dprintf(("USER32: GetDlgItem %d returned %d\n", arg2, rc));
305 return(rc);
306}
307//******************************************************************************
308//******************************************************************************
309int WIN32API GetDlgCtrlID( HWND arg1)
310{
311 dprintf(("USER32: GetDlgCtrlID\n"));
312 return O32_GetDlgCtrlID(arg1);
313}
314//******************************************************************************
315//******************************************************************************
316HWND WIN32API GetDesktopWindow(void)
317{
318 dprintf(("USER32: GetDesktopWindow\n"));
319 return O32_GetDesktopWindow();
320}
321//******************************************************************************
322//******************************************************************************
323BOOL WIN32API EnumThreadWindows(DWORD dwThreadId, WNDENUMPROC lpfn, LPARAM lParam)
324{
325 BOOL rc;
326 EnumWindowCallback *callback = new EnumWindowCallback(lpfn, lParam);
327
328 dprintf(("USER32: EnumThreadWindows\n"));
329 rc = O32_EnumThreadWindows(dwThreadId, callback->GetOS2Callback(), (LPARAM)callback);
330 if(callback)
331 delete callback;
332 return(rc);
333}
334//******************************************************************************
335//******************************************************************************
336BOOL WIN32API EndDialog( HWND arg1, int arg2)
337{
338 BOOL rc;
339
340 dprintf(("USER32: EndDialog\n"));
341 rc = O32_EndDialog(arg1, arg2);
342 return(rc);
343}
344//******************************************************************************
345//******************************************************************************
346LONG WIN32API DispatchMessageA( const MSG * arg1)
347{
348//// dprintf(("USER32: DispatchMessage\n"));
349 return O32_DispatchMessage(arg1);
350}
351//******************************************************************************
352//******************************************************************************
353BOOL WIN32API OffsetRect( PRECT arg1, int arg2, int arg3)
354{
355#ifdef DEBUG
356//// WriteLog("USER32: OffsetRect\n");
357#endif
358 return O32_OffsetRect(arg1, arg2, arg3);
359}
360//******************************************************************************
361//******************************************************************************
362BOOL WIN32API CopyRect( PRECT arg1, const RECT * arg2)
363{
364// ddprintf(("USER32: CopyRect\n"));
365 return O32_CopyRect(arg1, arg2);
366}
367//******************************************************************************
368// Not implemented by Open32 (5-31-99 Christoph Bratschi)
369//******************************************************************************
370BOOL WIN32API CheckDlgButton( HWND arg1, int arg2, UINT arg3)
371{
372#ifdef DEBUG
373 WriteLog("USER32: CheckDlgButton\n");
374#endif
375// return O32_CheckDlgButton(arg1, arg2, arg3);
376 return (BOOL)SendDlgItemMessageA(arg1,arg2,BM_SETCHECK,arg3,0);
377}
378//******************************************************************************
379//******************************************************************************
380HWND WIN32API SetFocus( HWND arg1)
381{
382 dprintf(("USER32: SetFocus\n"));
383 return O32_SetFocus(arg1);
384}
385//******************************************************************************
386//******************************************************************************
387BOOL WIN32API TranslateMessage( const MSG * arg1)
388{
389#ifdef DEBUG
390//// WriteLog("USER32: TranslateMessage\n");
391#endif
392 return O32_TranslateMessage(arg1);
393}
394//******************************************************************************
395//******************************************************************************
396BOOL WIN32API SetWindowPos( HWND arg1, HWND arg2, int arg3, int arg4, int arg5, int arg6, UINT arg7)
397{
398#ifdef DEBUG
399 WriteLog("USER32: SetWindowPos\n");
400#endif
401 return O32_SetWindowPos(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
402}
403//******************************************************************************
404//******************************************************************************
405BOOL WIN32API ShowWindow(HWND arg1, int arg2)
406{
407#ifdef DEBUG
408 WriteLog("USER32: ShowWindow %X %d\n", arg1, arg2);
409#endif
410 return O32_ShowWindow(arg1, arg2);
411}
412//******************************************************************************
413//******************************************************************************
414BOOL WIN32API SetWindowTextA(HWND arg1, LPCSTR arg2)
415{
416#ifdef DEBUG
417 WriteLog("USER32: SetWindowText %s\n", arg2);
418#endif
419 return O32_SetWindowText(arg1, arg2);
420}
421//******************************************************************************
422//******************************************************************************
423BOOL WIN32API SetForegroundWindow(HWND arg1)
424{
425#ifdef DEBUG
426 WriteLog("USER32: SetForegroundWindow\n");
427#endif
428 return O32_SetForegroundWindow(arg1);
429}
430//******************************************************************************
431//******************************************************************************
432int WIN32API ReleaseDC( HWND arg1, HDC arg2)
433{
434#ifdef DEBUG
435 WriteLog("USER32: ReleaseDC\n");
436#endif
437 return O32_ReleaseDC(arg1, arg2);
438}
439//******************************************************************************
440//******************************************************************************
441BOOL WIN32API InvalidateRect(HWND arg1, const RECT *arg2, BOOL arg3)
442{
443#ifdef DEBUG
444 if(arg2)
445 WriteLog("USER32: InvalidateRect for window %X (%d,%d)(%d,%d) %d\n", arg1, arg2->left, arg2->top, arg2->right, arg2->bottom, arg3);
446 else WriteLog("USER32: InvalidateRect for window %X NULL, %d\n", arg1, arg3);
447#endif
448 return O32_InvalidateRect(arg1, arg2, arg3);
449}
450//******************************************************************************
451//******************************************************************************
452BOOL WIN32API GetUpdateRect( HWND arg1, PRECT arg2, BOOL arg3)
453{
454#ifdef DEBUG
455 WriteLog("USER32: GetUpdateRect\n");
456#endif
457 return O32_GetUpdateRect(arg1, arg2, arg3);
458}
459//******************************************************************************
460//******************************************************************************
461HDC WIN32API GetDC( HWND arg1)
462{
463 HDC hdc;
464
465 hdc = O32_GetDC(arg1);
466#ifdef DEBUG
467 WriteLog("USER32: GetDC of %X returns %X\n", arg1, hdc);
468#endif
469 return(hdc);
470}
471//******************************************************************************
472//******************************************************************************
473HDC WIN32API GetDCEx(HWND arg1, HRGN arg2, DWORD arg3)
474{
475#ifdef DEBUG
476 WriteLog("USER32: GetDCEx\n");
477#endif
478 return O32_GetDCEx(arg1, arg2, arg3);
479}
480//******************************************************************************
481//******************************************************************************
482BOOL WIN32API GetClientRect( HWND hwnd, PRECT pRect)
483{
484 BOOL rc;
485
486 rc = O32_GetClientRect(hwnd, pRect);
487 dprintf(("USER32: GetClientRect of %X returned (%d,%d) (%d,%d)\n", hwnd, pRect->left, pRect->top, pRect->right, pRect->bottom));
488 return rc;
489}
490//******************************************************************************
491//******************************************************************************
492HWND WIN32API FindWindowA(LPCSTR arg1, LPCSTR arg2)
493{
494#ifdef DEBUG
495 WriteLog("USER32: FindWindow\n");
496#endif
497 return O32_FindWindow(arg1, arg2);
498}
499//******************************************************************************
500//******************************************************************************
501HWND WIN32API FindWindowExA(HWND arg1, HWND arg2, LPCSTR arg3, LPCSTR arg4)
502{
503#ifdef DEBUG
504 WriteLog("USER32: FindWindowExA, not completely implemented\n");
505#endif
506 return O32_FindWindow(arg3, arg4);
507}
508//******************************************************************************
509//******************************************************************************
510BOOL WIN32API FlashWindow( HWND arg1, BOOL arg2)
511{
512#ifdef DEBUG
513 WriteLog("USER32: FlashWindow\n");
514#endif
515 return O32_FlashWindow(arg1, arg2);
516}
517//******************************************************************************
518//******************************************************************************
519BOOL WIN32API EndPaint( HWND arg1, const PAINTSTRUCT * arg2)
520{
521#ifdef DEBUG
522 WriteLog("USER32: EndPaint\n");
523#endif
524 return O32_EndPaint(arg1, arg2);
525}
526//******************************************************************************
527//******************************************************************************
528BOOL WIN32API MoveWindow(HWND arg1, int arg2, int arg3, int arg4, int arg5, BOOL arg6)
529{
530 BOOL rc;
531
532 rc = O32_MoveWindow(arg1, arg2, arg3, arg4, arg5, arg6);
533 dprintf(("USER32: MoveWindow %X to (%d,%d) size (%d,%d), repaint = %d returned %d\n", arg1, arg2, arg3, arg4, arg5, arg6, rc));
534 return(rc);
535}
536//******************************************************************************
537//******************************************************************************
538HWND WIN32API CreateWindowExA(DWORD dwExStyle,
539 LPCSTR arg2,
540 LPCSTR arg3,
541 DWORD dwStyle,
542 int x,
543 int y,
544 int nWidth,
545 int nHeight,
546 HWND parent,
547 HMENU arg10,
548 HINSTANCE arg11,
549 PVOID arg12)
550{
551 HWND hwnd;
552 Win32WindowProc *window = NULL;
553
554 /* @@@PH 98/06/12 CreateWindow crashes somewhere in Open32 */
555 if(arg3 == NULL)
556 arg3 = (LPCSTR)"CRASH, CRASH";
557
558 // 6-12-99 CB: WS_CLIPCHILDREN not set -> controls not redrawn
559 // Problems with group boxes
560 //SvL: Not necessary anymore (EB's fixes)
561// dwStyle |= WS_CLIPCHILDREN;
562
563 //SvL: Correct window style (like Wine does)
564 if(dwStyle & WS_CHILD) {
565 dwStyle |= WS_CLIPSIBLINGS;
566 if(!(dwStyle & WS_POPUP)) {
567 dwStyle |= WS_CAPTION;
568 }
569 }
570 if(dwExStyle & WS_EX_DLGMODALFRAME)
571 {
572 dwStyle &= ~WS_THICKFRAME;
573 }
574
575#ifdef DEBUG
576 WriteLog("USER32: CreateWindow: dwExStyle = %X\n", dwExStyle);
577 if((int)arg2 >> 16 != 0)
578 WriteLog("USER32: CreateWindow: classname = %s\n", arg2);
579 else WriteLog("USER32: CreateWindow: classname = %X\n", arg2);
580 WriteLog("USER32: CreateWindow: windowname= %s\n", arg3);
581 WriteLog("USER32: CreateWindow: dwStyle = %X\n", dwStyle);
582 WriteLog("USER32: CreateWindow: x = %d\n", x);
583 WriteLog("USER32: CreateWindow: y = %d\n", y);
584 WriteLog("USER32: CreateWindow: nWidth = %d\n", nWidth);
585 WriteLog("USER32: CreateWindow: nHeight = %d\n", nHeight);
586 WriteLog("USER32: CreateWindow: parent = %X\n", parent);
587 WriteLog("USER32: CreateWindow: hwmenu = %X\n", arg10);
588 WriteLog("USER32: CreateWindow: hinstance = %X\n", arg11);
589 WriteLog("USER32: CreateWindow: param = %X\n", arg12);
590 #endif
591
592 if((int) arg2 >> 16 != 0 && strcmp(arg2, "COMBOBOX") == 0)
593 {
594 dprintf(("COMBOBOX creation"));
595 //TODO: #%@#%$ Open32 doesn't support this
596 dwStyle &= ~(CBS_OWNERDRAWFIXED | CBS_OWNERDRAWVARIABLE);
597
598 /* @@@PH 98/06/12 drop down combos are problematic too */
599 /* so we translate the styles to OS/2 style */
600 dwStyle |= CBS_DROPDOWN | CBS_DROPDOWNLIST;
601 }
602
603 //Classname might be name of system class, in which case we don't
604 //need to use our own callback
605// if(Win32WindowClass::FindClass((LPSTR)arg2) != NULL) {
606 window = new Win32WindowProc(arg11, arg2);
607// }
608
609 hwnd = O32_CreateWindowEx(dwExStyle,
610 arg2,
611 arg3,
612 dwStyle,
613 x,
614 y,
615 nWidth,
616 nHeight,
617 parent,
618 arg10,
619 arg11,
620 arg12);
621
622 //SvL: 16-11-'97: window can be already destroyed if hwnd == 0
623 if(hwnd == 0 && window != 0 && Win32WindowProc::FindWindowProc(window)) {
624 delete(window);
625 window = 0;
626 }
627 if(window) {
628 window->SetWindowHandle(hwnd);
629 }
630
631 dprintf(("USER32: ************CreateWindowExA %s (%d,%d,%d,%d), hwnd = %X\n", arg2, x, y, nWidth, nHeight, hwnd));
632 return(hwnd);
633}
634//******************************************************************************
635//******************************************************************************
636LRESULT WIN32API SendMessageA(HWND arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
637{
638 LRESULT rc;
639
640#ifdef DEBUG1
641 WriteLog("USER32: SendMessage....\n");
642#endif
643 rc = O32_SendMessage(arg1, arg2, arg3, arg4);
644#ifdef DEBUG1
645 WriteLog("USER32: *****SendMessage %X %X %X %X returned %d\n", arg1, arg2, arg3, arg4, rc);
646#endif
647 return(rc);
648}
649//******************************************************************************
650//******************************************************************************
651HWND WIN32API SetActiveWindow( HWND arg1)
652{
653#ifdef DEBUG
654 WriteLog("USER32: SetActiveWindow\n");
655#endif
656 return O32_SetActiveWindow(arg1);
657}
658//******************************************************************************
659//******************************************************************************
660HDC WIN32API BeginPaint(HWND arg1, PPAINTSTRUCT arg2)
661{
662 dprintf(("USER32: BeginPaint %X\n", arg2));
663 return O32_BeginPaint(arg1, arg2);
664}
665//******************************************************************************
666//******************************************************************************
667BOOL WIN32API IsDialogMessageA( HWND arg1, LPMSG arg2)
668{
669#ifdef DEBUG
670//// WriteLog("USER32: IsDialogMessage\n");
671#endif
672 return O32_IsDialogMessage(arg1, arg2);
673}
674//******************************************************************************
675//******************************************************************************
676int WIN32API DrawTextA(HDC arg1, LPCSTR arg2, int arg3, PRECT arg4, UINT arg5)
677{
678#ifdef DEBUG
679 WriteLog("USER32: DrawTextA %s", arg2);
680#endif
681 return O32_DrawText(arg1, arg2, arg3, arg4, arg5);
682}
683//******************************************************************************
684//******************************************************************************
685int WIN32API GetSystemMetrics(int arg1)
686{
687 int rc;
688
689 switch(arg1) {
690 case SM_CXICONSPACING: //TODO: size of grid cell for large icons
691 rc = O32_GetSystemMetrics(SM_CXICON);
692 break;
693 case SM_CYICONSPACING:
694 rc = O32_GetSystemMetrics(SM_CYICON);
695 break;
696 case SM_PENWINDOWS:
697 rc = FALSE;
698 break;
699 case SM_DBCSENABLED:
700 rc = FALSE;
701 break;
702 case SM_CXEDGE: //size of 3D window edge (not supported)
703 rc = 1;
704 break;
705 case SM_CYEDGE:
706 rc = 1;
707 break;
708 case SM_CXMINSPACING: //can be SM_CXMINIMIZED or larger
709 rc = O32_GetSystemMetrics(SM_CXMINIMIZED);
710 break;
711 case SM_CYMINSPACING:
712 rc = GetSystemMetrics(SM_CYMINIMIZED);
713 break;
714 case SM_CXSMICON: //recommended size of small icons (TODO: adjust to screen res.)
715 rc = 16;
716 break;
717 case SM_CYSMICON:
718 rc = 16;
719 break;
720 case SM_CYSMCAPTION: //size in pixels of a small caption (TODO: ????)
721 rc = 8;
722 break;
723 case SM_CXSMSIZE: //size of small caption buttons (pixels) (TODO: implement properly)
724 rc = 16;
725 break;
726 case SM_CYSMSIZE:
727 rc = 16;
728 break;
729 case SM_CXMENUSIZE: //TODO: size of menu bar buttons (such as MDI window close)
730 rc = 16;
731 break;
732 case SM_CYMENUSIZE:
733 rc = 16;
734 break;
735 case SM_ARRANGE:
736 rc = ARW_BOTTOMLEFT | ARW_LEFT;
737 break;
738 case SM_CXMINIMIZED:
739 break;
740 case SM_CYMINIMIZED:
741 break;
742 case SM_CXMAXTRACK: //max window size
743 case SM_CXMAXIMIZED: //max toplevel window size
744 rc = O32_GetSystemMetrics(SM_CXSCREEN);
745 break;
746 case SM_CYMAXTRACK:
747 case SM_CYMAXIMIZED:
748 rc = O32_GetSystemMetrics(SM_CYSCREEN);
749 break;
750 case SM_NETWORK:
751 rc = 0x01; //TODO: default = yes
752 break;
753 case SM_CLEANBOOT:
754 rc = 0; //normal boot
755 break;
756 case SM_CXDRAG: //nr of pixels before drag becomes a real one
757 rc = 2;
758 break;
759 case SM_CYDRAG:
760 rc = 2;
761 break;
762 case SM_SHOWSOUNDS: //show instead of play sound
763 rc = FALSE;
764 break;
765 case SM_CXMENUCHECK:
766 rc = 4; //TODO
767 break;
768 case SM_CYMENUCHECK:
769 rc = O32_GetSystemMetrics(SM_CYMENU);
770 break;
771 case SM_SLOWMACHINE:
772 rc = FALSE; //even a slow machine is fast with OS/2 :)
773 break;
774 case SM_MIDEASTENABLED:
775 rc = FALSE;
776 break;
777 case SM_CMETRICS:
778 rc = O32_GetSystemMetrics(44); //Open32 changed this one
779 break;
780 default:
781 rc = O32_GetSystemMetrics(arg1);
782 break;
783 }
784 dprintf(("USER32: GetSystemMetrics %d returned %d\n", arg1, rc));
785 return(rc);
786}
787//******************************************************************************
788//******************************************************************************
789UINT WIN32API SetTimer( HWND arg1, UINT arg2, UINT arg3, TIMERPROC arg4)
790{
791#ifdef DEBUG
792 WriteLog("USER32: SetTimer INCORRECT CALLING CONVENTION FOR HANDLER!!!!!\n");
793#endif
794 //SvL: Write callback handler class for this one
795 return O32_SetTimer(arg1, arg2, arg3, (TIMERPROC_O32)arg4);
796}
797//******************************************************************************
798//******************************************************************************
799BOOL WIN32API KillTimer(HWND arg1, UINT arg2)
800{
801#ifdef DEBUG
802 WriteLog("USER32: KillTimer\n");
803#endif
804 return O32_KillTimer(arg1, arg2);
805}
806//******************************************************************************
807//******************************************************************************
808BOOL WIN32API DestroyWindow(HWND arg1)
809{
810#ifdef DEBUG
811 WriteLog("USER32: DestroyWindow\n");
812#endif
813 return O32_DestroyWindow(arg1);
814}
815//******************************************************************************
816//******************************************************************************
817BOOL WIN32API PostMessageA( HWND arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
818{
819#ifdef DEBUG
820 WriteLog("USER32: PostMessageA %X %X %X %X\n", arg1, arg2, arg3, arg4);
821#endif
822 return O32_PostMessage(arg1, arg2, arg3, arg4);
823}
824//******************************************************************************
825//******************************************************************************
826BOOL WIN32API InflateRect( PRECT arg1, int arg2, int arg3)
827{
828#ifdef DEBUG
829 WriteLog("USER32: InflateRect\n");
830#endif
831 return O32_InflateRect(arg1, arg2, arg3);
832}
833//******************************************************************************
834//TODO:How can we emulate this one in OS/2???
835//******************************************************************************
836DWORD WIN32API WaitForInputIdle(HANDLE hProcess, DWORD dwTimeOut)
837{
838#ifdef DEBUG
839 WriteLog("USER32: WaitForInputIdle (Not Implemented) %d\n", dwTimeOut);
840#endif
841
842 if(dwTimeOut == INFINITE) return(0);
843
844// DosSleep(dwTimeOut/16);
845 return(0);
846}
847//******************************************************************************
848//******************************************************************************
849UINT WIN32API GetDlgItemTextA(HWND arg1, int arg2, LPSTR arg3, UINT arg4)
850{
851 UINT rc;
852
853 rc = O32_GetDlgItemText(arg1, arg2, arg3, arg4);
854#ifdef DEBUG
855 if(rc)
856 WriteLog("USER32: GetDlgItemTextA returned %s\n", arg3);
857 else WriteLog("USER32: GetDlgItemTextA returned 0 (%d)\n", GetLastError());
858#endif
859 return(rc);
860}
861//******************************************************************************
862//******************************************************************************
863BOOL WIN32API PeekMessageA(LPMSG arg1, HWND arg2, UINT arg3, UINT arg4, UINT arg5)
864{
865#ifdef DEBUG
866// WriteLog("USER32: PeekMessage\n");
867#endif
868 return O32_PeekMessage(arg1, arg2, arg3, arg4, arg5);
869}
870//******************************************************************************
871//******************************************************************************
872int WIN32API ShowCursor( BOOL arg1)
873{
874#ifdef DEBUG
875 WriteLog("USER32: ShowCursor\n");
876#endif
877 return O32_ShowCursor(arg1);
878}
879//******************************************************************************
880//BUGBUG: UpdateWindow sends a WM_ERASEBKGRND when it shouldn't!
881// So we just do it manually
882//******************************************************************************
883BOOL WIN32API UpdateWindow(HWND hwnd)
884{
885 RECT rect;
886
887#ifdef DEBUG
888 WriteLog("USER32: UpdateWindow\n");
889#endif
890
891#if 0 // EB: ->>> doesn't work. No correct update of Winhlp32 scrolling area.
892 if(O32_GetUpdateRect(hwnd, &rect, FALSE) != FALSE) {//update region empty?
893 WndCallback(hwnd, WM_PAINT, 0, 0);
894// O32_PostMessage(hwnd, WM_PAINT, 0, 0);
895 }
896#ifdef DEBUG
897 else WriteLog("USER32: Update region empty!\n");
898#endif
899 return(TRUE);
900#endif
901
902 return O32_UpdateWindow(hwnd);
903}
904//******************************************************************************
905//******************************************************************************
906BOOL WIN32API AdjustWindowRect( PRECT arg1, DWORD arg2, BOOL arg3)
907{
908#ifdef DEBUG
909 WriteLog("USER32: AdjustWindowRect\n");
910#endif
911 return O32_AdjustWindowRect(arg1, arg2, arg3);
912}
913//******************************************************************************
914//******************************************************************************
915BOOL WIN32API AdjustWindowRectEx( PRECT arg1, DWORD arg2, BOOL arg3, DWORD arg4)
916{
917#ifdef DEBUG
918 WriteLog("USER32: AdjustWindowRectEx\n");
919#endif
920 return O32_AdjustWindowRectEx(arg1, arg2, arg3, arg4);
921}
922//******************************************************************************
923//******************************************************************************
924BOOL WIN32API ClientToScreen( HWND arg1, PPOINT arg2)
925{
926#ifdef DEBUG
927//// WriteLog("USER32: ClientToScreen\n");
928#endif
929 return O32_ClientToScreen(arg1, arg2);
930}
931//******************************************************************************
932//******************************************************************************
933BOOL WIN32API SetRect( PRECT arg1, int arg2, int arg3, int arg4, int arg5)
934{
935#ifdef DEBUG
936 WriteLog("USER32: SetRect\n");
937#endif
938 return O32_SetRect(arg1, arg2, arg3, arg4, arg5);
939}
940//******************************************************************************
941//******************************************************************************
942BOOL WIN32API SetDlgItemInt( HWND arg1, int arg2, UINT arg3, BOOL arg4)
943{
944#ifdef DEBUG
945 WriteLog("USER32: SetDlgItemInt\n");
946#endif
947 return O32_SetDlgItemInt(arg1, arg2, arg3, arg4);
948}
949//******************************************************************************
950//******************************************************************************
951BOOL WIN32API SetDlgItemTextA( HWND arg1, int arg2, LPCSTR arg3)
952{
953#ifdef DEBUG
954 WriteLog("USER32: SetDlgItemText to %s\n", arg3);
955#endif
956 return O32_SetDlgItemText(arg1, arg2, arg3);
957}
958//******************************************************************************
959//******************************************************************************
960BOOL WIN32API WinHelpA( HWND arg1, LPCSTR arg2, UINT arg3, DWORD arg4)
961{
962#ifdef DEBUG
963 WriteLog("USER32: WinHelp not implemented %s\n", arg2);
964#endif
965// return O32_WinHelp(arg1, arg2, arg3, arg4);
966 return(TRUE);
967}
968//******************************************************************************
969//******************************************************************************
970BOOL WIN32API IsIconic( HWND arg1)
971{
972#ifdef DEBUG
973 WriteLog("USER32: IsIconic\n");
974#endif
975 return O32_IsIconic(arg1);
976}
977//******************************************************************************
978//******************************************************************************
979int WIN32API TranslateAcceleratorA(HWND arg1, HACCEL arg2, LPMSG arg3)
980{
981#ifdef DEBUG
982//// WriteLog("USER32: TranslateAccelerator\n");
983#endif
984 return O32_TranslateAccelerator(arg1, arg2, arg3);
985}
986//******************************************************************************
987//******************************************************************************
988HWND WIN32API GetWindow(HWND arg1, UINT arg2)
989{
990 HWND rc;
991
992 rc = O32_GetWindow(arg1, arg2);
993#ifdef DEBUG
994 WriteLog("USER32: GetWindow %X %d returned %d\n", arg1, arg2, rc);
995#endif
996 return(rc);
997}
998//******************************************************************************
999//******************************************************************************
1000HDC WIN32API GetWindowDC(HWND arg1)
1001{
1002#ifdef DEBUG
1003 WriteLog("USER32: GetWindowDC\n");
1004#endif
1005 return O32_GetWindowDC(arg1);
1006}
1007//******************************************************************************
1008//******************************************************************************
1009BOOL WIN32API SubtractRect( PRECT arg1, const RECT * arg2, const RECT * arg3)
1010{
1011#ifdef DEBUG
1012 WriteLog("USER32: SubtractRect");
1013#endif
1014 return O32_SubtractRect(arg1, arg2, arg3);
1015}
1016//******************************************************************************
1017//SvL: 24-6-'97 - Added
1018//******************************************************************************
1019BOOL WIN32API ClipCursor(const RECT * arg1)
1020{
1021#ifdef DEBUG
1022 WriteLog("USER32: ClipCursor\n");
1023#endif
1024 return O32_ClipCursor(arg1);
1025}
1026//******************************************************************************
1027//SvL: 24-6-'97 - Added
1028//TODO: Not implemented
1029//******************************************************************************
1030WORD WIN32API GetAsyncKeyState(INT nVirtKey)
1031{
1032#ifdef DEBUG
1033//// WriteLog("USER32: GetAsyncKeyState Not implemented\n");
1034#endif
1035 return 0;
1036}
1037//******************************************************************************
1038//SvL: 24-6-'97 - Added
1039//******************************************************************************
1040HCURSOR WIN32API GetCursor(void)
1041{
1042#ifdef DEBUG
1043//// WriteLog("USER32: GetCursor\n");
1044#endif
1045 return O32_GetCursor();
1046}
1047//******************************************************************************
1048//SvL: 24-6-'97 - Added
1049//******************************************************************************
1050BOOL WIN32API GetCursorPos( PPOINT arg1)
1051{
1052#ifdef DEBUG
1053//// WriteLog("USER32: GetCursorPos\n");
1054#endif
1055 return O32_GetCursorPos(arg1);
1056}
1057//******************************************************************************
1058//SvL: 24-6-'97 - Added
1059//******************************************************************************
1060UINT WIN32API RegisterWindowMessageA(LPCSTR arg1)
1061{
1062 UINT rc;
1063
1064 rc = O32_RegisterWindowMessage(arg1);
1065#ifdef DEBUG
1066 WriteLog("USER32: RegisterWindowMessageA %s returned %X\n", arg1, rc);
1067#endif
1068 return(rc);
1069}
1070//******************************************************************************
1071//SvL: 24-6-'97 - Added
1072//******************************************************************************
1073WORD WIN32API VkKeyScanA( char arg1)
1074{
1075#ifdef DEBUG
1076 WriteLog("USER32: VkKeyScanA\n");
1077#endif
1078 return O32_VkKeyScan(arg1);
1079}
1080//******************************************************************************
1081//SvL: 24-6-'97 - Added
1082//******************************************************************************
1083SHORT WIN32API GetKeyState( int arg1)
1084{
1085#ifdef DEBUG
1086 WriteLog("USER32: GetKeyState %d\n", arg1);
1087#endif
1088 return O32_GetKeyState(arg1);
1089}
1090//******************************************************************************
1091//******************************************************************************
1092HCURSOR WIN32API SetCursor( HCURSOR arg1)
1093{
1094#ifdef DEBUG
1095 WriteLog("USER32: SetCursor\n");
1096#endif
1097 return O32_SetCursor(arg1);
1098}
1099//******************************************************************************
1100//******************************************************************************
1101BOOL WIN32API SetCursorPos( int arg1, int arg2)
1102{
1103#ifdef DEBUG
1104 WriteLog("USER32: SetCursorPos\n");
1105#endif
1106 return O32_SetCursorPos(arg1, arg2);
1107}
1108//******************************************************************************
1109//******************************************************************************
1110BOOL WIN32API EnableScrollBar( HWND arg1, INT arg2, UINT arg3)
1111{
1112#ifdef DEBUG
1113 WriteLog("USER32: EnableScrollBar\n");
1114#endif
1115 return O32_EnableScrollBar(arg1, arg2, arg3);
1116}
1117//******************************************************************************
1118//******************************************************************************
1119BOOL WIN32API EnableWindow( HWND arg1, BOOL arg2)
1120{
1121#ifdef DEBUG
1122 WriteLog("USER32: EnableWindow\n");
1123#endif
1124 return O32_EnableWindow(arg1, arg2);
1125}
1126//******************************************************************************
1127//******************************************************************************
1128HWND WIN32API SetCapture( HWND arg1)
1129{
1130#ifdef DEBUG
1131 WriteLog("USER32: SetCapture\n");
1132#endif
1133 return O32_SetCapture(arg1);
1134}
1135//******************************************************************************
1136//******************************************************************************
1137BOOL WIN32API ReleaseCapture(void)
1138{
1139#ifdef DEBUG
1140 WriteLog("USER32: ReleaseCapture\n");
1141#endif
1142 return O32_ReleaseCapture();
1143}
1144//******************************************************************************
1145//******************************************************************************
1146DWORD WIN32API MsgWaitForMultipleObjects( DWORD arg1, LPHANDLE arg2, BOOL arg3, DWORD arg4, DWORD arg5)
1147{
1148#ifdef DEBUG
1149 WriteLog("USER32: MsgWaitForMultipleObjects\n");
1150#endif
1151 return O32_MsgWaitForMultipleObjects(arg1, arg2, arg3, arg4, arg5);
1152}
1153//******************************************************************************
1154//******************************************************************************
1155HDWP WIN32API BeginDeferWindowPos( int arg1)
1156{
1157#ifdef DEBUG
1158 WriteLog("USER32: BeginDeferWindowPos\n");
1159#endif
1160 return O32_BeginDeferWindowPos(arg1);
1161}
1162//******************************************************************************
1163//******************************************************************************
1164BOOL WIN32API BringWindowToTop( HWND arg1)
1165{
1166#ifdef DEBUG
1167 WriteLog("USER32: BringWindowToTop\n");
1168#endif
1169 return O32_BringWindowToTop(arg1);
1170}
1171//******************************************************************************
1172//******************************************************************************
1173BOOL WIN32API CallMsgFilterA( LPMSG arg1, int arg2)
1174{
1175#ifdef DEBUG
1176 WriteLog("USER32: CallMsgFilterA\n");
1177#endif
1178 return O32_CallMsgFilter(arg1, arg2);
1179}
1180//******************************************************************************
1181//******************************************************************************
1182BOOL WIN32API CallMsgFilterW( LPMSG arg1, int arg2)
1183{
1184#ifdef DEBUG
1185 WriteLog("USER32: CallMsgFilterW\n");
1186#endif
1187 // NOTE: This will not work as is (needs UNICODE support)
1188 return O32_CallMsgFilter(arg1, arg2);
1189}
1190//******************************************************************************
1191//******************************************************************************
1192LRESULT WIN32API CallWindowProcA(WNDPROC wndprcPrev,
1193 HWND arg2,
1194 UINT arg3,
1195 WPARAM arg4,
1196 LPARAM arg5)
1197{
1198#ifdef DEBUG
1199//// WriteLog("USER32: CallWindowProcA %X hwnd=%X, msg = %X\n", wndprcPrev, arg2, arg3);
1200#endif
1201
1202 return wndprcPrev(arg2, arg3, arg4, arg5); //win32 callback (__stdcall)
1203}
1204//******************************************************************************
1205//******************************************************************************
1206LRESULT WIN32API CallWindowProcW(WNDPROC arg1,
1207 HWND arg2,
1208 UINT arg3,
1209 WPARAM arg4,
1210 LPARAM arg5)
1211{
1212 dprintf(("USER32: CallWindowProcW(%08xh,%08xh,%08xh,%08xh,%08xh) not properly implemented.\n",
1213 arg1,
1214 arg2,
1215 arg3,
1216 arg4,
1217 arg5));
1218
1219 return CallWindowProcA(arg1,
1220 arg2,
1221 arg3,
1222 arg4,
1223 arg5);
1224}
1225//******************************************************************************
1226//******************************************************************************
1227BOOL WIN32API ChangeClipboardChain( HWND arg1, HWND arg2)
1228{
1229#ifdef DEBUG
1230 WriteLog("USER32: ChangeClipboardChain\n");
1231#endif
1232 return O32_ChangeClipboardChain(arg1, arg2);
1233}
1234//******************************************************************************
1235//******************************************************************************
1236UINT WIN32API ArrangeIconicWindows( HWND arg1)
1237{
1238#ifdef DEBUG
1239 WriteLog("USER32: ArrangeIconicWindows\n");
1240#endif
1241 return O32_ArrangeIconicWindows(arg1);
1242}
1243//******************************************************************************
1244// Not implemented by Open32 (5-31-99 Christoph Bratschi)
1245//******************************************************************************
1246BOOL WIN32API CheckRadioButton( HWND arg1, UINT arg2, UINT arg3, UINT arg4)
1247{
1248#ifdef DEBUG
1249 WriteLog("USER32: CheckRadioButton\n");
1250#endif
1251// return O32_CheckRadioButton(arg1, arg2, arg3, arg4);
1252 if (arg2 > arg3) return (FALSE);
1253 for (UINT x=arg2;x <= arg3;x++)
1254 {
1255 SendDlgItemMessageA(arg1,x,BM_SETCHECK,(x == arg4) ? BST_CHECKED : BST_UNCHECKED,0);
1256 }
1257 return (TRUE);
1258}
1259//******************************************************************************
1260//******************************************************************************
1261HWND WIN32API ChildWindowFromPoint( HWND arg1, POINT arg2)
1262{
1263#ifdef DEBUG
1264 WriteLog("USER32: ChildWindowFromPoint\n");
1265#endif
1266 return O32_ChildWindowFromPoint(arg1, arg2);
1267}
1268/*****************************************************************************
1269 * Name : HWND WIN32API ChildWindowFromPointEx
1270 * Purpose : The GetWindowRect function retrieves the dimensions of the
1271 * bounding rectangle of the specified window. The dimensions are
1272 * given in screen coordinates that are relative to the upper-left
1273 * corner of the screen.
1274 * Parameters:
1275 * Variables :
1276 * Result : If the function succeeds, the return value is the window handle.
1277 * If the function fails, the return value is zero
1278 * Remark :
1279 * Status : FULLY IMPLEMENTED AND TESTED
1280 *
1281 * Author : Rene Pronk [Sun, 1999/08/08 23:30]
1282 *****************************************************************************/
1283
1284
1285HWND WIN32API ChildWindowFromPointEx (HWND hwndParent, POINT pt, UINT uFlags)
1286{
1287 RECT rect;
1288 HWND hWnd;
1289 POINT absolutePt;
1290
1291 dprintf(("USER32: ChildWindowFromPointEx(%08xh,%08xh,%08xh).\n",
1292 hwndParent, pt, uFlags));
1293
1294 if (GetWindowRect (hwndParent, &rect) == 0) {
1295 // oops, invalid handle
1296 return NULL;
1297 }
1298
1299 // absolutePt has its top in the upper-left corner of the screen
1300 absolutePt = pt;
1301 ClientToScreen (hwndParent, &absolutePt);
1302
1303 // make rect the size of the parent window
1304 GetWindowRect (hwndParent, &rect);
1305 rect.right = rect.right - rect.left;
1306 rect.bottom = rect.bottom - rect.top;
1307 rect.left = 0;
1308 rect.top = 0;
1309
1310 if (PtInRect (&rect, pt) == 0) {
1311 // point is outside window
1312 return NULL;
1313 }
1314
1315 // get first child
1316 hWnd = GetWindow (hwndParent, GW_CHILD);
1317
1318 while (hWnd != NULL) {
1319
1320 // do I need to skip this window?
1321 if (((uFlags & CWP_SKIPINVISIBLE) &&
1322 (IsWindowVisible (hWnd) == FALSE)) ||
1323 ((uFlags & CWP_SKIPDISABLED) &&
1324 (IsWindowEnabled (hWnd) == FALSE)) ||
1325 ((uFlags & CWP_SKIPTRANSPARENT) &&
1326 (GetWindowLongA (hWnd, GWL_EXSTYLE) & WS_EX_TRANSPARENT)))
1327
1328 {
1329 hWnd = GetWindow (hWnd, GW_HWNDNEXT);
1330 continue;
1331 }
1332
1333 // is the point in this window's rect?
1334 GetWindowRect (hWnd, &rect);
1335 if (PtInRect (&rect, absolutePt) == FALSE) {
1336 hWnd = GetWindow (hWnd, GW_HWNDNEXT);
1337 continue;
1338 }
1339
1340 // found it!
1341 return hWnd;
1342 }
1343
1344 // the point is in the parentwindow but the parentwindow has no child
1345 // at this coordinate
1346 return hwndParent;
1347}
1348//******************************************************************************
1349//******************************************************************************
1350BOOL WIN32API CloseClipboard(void)
1351{
1352#ifdef DEBUG
1353 WriteLog("USER32: CloseClipboard\n");
1354#endif
1355 return O32_CloseClipboard();
1356}
1357//******************************************************************************
1358//******************************************************************************
1359BOOL WIN32API CloseWindow( HWND arg1)
1360{
1361#ifdef DEBUG
1362 WriteLog("USER32: CloseWindow\n");
1363#endif
1364 return O32_CloseWindow(arg1);
1365}
1366//******************************************************************************
1367//******************************************************************************
1368HICON WIN32API CopyIcon( HICON arg1)
1369{
1370#ifdef DEBUG
1371 WriteLog("USER32: CopyIcon\n");
1372#endif
1373 return O32_CopyIcon(arg1);
1374}
1375//******************************************************************************
1376//******************************************************************************
1377int WIN32API CountClipboardFormats(void)
1378{
1379#ifdef DEBUG
1380 WriteLog("USER32: CountClipboardFormats\n");
1381#endif
1382 return O32_CountClipboardFormats();
1383}
1384//******************************************************************************
1385//******************************************************************************
1386HACCEL WIN32API CreateAcceleratorTableA( LPACCEL arg1, int arg2)
1387{
1388#ifdef DEBUG
1389 WriteLog("USER32: CreateAcceleratorTableA\n");
1390#endif
1391 return O32_CreateAcceleratorTable(arg1, arg2);
1392}
1393//******************************************************************************
1394//******************************************************************************
1395HACCEL WIN32API CreateAcceleratorTableW( LPACCEL arg1, int arg2)
1396{
1397#ifdef DEBUG
1398 WriteLog("USER32: CreateAcceleratorTableW\n");
1399#endif
1400 // NOTE: This will not work as is (needs UNICODE support)
1401 return O32_CreateAcceleratorTable(arg1, arg2);
1402}
1403//******************************************************************************
1404//******************************************************************************
1405BOOL WIN32API CreateCaret( HWND arg1, HBITMAP arg2, int arg3, int arg4)
1406{
1407#ifdef DEBUG
1408 WriteLog("USER32: CreateCaret\n");
1409#endif
1410 return O32_CreateCaret(arg1, arg2, arg3, arg4);
1411}
1412//******************************************************************************
1413//******************************************************************************
1414HCURSOR WIN32API CreateCursor( HINSTANCE arg1, int arg2, int arg3, int arg4, int arg5, const VOID * arg6, const VOID * arg7)
1415{
1416#ifdef DEBUG
1417 WriteLog("USER32: CreateCursor\n");
1418#endif
1419 return O32_CreateCursor(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
1420}
1421//******************************************************************************
1422//******************************************************************************
1423HICON WIN32API CreateIcon( HINSTANCE arg1, INT arg2, INT arg3, BYTE arg4, BYTE arg5, LPCVOID arg6, LPCVOID arg7)
1424{
1425#ifdef DEBUG
1426 WriteLog("USER32: CreateIcon\n");
1427#endif
1428 return O32_CreateIcon(arg1, arg2, arg3, arg4, arg5, (const BYTE *)arg6, (const BYTE *)arg7);
1429}
1430//******************************************************************************
1431//ASSERT dwVer == win31 (ok according to SDK docs)
1432//******************************************************************************
1433HICON WIN32API CreateIconFromResource(PBYTE presbits, UINT dwResSize,
1434 BOOL fIcon, DWORD dwVer)
1435{
1436 HICON hicon;
1437 DWORD OS2ResSize = 0;
1438 PBYTE OS2Icon = ConvertWin32Icon(presbits, dwResSize, &OS2ResSize);
1439
1440 hicon = O32_CreateIconFromResource(OS2Icon, OS2ResSize, fIcon, dwVer);
1441#ifdef DEBUG
1442 WriteLog("USER32: CreateIconFromResource returned %X (%X)\n", hicon, GetLastError());
1443#endif
1444 if(OS2Icon)
1445 FreeIcon(OS2Icon);
1446
1447 return(hicon);
1448}
1449//******************************************************************************
1450//******************************************************************************
1451HICON WIN32API CreateIconFromResourceEx(PBYTE presbits, UINT dwResSize,
1452 BOOL fIcon, DWORD dwVer,
1453 int cxDesired, int cyDesired,
1454 UINT Flags)
1455{
1456#ifdef DEBUG
1457 WriteLog("USER32: CreateIconFromResourceEx %X %d %d %X %d %d %X, not completely supported!\n", presbits, dwResSize, fIcon, dwVer, cxDesired, cyDesired, Flags);
1458#endif
1459 return CreateIconFromResource(presbits, dwResSize, fIcon, dwVer);
1460}
1461//******************************************************************************
1462//******************************************************************************
1463HICON WIN32API CreateIconIndirect(LPICONINFO arg1)
1464{
1465#ifdef DEBUG
1466 WriteLog("USER32: CreateIconIndirect\n");
1467#endif
1468 return O32_CreateIconIndirect(arg1);
1469}
1470//******************************************************************************
1471HWND WIN32API CreateMDIWindowA(LPCSTR arg1, LPCSTR arg2, DWORD arg3,
1472 int arg4, int arg5, int arg6, int arg7,
1473 HWND arg8, HINSTANCE arg9, LPARAM arg10)
1474{
1475 HWND hwnd;
1476
1477#ifdef DEBUG
1478 WriteLog("USER32: CreateMDIWindowA\n");
1479#endif
1480 Win32WindowProc *window = new Win32WindowProc(arg9, arg1);
1481 hwnd = O32_CreateMDIWindow((LPSTR)arg1, (LPSTR)arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
1482 //SvL: 16-11-'97: window can be already destroyed if hwnd == 0
1483 if(hwnd == 0 && window != 0 && Win32WindowProc::FindWindowProc(window)) {
1484 delete(window);
1485 window = 0;
1486 }
1487
1488#ifdef DEBUG
1489 WriteLog("USER32: CreateMDIWindowA returned %X\n", hwnd);
1490#endif
1491 return hwnd;
1492}
1493//******************************************************************************
1494//******************************************************************************
1495HWND WIN32API CreateMDIWindowW(LPCWSTR arg1, LPCWSTR arg2, DWORD arg3, int arg4,
1496 int arg5, int arg6, int arg7, HWND arg8, HINSTANCE arg9,
1497 LPARAM arg10)
1498{
1499 HWND hwnd;
1500 char *astring1 = NULL, *astring2 = NULL;
1501 Win32WindowProc *window = NULL;
1502
1503 if((int)arg1 >> 16 != 0) {
1504 astring1 = UnicodeToAsciiString((LPWSTR)arg1);
1505 }
1506 else astring1 = (char *)arg2;
1507
1508 astring2 = UnicodeToAsciiString((LPWSTR)arg2);
1509
1510 //Classname might be name of system class, in which case we don't
1511 //need to use our own callback
1512// if(Win32WindowClass::FindClass((LPSTR)astring1) != NULL) {
1513 window = new Win32WindowProc(arg9, astring1);
1514// }
1515 hwnd = O32_CreateMDIWindow(astring1, astring2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
1516 //SvL: 16-11-'97: window can be already destroyed if hwnd == 0
1517 if(hwnd == 0 && window != 0 && Win32WindowProc::FindWindowProc(window)) {
1518 delete(window);
1519 window = 0;
1520 }
1521 if(window) {
1522 window->SetWindowHandle(hwnd);
1523 }
1524
1525 if(astring1) FreeAsciiString(astring1);
1526 FreeAsciiString(astring2);
1527#ifdef DEBUG
1528 WriteLog("USER32: CreateMDIWindowW hwnd = %X\n", hwnd);
1529#endif
1530 return(hwnd);
1531}
1532//******************************************************************************
1533//******************************************************************************
1534HWND WIN32API CreateWindowExW(DWORD arg1,
1535 LPCWSTR arg2,
1536 LPCWSTR arg3,
1537 DWORD dwStyle,
1538 int arg5,
1539 int arg6,
1540 int arg7,
1541 int arg8,
1542 HWND arg9,
1543 HMENU arg10,
1544 HINSTANCE arg11,
1545 PVOID arg12)
1546{
1547 HWND hwnd;
1548 char *astring1 = NULL,
1549 *astring2 = NULL;
1550 Win32WindowProc *window = NULL;
1551
1552 /* @@@PH 98/06/21 changed to call OS2CreateWindowExA */
1553 if(HIWORD(arg2) != 0)
1554 astring1 = UnicodeToAsciiString((LPWSTR)arg2);
1555 else
1556 astring1 = (char *)arg2;
1557
1558 astring2 = UnicodeToAsciiString((LPWSTR)arg3);
1559
1560#ifdef DEBUG
1561 WriteLog("USER32: CreateWindowExW: dwExStyle = %X\n", arg1);
1562 if((int)arg2 >> 16 != 0)
1563 WriteLog("USER32: CreateWindow: classname = %s\n", astring1);
1564 else WriteLog("USER32: CreateWindow: classname = %X\n", arg2);
1565 WriteLog("USER32: CreateWindow: windowname= %s\n", astring2);
1566 WriteLog("USER32: CreateWindow: dwStyle = %X\n", dwStyle);
1567 WriteLog("USER32: CreateWindow: x = %d\n", arg5);
1568 WriteLog("USER32: CreateWindow: y = %d\n", arg6);
1569 WriteLog("USER32: CreateWindow: nWidth = %d\n", arg7);
1570 WriteLog("USER32: CreateWindow: nHeight = %d\n", arg8);
1571 WriteLog("USER32: CreateWindow: parent = %X\n", arg9);
1572 WriteLog("USER32: CreateWindow: hwmenu = %X\n", arg10);
1573 WriteLog("USER32: CreateWindow: hinstance = %X\n", arg11);
1574 WriteLog("USER32: CreateWindow: param = %X\n", arg12);
1575 #endif
1576
1577 hwnd = CreateWindowExA(arg1,
1578 astring1,
1579 astring2,
1580 dwStyle,
1581 arg5,
1582 arg6,
1583 arg7,
1584 arg8,
1585 arg9,
1586 arg10,
1587 arg11,
1588 arg12);
1589
1590 if(HIWORD(arg1) != 0)
1591 FreeAsciiString(astring1);
1592
1593 FreeAsciiString(astring2);
1594
1595#ifdef DEBUG
1596 WriteLog("USER32: ************CreateWindowExW hwnd = %X (%X)\n", hwnd, GetLastError());
1597#endif
1598 return(hwnd);
1599}
1600//******************************************************************************
1601//******************************************************************************
1602HDWP WIN32API DeferWindowPos( HDWP arg1, HWND arg2, HWND arg3, int arg4, int arg5, int arg6, int arg7, UINT arg8)
1603{
1604#ifdef DEBUG
1605 WriteLog("USER32: DeferWindowPos\n");
1606#endif
1607 return O32_DeferWindowPos(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
1608}
1609//******************************************************************************
1610//******************************************************************************
1611BOOL WIN32API DestroyAcceleratorTable( HACCEL arg1)
1612{
1613#ifdef DEBUG
1614 WriteLog("USER32: DestroyAcceleratorTable\n");
1615#endif
1616 return O32_DestroyAcceleratorTable(arg1);
1617}
1618//******************************************************************************
1619//******************************************************************************
1620BOOL WIN32API DestroyCaret(void)
1621{
1622#ifdef DEBUG
1623 WriteLog("USER32: DestroyCaret\n");
1624#endif
1625 return O32_DestroyCaret();
1626}
1627//******************************************************************************
1628//******************************************************************************
1629BOOL WIN32API DestroyCursor( HCURSOR arg1)
1630{
1631#ifdef DEBUG
1632 WriteLog("USER32: DestroyCursor\n");
1633#endif
1634 return O32_DestroyCursor(arg1);
1635}
1636//******************************************************************************
1637//******************************************************************************
1638BOOL WIN32API DestroyIcon( HICON arg1)
1639{
1640#ifdef DEBUG
1641 WriteLog("USER32: DestroyIcon\n");
1642#endif
1643 return O32_DestroyIcon(arg1);
1644}
1645//******************************************************************************
1646//******************************************************************************
1647LONG WIN32API DispatchMessageW( const MSG * arg1)
1648{
1649#ifdef DEBUG
1650 WriteLog("USER32: DispatchMessageW\n");
1651#endif
1652 // NOTE: This will not work as is (needs UNICODE support)
1653 return O32_DispatchMessage(arg1);
1654}
1655//******************************************************************************
1656//******************************************************************************
1657int WIN32API DlgDirListA( HWND arg1, LPSTR arg2, int arg3, int arg4, UINT arg5)
1658{
1659#ifdef DEBUG
1660 WriteLog("USER32: DlgDirListA\n");
1661#endif
1662 return O32_DlgDirList(arg1, arg2, arg3, arg4, arg5);
1663}
1664//******************************************************************************
1665//******************************************************************************
1666int WIN32API DlgDirListComboBoxA( HWND arg1, LPSTR arg2, int arg3, int arg4, UINT arg5)
1667{
1668#ifdef DEBUG
1669 WriteLog("USER32: DlgDirListComboBoxA\n");
1670#endif
1671 return O32_DlgDirListComboBox(arg1, arg2, arg3, arg4, arg5);
1672}
1673//******************************************************************************
1674//******************************************************************************
1675int WIN32API DlgDirListComboBoxW( HWND arg1, LPWSTR arg2, int arg3, int arg4, UINT arg5)
1676{
1677#ifdef DEBUG
1678 WriteLog("USER32: DlgDirListComboBoxW NOT WORKING\n");
1679#endif
1680 // NOTE: This will not work as is (needs UNICODE support)
1681 return 0;
1682// return O32_DlgDirListComboBox(arg1, arg2, arg3, arg4, arg5);
1683}
1684//******************************************************************************
1685//******************************************************************************
1686int WIN32API DlgDirListW( HWND arg1, LPWSTR arg2, int arg3, int arg4, UINT arg5)
1687{
1688#ifdef DEBUG
1689 WriteLog("USER32: DlgDirListW NOT WORKING\n");
1690#endif
1691 // NOTE: This will not work as is (needs UNICODE support)
1692 return 0;
1693// return O32_DlgDirList(arg1, arg2, arg3, arg4, arg5);
1694}
1695//******************************************************************************
1696//******************************************************************************
1697BOOL WIN32API DlgDirSelectComboBoxExA( HWND arg1, LPSTR arg2, int arg3, int arg4)
1698{
1699#ifdef DEBUG
1700 WriteLog("USER32: DlgDirSelectComboBoxExA\n");
1701#endif
1702 return O32_DlgDirSelectComboBoxEx(arg1, arg2, arg3, arg4);
1703}
1704//******************************************************************************
1705//******************************************************************************
1706BOOL WIN32API DlgDirSelectComboBoxExW( HWND arg1, LPWSTR arg2, int arg3, int arg4)
1707{
1708#ifdef DEBUG
1709 WriteLog("USER32: DlgDirSelectComboBoxExW NOT WORKING\n");
1710#endif
1711 // NOTE: This will not work as is (needs UNICODE support)
1712 return 0;
1713// return O32_DlgDirSelectComboBoxEx(arg1, arg2, arg3, arg4);
1714}
1715//******************************************************************************
1716//******************************************************************************
1717BOOL WIN32API DlgDirSelectExA( HWND arg1, LPSTR arg2, int arg3, int arg4)
1718{
1719#ifdef DEBUG
1720 WriteLog("USER32: DlgDirSelectExA\n");
1721#endif
1722 return O32_DlgDirSelectEx(arg1, arg2, arg3, arg4);
1723}
1724//******************************************************************************
1725//******************************************************************************
1726BOOL WIN32API DlgDirSelectExW( HWND arg1, LPWSTR arg2, int arg3, int arg4)
1727{
1728#ifdef DEBUG
1729 WriteLog("USER32: DlgDirSelectExW NOT WORKING\n");
1730#endif
1731 // NOTE: This will not work as is (needs UNICODE support)
1732 return 0;
1733// return O32_DlgDirSelectEx(arg1, arg2, arg3, arg4);
1734}
1735//******************************************************************************
1736//******************************************************************************
1737BOOL WIN32API DrawFocusRect( HDC arg1, const RECT * arg2)
1738{
1739#ifdef DEBUG
1740 WriteLog("USER32: DrawFocusRect\n");
1741#endif
1742 return O32_DrawFocusRect(arg1, arg2);
1743}
1744//******************************************************************************
1745//******************************************************************************
1746BOOL WIN32API DrawIcon( HDC arg1, int arg2, int arg3, HICON arg4)
1747{
1748#ifdef DEBUG
1749 WriteLog("USER32: DrawIcon\n");
1750#endif
1751 return O32_DrawIcon(arg1, arg2, arg3, arg4);
1752}
1753//******************************************************************************
1754//******************************************************************************
1755BOOL WIN32API DrawIconEx(HDC hdc, int xLeft, int xRight, HICON hIcon,
1756 int cxWidth, int cyWidth, UINT istepIfAniCur,
1757 HBRUSH hbrFlickerFreeDraw, UINT diFlags)
1758{
1759#ifdef DEBUG
1760 WriteLog("USER32: DrawIcon, partially implemented\n");
1761#endif
1762 return O32_DrawIcon(hdc, xLeft, xRight, hIcon);
1763}
1764//******************************************************************************
1765//******************************************************************************
1766BOOL WIN32API DrawMenuBar( HWND arg1)
1767{
1768#ifdef DEBUG
1769 WriteLog("USER32: DrawMenuBar\n");
1770#endif
1771 return O32_DrawMenuBar(arg1);
1772}
1773//******************************************************************************
1774//******************************************************************************
1775int WIN32API DrawTextW( HDC arg1, LPCWSTR arg2, int arg3, PRECT arg4, UINT arg5)
1776{
1777 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
1778 int rc;
1779
1780#ifdef DEBUG
1781 WriteLog("USER32: DrawTextW %s\n", astring);
1782#endif
1783 rc = O32_DrawText(arg1, astring, arg3, arg4, arg5);
1784 FreeAsciiString(astring);
1785 return(rc);
1786}
1787//******************************************************************************
1788//******************************************************************************
1789BOOL WIN32API EmptyClipboard(void)
1790{
1791#ifdef DEBUG
1792 WriteLog("USER32: EmptyClipboard\n");
1793#endif
1794 return O32_EmptyClipboard();
1795}
1796//******************************************************************************
1797//******************************************************************************
1798BOOL WIN32API EndDeferWindowPos( HDWP arg1)
1799{
1800#ifdef DEBUG
1801 WriteLog("USER32: EndDeferWindowPos\n");
1802#endif
1803 return O32_EndDeferWindowPos(arg1);
1804}
1805//******************************************************************************
1806//******************************************************************************
1807BOOL WIN32API EnumChildWindows(HWND hwnd, WNDENUMPROC lpfn, LPARAM lParam)
1808{
1809 BOOL rc;
1810 EnumWindowCallback *callback = new EnumWindowCallback(lpfn, lParam);
1811
1812#ifdef DEBUG
1813 WriteLog("USER32: EnumChildWindows\n");
1814#endif
1815 rc = O32_EnumChildWindows(hwnd, callback->GetOS2Callback(), (LPARAM)callback);
1816 if(callback)
1817 delete callback;
1818 return(rc);
1819}
1820//******************************************************************************
1821//******************************************************************************
1822UINT WIN32API EnumClipboardFormats(UINT arg1)
1823{
1824#ifdef DEBUG
1825 WriteLog("USER32: EnumClipboardFormats\n");
1826#endif
1827 return O32_EnumClipboardFormats(arg1);
1828}
1829//******************************************************************************
1830//******************************************************************************
1831int WIN32API EnumPropsA(HWND arg1, PROPENUMPROCA arg2)
1832{
1833#ifdef DEBUG
1834 WriteLog("USER32: EnumPropsA DOES NOT WORK\n");
1835#endif
1836 //calling convention problems
1837 return 0;
1838// return O32_EnumProps(arg1, (PROPENUMPROC_O32)arg2);
1839}
1840//******************************************************************************
1841//******************************************************************************
1842int WIN32API EnumPropsExA( HWND arg1, PROPENUMPROCEXA arg2, LPARAM arg3)
1843{
1844#ifdef DEBUG
1845 WriteLog("USER32: EnumPropsExA DOES NOT WORK\n");
1846#endif
1847 //calling convention problems
1848 return 0;
1849// return O32_EnumPropsEx(arg1, arg2, (PROPENUMPROCEX_O32)arg3);
1850}
1851//******************************************************************************
1852//******************************************************************************
1853int WIN32API EnumPropsExW( HWND arg1, PROPENUMPROCEXW arg2, LPARAM arg3)
1854{
1855#ifdef DEBUG
1856 WriteLog("USER32: EnumPropsExW\n");
1857#endif
1858 // NOTE: This will not work as is (needs UNICODE support)
1859 //calling convention problems
1860 return 0;
1861// return O32_EnumPropsEx(arg1, arg2, arg3);
1862}
1863//******************************************************************************
1864//******************************************************************************
1865int WIN32API EnumPropsW( HWND arg1, PROPENUMPROCW arg2)
1866{
1867#ifdef DEBUG
1868 WriteLog("USER32: EnumPropsW\n");
1869#endif
1870 // NOTE: This will not work as is (needs UNICODE support)
1871 //calling convention problems
1872 return 0;
1873// return O32_EnumProps(arg1, arg2);
1874}
1875//******************************************************************************
1876//******************************************************************************
1877BOOL WIN32API EnumWindows(WNDENUMPROC lpfn, LPARAM lParam)
1878{
1879 BOOL rc;
1880 EnumWindowCallback *callback = new EnumWindowCallback(lpfn, lParam);
1881
1882#ifdef DEBUG
1883 WriteLog("USER32: EnumWindows\n");
1884#endif
1885 rc = O32_EnumWindows(callback->GetOS2Callback(), (LPARAM)callback);
1886 if(callback)
1887 delete callback;
1888 return(rc);
1889}
1890//******************************************************************************
1891//******************************************************************************
1892BOOL WIN32API EqualRect( const RECT * arg1, const RECT * arg2)
1893{
1894#ifdef DEBUG
1895 WriteLog("USER32: EqualRect\n");
1896#endif
1897 return O32_EqualRect(arg1, arg2);
1898}
1899//******************************************************************************
1900//******************************************************************************
1901BOOL WIN32API ExcludeUpdateRgn( HDC arg1, HWND arg2)
1902{
1903#ifdef DEBUG
1904 WriteLog("USER32: ExcludeUpdateRgn\n");
1905#endif
1906 return O32_ExcludeUpdateRgn(arg1, arg2);
1907}
1908//******************************************************************************
1909//******************************************************************************
1910BOOL WIN32API ExitWindowsEx( UINT arg1, DWORD arg2)
1911{
1912#ifdef DEBUG
1913 WriteLog("USER32: ExitWindowsEx\n");
1914#endif
1915 return O32_ExitWindowsEx(arg1, arg2);
1916}
1917//******************************************************************************
1918//******************************************************************************
1919int WIN32API FillRect(HDC arg1, const RECT * arg2, HBRUSH arg3)
1920{
1921#ifdef DEBUG
1922 WriteLog("USER32: FillRect (%d,%d)(%d,%d) brush %X\n", arg2->left, arg2->top, arg2->right, arg2->bottom, arg3);
1923#endif
1924 return O32_FillRect(arg1, arg2, arg3);
1925}
1926//******************************************************************************
1927//******************************************************************************
1928HWND WIN32API FindWindowW( LPCWSTR arg1, LPCWSTR arg2)
1929{
1930 char *astring1 = UnicodeToAsciiString((LPWSTR)arg1);
1931 char *astring2 = UnicodeToAsciiString((LPWSTR)arg2);
1932 HWND rc;
1933
1934#ifdef DEBUG
1935 WriteLog("USER32: FindWindowW\n");
1936#endif
1937 rc = O32_FindWindow(astring1, astring2);
1938 FreeAsciiString(astring1);
1939 FreeAsciiString(astring2);
1940 return rc;
1941}
1942//******************************************************************************
1943//******************************************************************************
1944int WIN32API FrameRect( HDC arg1, const RECT * arg2, HBRUSH arg3)
1945{
1946#ifdef DEBUG
1947 WriteLog("USER32: FrameRect\n");
1948#endif
1949 return O32_FrameRect(arg1, arg2, arg3);
1950}
1951//******************************************************************************
1952//******************************************************************************
1953HWND WIN32API GetCapture(void)
1954{
1955#ifdef DEBUG
1956 WriteLog("USER32: GetCapture\n");
1957#endif
1958 return O32_GetCapture();
1959}
1960//******************************************************************************
1961//******************************************************************************
1962UINT WIN32API GetCaretBlinkTime(void)
1963{
1964#ifdef DEBUG
1965 WriteLog("USER32: GetCaretBlinkTime\n");
1966#endif
1967 return O32_GetCaretBlinkTime();
1968}
1969//******************************************************************************
1970//******************************************************************************
1971BOOL WIN32API GetCaretPos( PPOINT arg1)
1972{
1973#ifdef DEBUG
1974 WriteLog("USER32: GetCaretPos\n");
1975#endif
1976 return O32_GetCaretPos(arg1);
1977}
1978//******************************************************************************
1979//******************************************************************************
1980BOOL WIN32API GetClipCursor( PRECT arg1)
1981{
1982#ifdef DEBUG
1983 WriteLog("USER32: GetClipCursor\n");
1984#endif
1985 return O32_GetClipCursor(arg1);
1986}
1987//******************************************************************************
1988//******************************************************************************
1989HANDLE WIN32API GetClipboardData( UINT arg1)
1990{
1991#ifdef DEBUG
1992 WriteLog("USER32: GetClipboardData\n");
1993#endif
1994 return O32_GetClipboardData(arg1);
1995}
1996//******************************************************************************
1997//******************************************************************************
1998int WIN32API GetClipboardFormatNameA( UINT arg1, LPSTR arg2, int arg3)
1999{
2000#ifdef DEBUG
2001 WriteLog("USER32: GetClipboardFormatNameA %s\n", arg2);
2002#endif
2003 return O32_GetClipboardFormatName(arg1, arg2, arg3);
2004}
2005//******************************************************************************
2006//******************************************************************************
2007int WIN32API GetClipboardFormatNameW(UINT arg1, LPWSTR arg2, int arg3)
2008{
2009 int rc;
2010 char *astring = UnicodeToAsciiString(arg2);
2011
2012#ifdef DEBUG
2013 WriteLog("USER32: GetClipboardFormatNameW %s\n", astring);
2014#endif
2015 rc = O32_GetClipboardFormatName(arg1, astring, arg3);
2016 FreeAsciiString(astring);
2017 return(rc);
2018}
2019//******************************************************************************
2020//******************************************************************************
2021HWND WIN32API GetClipboardOwner(void)
2022{
2023#ifdef DEBUG
2024 WriteLog("USER32: GetClipboardOwner\n");
2025#endif
2026 return O32_GetClipboardOwner();
2027}
2028//******************************************************************************
2029//******************************************************************************
2030HWND WIN32API GetClipboardViewer(void)
2031{
2032#ifdef DEBUG
2033 WriteLog("USER32: GetClipboardViewer\n");
2034#endif
2035 return O32_GetClipboardViewer();
2036}
2037//******************************************************************************
2038//******************************************************************************
2039DWORD WIN32API GetDialogBaseUnits(void)
2040{
2041#ifdef DEBUG
2042 WriteLog("USER32: GetDialogBaseUnits\n");
2043#endif
2044 return O32_GetDialogBaseUnits();
2045}
2046//******************************************************************************
2047//******************************************************************************
2048UINT WIN32API GetDlgItemInt( HWND arg1, int arg2, PBOOL arg3, BOOL arg4)
2049{
2050#ifdef DEBUG
2051 WriteLog("USER32: GetDlgItemInt\n");
2052#endif
2053 return O32_GetDlgItemInt(arg1, arg2, arg3, arg4);
2054}
2055
2056
2057/*****************************************************************************
2058 * Name : UINT WIN32API GetDlgItemTextW
2059 * Purpose : Determine the text of a window control
2060 * Parameters: HWND arg1
2061 * int arg2
2062 * LPWSTR arg3
2063 * UINT arg4
2064 * Variables :
2065 * Result :
2066 * Remark :
2067 * Status : UNTESTED UNKNOWN STUB
2068 *
2069 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2070 *****************************************************************************/
2071
2072UINT WIN32API GetDlgItemTextW(HWND arg1,
2073 int arg2,
2074 LPWSTR arg3,
2075 UINT arg4)
2076{
2077 LPSTR lpBuffer; /* temporary buffer for the ascii result */
2078 UINT uiResult; /* return value of the ascii variant */
2079
2080 dprintf(("USER32: GetDlgItemTextW(%08xh,%08xh,%08xh,%08xh)\n",
2081 arg1,
2082 arg2,
2083 arg3,
2084 arg4));
2085
2086
2087 lpBuffer = (LPSTR)malloc(arg4); /* allocate temporary buffer */
2088 uiResult = GetDlgItemTextA(arg1, /* call ascii variant */
2089 arg2,
2090 lpBuffer,
2091 arg4);
2092
2093 AsciiToUnicodeN(lpBuffer, /* now convert result to unicode */
2094 arg3,
2095 arg4);
2096
2097 free(lpBuffer); /* free the temporary buffer */
2098
2099 return (uiResult); /* OK, that's it */
2100}
2101
2102
2103//******************************************************************************
2104//******************************************************************************
2105UINT WIN32API GetDoubleClickTime(void)
2106{
2107#ifdef DEBUG
2108 WriteLog("USER32: GetDoubleClickTime\n");
2109#endif
2110 return O32_GetDoubleClickTime();
2111}
2112//******************************************************************************
2113//******************************************************************************
2114HWND WIN32API GetForegroundWindow(void)
2115{
2116#ifdef DEBUG
2117 WriteLog("USER32: GetForegroundWindow\n");
2118#endif
2119 return O32_GetForegroundWindow();
2120}
2121//******************************************************************************
2122//******************************************************************************
2123BOOL WIN32API GetIconInfo( HICON arg1, LPICONINFO arg2)
2124{
2125#ifdef DEBUG
2126 WriteLog("USER32: GetIconInfo\n");
2127#endif
2128 return O32_GetIconInfo(arg1, arg2);
2129}
2130//******************************************************************************
2131//******************************************************************************
2132int WIN32API GetKeyNameTextA( LPARAM arg1, LPSTR arg2, int arg3)
2133{
2134#ifdef DEBUG
2135 WriteLog("USER32: GetKeyNameTextA\n");
2136#endif
2137 return O32_GetKeyNameText(arg1, arg2, arg3);
2138}
2139//******************************************************************************
2140//******************************************************************************
2141int WIN32API GetKeyNameTextW( LPARAM arg1, LPWSTR arg2, int arg3)
2142{
2143#ifdef DEBUG
2144 WriteLog("USER32: GetKeyNameTextW DOES NOT WORK\n");
2145#endif
2146 // NOTE: This will not work as is (needs UNICODE support)
2147 return 0;
2148// return O32_GetKeyNameText(arg1, arg2, arg3);
2149}
2150//******************************************************************************
2151//******************************************************************************
2152int WIN32API GetKeyboardType( int arg1)
2153{
2154#ifdef DEBUG
2155 WriteLog("USER32: GetKeyboardType\n");
2156#endif
2157 return O32_GetKeyboardType(arg1);
2158}
2159//******************************************************************************
2160//******************************************************************************
2161HWND WIN32API GetLastActivePopup( HWND arg1)
2162{
2163#ifdef DEBUG
2164 WriteLog("USER32: GetLastActivePopup\n");
2165#endif
2166 return O32_GetLastActivePopup(arg1);
2167}
2168//******************************************************************************
2169//******************************************************************************
2170LONG WIN32API GetMessageExtraInfo(void)
2171{
2172 dprintf(("USER32: GetMessageExtraInfo\n"));
2173 return O32_GetMessageExtraInfo();
2174}
2175//******************************************************************************
2176//******************************************************************************
2177DWORD WIN32API GetMessagePos(void)
2178{
2179 dprintf(("USER32: GetMessagePos\n"));
2180 return O32_GetMessagePos();
2181}
2182//******************************************************************************
2183//******************************************************************************
2184LONG WIN32API GetMessageTime(void)
2185{
2186 dprintf(("USER32: GetMessageTime\n"));
2187 return O32_GetMessageTime();
2188}
2189//******************************************************************************
2190//******************************************************************************
2191BOOL WIN32API GetMessageW(LPMSG arg1, HWND arg2, UINT arg3, UINT arg4)
2192{
2193 BOOL rc;
2194
2195 // NOTE: This will not work as is (needs UNICODE support)
2196 rc = O32_GetMessage(arg1, arg2, arg3, arg4);
2197 dprintf(("USER32: GetMessageW %X returned %d\n", arg2, rc));
2198 return(rc);
2199}
2200//******************************************************************************
2201//******************************************************************************
2202HWND WIN32API GetNextDlgGroupItem( HWND arg1, HWND arg2, BOOL arg3)
2203{
2204#ifdef DEBUG
2205 WriteLog("USER32: GetNextDlgGroupItem\n");
2206#endif
2207 return O32_GetNextDlgGroupItem(arg1, arg2, arg3);
2208}
2209//******************************************************************************
2210//******************************************************************************
2211HWND WIN32API GetOpenClipboardWindow(void)
2212{
2213#ifdef DEBUG
2214 WriteLog("USER32: GetOpenClipboardWindow\n");
2215#endif
2216 return O32_GetOpenClipboardWindow();
2217}
2218//******************************************************************************
2219//******************************************************************************
2220HWND WIN32API GetParent( HWND arg1)
2221{
2222#ifdef DEBUG
2223//// WriteLog("USER32: GetParent\n");
2224#endif
2225 return O32_GetParent(arg1);
2226}
2227//******************************************************************************
2228//******************************************************************************
2229int WIN32API GetPriorityClipboardFormat( PUINT arg1, int arg2)
2230{
2231#ifdef DEBUG
2232 WriteLog("USER32: GetPriorityClipboardFormat\n");
2233#endif
2234 return O32_GetPriorityClipboardFormat(arg1, arg2);
2235}
2236//******************************************************************************
2237//******************************************************************************
2238HANDLE WIN32API GetPropA( HWND arg1, LPCSTR arg2)
2239{
2240#ifdef DEBUG
2241 if((int)arg2 >> 16 != 0)
2242 WriteLog("USER32: GetPropA %s\n", arg2);
2243 else WriteLog("USER32: GetPropA %X\n", arg2);
2244#endif
2245 return O32_GetProp(arg1, arg2);
2246}
2247//******************************************************************************
2248//******************************************************************************
2249HANDLE WIN32API GetPropW(HWND arg1, LPCWSTR arg2)
2250{
2251 BOOL handle;
2252 char *astring;
2253
2254 if((int)arg2 >> 16 != 0)
2255 astring = UnicodeToAsciiString((LPWSTR)arg2);
2256 else astring = (char *)arg2;
2257#ifdef DEBUG
2258 if((int)arg2 >> 16 != 0)
2259 WriteLog("USER32: GetPropW %s\n", astring);
2260 else WriteLog("USER32: GetPropW %X\n", astring);
2261#endif
2262 handle = GetPropA(arg1, (LPCSTR)astring);
2263 if((int)arg2 >> 16 != 0)
2264 FreeAsciiString(astring);
2265
2266 return(handle);
2267}
2268//******************************************************************************
2269//******************************************************************************
2270DWORD WIN32API GetQueueStatus( UINT arg1)
2271{
2272#ifdef DEBUG
2273 WriteLog("USER32: GetQueueStatus\n");
2274#endif
2275 return O32_GetQueueStatus(arg1);
2276}
2277//******************************************************************************
2278//******************************************************************************
2279int WIN32API GetScrollPos(HWND hwnd, int fnBar)
2280{
2281 int pos;
2282
2283 pos = O32_GetScrollPos(hwnd, fnBar);
2284#ifdef DEBUG
2285 WriteLog("USER32: GetScrollPos of %X type %d returned %d\n", hwnd, fnBar, pos);
2286#endif
2287 return(pos);
2288}
2289//******************************************************************************
2290//******************************************************************************
2291BOOL WIN32API GetScrollRange( HWND arg1, int arg2, int * arg3, int * arg4)
2292{
2293#ifdef DEBUG
2294 WriteLog("USER32: GetScrollRange\n");
2295#endif
2296 return O32_GetScrollRange(arg1, arg2, arg3, arg4);
2297}
2298//******************************************************************************
2299//******************************************************************************
2300DWORD WIN32API GetTabbedTextExtentA( HDC arg1, LPCSTR arg2, int arg3, int arg4, int * arg5)
2301{
2302#ifdef DEBUG
2303 WriteLog("USER32: GetTabbedTextExtentA\n");
2304#endif
2305 return O32_GetTabbedTextExtent(arg1, arg2, arg3, arg4, arg5);
2306}
2307//******************************************************************************
2308//******************************************************************************
2309DWORD WIN32API GetTabbedTextExtentW( HDC arg1, LPCWSTR arg2, int arg3, int arg4, int * arg5)
2310{
2311 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
2312 DWORD rc;
2313
2314#ifdef DEBUG
2315 WriteLog("USER32: GetTabbedTextExtentW\n");
2316#endif
2317 rc = O32_GetTabbedTextExtent(arg1, astring, arg3, arg4, arg5);
2318 FreeAsciiString(astring);
2319 return rc;
2320}
2321//******************************************************************************
2322//******************************************************************************
2323HWND WIN32API GetTopWindow( HWND arg1)
2324{
2325#ifdef DEBUG
2326//// WriteLog("USER32: GetTopWindow\n");
2327#endif
2328 return O32_GetTopWindow(arg1);
2329}
2330//******************************************************************************
2331//******************************************************************************
2332int WIN32API GetUpdateRgn( HWND arg1, HRGN arg2, BOOL arg3)
2333{
2334#ifdef DEBUG
2335 WriteLog("USER32: GetUpdateRgn\n");
2336#endif
2337 return O32_GetUpdateRgn(arg1, arg2, arg3);
2338}
2339//******************************************************************************
2340//******************************************************************************
2341BOOL WIN32API GetWindowPlacement( HWND arg1, LPWINDOWPLACEMENT arg2)
2342{
2343#ifdef DEBUG
2344 WriteLog("USER32: GetWindowPlacement\n");
2345#endif
2346 return O32_GetWindowPlacement(arg1, arg2);
2347}
2348//******************************************************************************
2349
2350/***********************************************************************
2351 * GetInternalWindowPos (USER32.245)
2352 */
2353UINT WIN32API GetInternalWindowPos(HWND hwnd,
2354 LPRECT rectWnd,
2355 LPPOINT ptIcon )
2356{
2357 WINDOWPLACEMENT wndpl;
2358
2359 dprintf(("USER32: GetInternalWindowPos(%08xh,%08xh,%08xh)\n",
2360 hwnd,
2361 rectWnd,
2362 ptIcon));
2363
2364 if (O32_GetWindowPlacement( hwnd, &wndpl ))
2365 {
2366 if (rectWnd) *rectWnd = wndpl.rcNormalPosition;
2367 if (ptIcon) *ptIcon = wndpl.ptMinPosition;
2368 return wndpl.showCmd;
2369 }
2370 return 0;
2371}
2372
2373
2374//******************************************************************************
2375int WIN32API GetWindowTextLengthW( HWND arg1)
2376{
2377#ifdef DEBUG
2378 WriteLog("USER32: GetWindowTextLengthW\n");
2379#endif
2380 return O32_GetWindowTextLength(arg1);
2381}
2382//******************************************************************************
2383//******************************************************************************
2384int WIN32API GetWindowTextW(HWND hwnd, LPWSTR lpsz, int cch)
2385{
2386 char title[128];
2387 int rc;
2388
2389 rc = O32_GetWindowText(hwnd, title, sizeof(title));
2390#ifdef DEBUG
2391 WriteLog("USER32: GetWindowTextW returned %s\n", title);
2392#endif
2393 if(rc > cch) {
2394 title[cch-1] = 0;
2395 rc = cch;
2396 }
2397 AsciiToUnicode(title, lpsz);
2398 return(rc);
2399}
2400//******************************************************************************
2401//******************************************************************************
2402DWORD WIN32API GetWindowThreadProcessId(HWND arg1, PDWORD arg2)
2403{
2404#ifdef DEBUG
2405 WriteLog("USER32: GetWindowThreadProcessId\n");
2406#endif
2407 return O32_GetWindowThreadProcessId(arg1, arg2);
2408}
2409//******************************************************************************
2410//******************************************************************************
2411BOOL WIN32API HideCaret( HWND arg1)
2412{
2413#ifdef DEBUG
2414 WriteLog("USER32: HideCaret\n");
2415#endif
2416 return O32_HideCaret(arg1);
2417}
2418//******************************************************************************
2419//******************************************************************************
2420BOOL WIN32API InSendMessage(void)
2421{
2422#ifdef DEBUG
2423 WriteLog("USER32: InSendMessage\n");
2424#endif
2425 return O32_InSendMessage();
2426}
2427//******************************************************************************
2428//******************************************************************************
2429BOOL WIN32API IntersectRect( PRECT arg1, const RECT * arg2, const RECT * arg3)
2430{
2431#ifdef DEBUG
2432//// WriteLog("USER32: IntersectRect\n");
2433#endif
2434 return O32_IntersectRect(arg1, arg2, arg3);
2435}
2436//******************************************************************************
2437//******************************************************************************
2438BOOL WIN32API InvalidateRgn( HWND arg1, HRGN arg2, BOOL arg3)
2439{
2440#ifdef DEBUG
2441 WriteLog("USER32: InvalidateRgn\n");
2442#endif
2443 return O32_InvalidateRgn(arg1, arg2, arg3);
2444}
2445//******************************************************************************
2446//******************************************************************************
2447BOOL WIN32API InvertRect( HDC arg1, const RECT * arg2)
2448{
2449#ifdef DEBUG
2450 WriteLog("USER32: InvertRect\n");
2451#endif
2452 return O32_InvertRect(arg1, arg2);
2453}
2454//******************************************************************************
2455//******************************************************************************
2456BOOL WIN32API IsChild( HWND arg1, HWND arg2)
2457{
2458#ifdef DEBUG
2459 WriteLog("USER32: IsChild\n");
2460#endif
2461 return O32_IsChild(arg1, arg2);
2462}
2463//******************************************************************************
2464//******************************************************************************
2465BOOL WIN32API IsClipboardFormatAvailable( UINT arg1)
2466{
2467#ifdef DEBUG
2468 WriteLog("USER32: IsClipboardFormatAvailable\n");
2469#endif
2470 return O32_IsClipboardFormatAvailable(arg1);
2471}
2472//******************************************************************************
2473//******************************************************************************
2474BOOL WIN32API IsDialogMessageW( HWND arg1, LPMSG arg2)
2475{
2476#ifdef DEBUG
2477 WriteLog("USER32: IsDialogMessageW\n");
2478#endif
2479 // NOTE: This will not work as is (needs UNICODE support)
2480 return O32_IsDialogMessage(arg1, arg2);
2481}
2482
2483//******************************************************************************
2484//******************************************************************************
2485BOOL WIN32API IsRectEmpty( const RECT * arg1)
2486{
2487#ifdef DEBUG
2488 WriteLog("USER32: IsRectEmpty\n");
2489#endif
2490 return O32_IsRectEmpty(arg1);
2491}
2492//******************************************************************************
2493//******************************************************************************
2494BOOL WIN32API IsWindow( HWND arg1)
2495{
2496#ifdef DEBUG
2497 WriteLog("USER32: IsWindow\n");
2498#endif
2499 return O32_IsWindow(arg1);
2500}
2501//******************************************************************************
2502//******************************************************************************
2503BOOL WIN32API IsWindowEnabled( HWND arg1)
2504{
2505#ifdef DEBUG
2506 WriteLog("USER32: IsWindowEnabled\n");
2507#endif
2508 return O32_IsWindowEnabled(arg1);
2509}
2510//******************************************************************************
2511//******************************************************************************
2512BOOL WIN32API IsWindowVisible( HWND arg1)
2513{
2514#ifdef DEBUG
2515 WriteLog("USER32: IsWindowVisible\n");
2516#endif
2517 return O32_IsWindowVisible(arg1);
2518}
2519//******************************************************************************
2520//******************************************************************************
2521BOOL WIN32API IsZoomed( HWND arg1)
2522{
2523#ifdef DEBUG
2524 WriteLog("USER32: IsZoomed\n");
2525#endif
2526 return O32_IsZoomed(arg1);
2527}
2528//******************************************************************************
2529//******************************************************************************
2530BOOL WIN32API LockWindowUpdate( HWND arg1)
2531{
2532#ifdef DEBUG
2533 WriteLog("USER32: LockWindowUpdate\n");
2534#endif
2535 return O32_LockWindowUpdate(arg1);
2536}
2537//******************************************************************************
2538//******************************************************************************
2539BOOL WIN32API MapDialogRect( HWND arg1, PRECT arg2)
2540{
2541#ifdef DEBUG
2542 WriteLog("USER32: MapDialogRect\n");
2543#endif
2544 return O32_MapDialogRect(arg1, arg2);
2545}
2546//******************************************************************************
2547//******************************************************************************
2548UINT WIN32API MapVirtualKeyA( UINT arg1, UINT arg2)
2549{
2550#ifdef DEBUG
2551 WriteLog("USER32: MapVirtualKeyA\n");
2552#endif
2553 return O32_MapVirtualKey(arg1, arg2);
2554}
2555//******************************************************************************
2556//******************************************************************************
2557UINT WIN32API MapVirtualKeyW( UINT arg1, UINT arg2)
2558{
2559#ifdef DEBUG
2560 WriteLog("USER32: MapVirtualKeyW\n");
2561#endif
2562 // NOTE: This will not work as is (needs UNICODE support)
2563 return O32_MapVirtualKey(arg1, arg2);
2564}
2565//******************************************************************************
2566//******************************************************************************
2567int WIN32API MapWindowPoints( HWND arg1, HWND arg2, LPPOINT arg3, UINT arg4)
2568{
2569#ifdef DEBUG
2570 WriteLog("USER32: MapWindowPoints\n");
2571#endif
2572 return O32_MapWindowPoints(arg1, arg2, arg3, arg4);
2573}
2574//******************************************************************************
2575//******************************************************************************
2576int WIN32API MessageBoxW(HWND arg1, LPCWSTR arg2, LPCWSTR arg3, UINT arg4)
2577{
2578 char *astring1, *astring2;
2579 int rc;
2580
2581 astring1 = UnicodeToAsciiString((LPWSTR)arg2);
2582 astring2 = UnicodeToAsciiString((LPWSTR)arg3);
2583#ifdef DEBUG
2584 WriteLog("USER32: MessageBoxW %s %s\n", astring1, astring2);
2585#endif
2586 rc = O32_MessageBox(arg1, astring1, astring2, arg4);
2587 FreeAsciiString(astring1);
2588 FreeAsciiString(astring2);
2589 return(rc);
2590}
2591//******************************************************************************
2592//******************************************************************************
2593BOOL WIN32API OpenClipboard( HWND arg1)
2594{
2595#ifdef DEBUG
2596 WriteLog("USER32: OpenClipboard\n");
2597#endif
2598 return O32_OpenClipboard(arg1);
2599}
2600//******************************************************************************
2601//******************************************************************************
2602BOOL WIN32API PeekMessageW( LPMSG arg1, HWND arg2, UINT arg3, UINT arg4, UINT arg5)
2603{
2604#ifdef DEBUG
2605 WriteLog("USER32: PeekMessageW\n");
2606#endif
2607 // NOTE: This will not work as is (needs UNICODE support)
2608 return O32_PeekMessage(arg1, arg2, arg3, arg4, arg5);
2609}
2610//******************************************************************************
2611//******************************************************************************
2612// NOTE: Open32 function doesn't have the 'W'.
2613BOOL WIN32API PostMessageW( HWND arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
2614{
2615#ifdef DEBUG
2616 WriteLog("USER32: PostMessageW\n");
2617#endif
2618 // NOTE: This will not work as is (needs UNICODE support)
2619 return O32_PostMessage(arg1, arg2, arg3, arg4);
2620}
2621//******************************************************************************
2622//******************************************************************************
2623BOOL WIN32API PostThreadMessageA( DWORD arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
2624{
2625#ifdef DEBUG
2626 WriteLog("USER32: PostThreadMessageA\n");
2627#endif
2628 return O32_PostThreadMessage(arg1, arg2, arg3, arg4);
2629}
2630//******************************************************************************
2631//******************************************************************************
2632BOOL WIN32API PostThreadMessageW( DWORD arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
2633{
2634#ifdef DEBUG
2635 WriteLog("USER32: PostThreadMessageW\n");
2636#endif
2637 // NOTE: This will not work as is (needs UNICODE support)
2638 return O32_PostThreadMessage(arg1, arg2, arg3, arg4);
2639}
2640//******************************************************************************
2641//******************************************************************************
2642BOOL WIN32API PtInRect( const RECT * arg1, POINT arg2)
2643{
2644#ifdef DEBUG1
2645 WriteLog("USER32: PtInRect\n");
2646#endif
2647 return O32_PtInRect(arg1, arg2);
2648}
2649//******************************************************************************
2650//******************************************************************************
2651BOOL WIN32API RedrawWindow( HWND arg1, const RECT * arg2, HRGN arg3, UINT arg4)
2652{
2653 BOOL rc;
2654
2655 rc = O32_RedrawWindow(arg1, arg2, arg3, arg4);
2656#ifdef DEBUG
2657 WriteLog("USER32: RedrawWindow %X , %X, %X, %X returned %d\n", arg1, arg2, arg3, arg4, rc);
2658#endif
2659 InvalidateRect(arg1, arg2, TRUE);
2660 UpdateWindow(arg1);
2661 SendMessageA(arg1, WM_PAINT, 0, 0);
2662 return(rc);
2663}
2664//******************************************************************************
2665//******************************************************************************
2666UINT WIN32API RegisterClipboardFormatA( LPCSTR arg1)
2667{
2668#ifdef DEBUG
2669 WriteLog("USER32: RegisterClipboardFormatA\n");
2670#endif
2671 return O32_RegisterClipboardFormat(arg1);
2672}
2673//******************************************************************************
2674//******************************************************************************
2675UINT WIN32API RegisterClipboardFormatW(LPCWSTR arg1)
2676{
2677 UINT rc;
2678 char *astring = UnicodeToAsciiString((LPWSTR)arg1);
2679
2680#ifdef DEBUG
2681 WriteLog("USER32: RegisterClipboardFormatW %s\n", astring);
2682#endif
2683 rc = O32_RegisterClipboardFormat(astring);
2684 FreeAsciiString(astring);
2685#ifdef DEBUG
2686 WriteLog("USER32: RegisterClipboardFormatW returned %d\n", rc);
2687#endif
2688 return(rc);
2689}
2690//******************************************************************************
2691//******************************************************************************
2692UINT WIN32API RegisterWindowMessageW( LPCWSTR arg1)
2693{
2694 char *astring = UnicodeToAsciiString((LPWSTR)arg1);
2695 UINT rc;
2696
2697#ifdef DEBUG
2698 WriteLog("USER32: RegisterWindowMessageW\n");
2699#endif
2700 rc = O32_RegisterWindowMessage(astring);
2701 FreeAsciiString(astring);
2702 return rc;
2703}
2704//******************************************************************************
2705//******************************************************************************
2706HANDLE WIN32API RemovePropA( HWND arg1, LPCSTR arg2)
2707{
2708#ifdef DEBUG
2709 WriteLog("USER32: RemovePropA\n");
2710#endif
2711 return O32_RemoveProp(arg1, arg2);
2712}
2713//******************************************************************************
2714//******************************************************************************
2715HANDLE WIN32API RemovePropW( HWND arg1, LPCWSTR arg2)
2716{
2717 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
2718 HANDLE rc;
2719
2720#ifdef DEBUG
2721 WriteLog("USER32: RemovePropW\n");
2722#endif
2723 rc = O32_RemoveProp(arg1, astring);
2724 FreeAsciiString(astring);
2725 return rc;
2726}
2727//******************************************************************************
2728//******************************************************************************
2729BOOL WIN32API ReplyMessage( LRESULT arg1)
2730{
2731#ifdef DEBUG
2732 WriteLog("USER32: ReplyMessage\n");
2733#endif
2734 return O32_ReplyMessage(arg1);
2735}
2736//******************************************************************************
2737//******************************************************************************
2738BOOL WIN32API ScreenToClient( HWND arg1, LPPOINT arg2)
2739{
2740#ifdef DEBUG
2741 WriteLog("USER32: ScreenToClient\n");
2742#endif
2743 return O32_ScreenToClient(arg1, arg2);
2744}
2745//******************************************************************************
2746//******************************************************************************
2747BOOL WIN32API ScrollDC( HDC arg1, int arg2, int arg3, const RECT * arg4, const RECT * arg5, HRGN arg6, PRECT arg7)
2748{
2749#ifdef DEBUG
2750 WriteLog("USER32: ScrollDC\n");
2751#endif
2752 return O32_ScrollDC(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
2753}
2754//******************************************************************************
2755//******************************************************************************
2756BOOL WIN32API ScrollWindow( HWND arg1, int arg2, int arg3, const RECT * arg4, const RECT * arg5)
2757{
2758#ifdef DEBUG
2759 WriteLog("USER32: ScrollWindow\n");
2760#endif
2761 return O32_ScrollWindow(arg1, arg2, arg3, arg4, arg5);
2762}
2763//******************************************************************************
2764//******************************************************************************
2765BOOL WIN32API ScrollWindowEx( HWND arg1, int arg2, int arg3, const RECT * arg4, const RECT * arg5, HRGN arg6, PRECT arg7, UINT arg8)
2766{
2767#ifdef DEBUG
2768 WriteLog("USER32: ScrollWindowEx\n");
2769#endif
2770 return O32_ScrollWindowEx(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
2771}
2772//******************************************************************************
2773//******************************************************************************
2774LONG WIN32API SendDlgItemMessageW( HWND arg1, int arg2, UINT arg3, WPARAM arg4, LPARAM arg5)
2775{
2776#ifdef DEBUG
2777 WriteLog("USER32: SendDlgItemMessageW\n");
2778#endif
2779 return O32_SendDlgItemMessage(arg1, arg2, arg3, arg4, arg5);
2780}
2781//******************************************************************************
2782//******************************************************************************
2783LRESULT WIN32API SendMessageW( HWND arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
2784{
2785LRESULT rc;
2786
2787#ifdef DEBUG
2788 WriteLog("USER32: SendMessageW....\n");
2789#endif
2790 rc = O32_SendMessage(arg1, arg2, arg3, arg4);
2791#ifdef DEBUG
2792 WriteLog("USER32: SendMessageW %X %X %X %X returned %d\n", arg1, arg2, arg3, arg4, rc);
2793#endif
2794 return(rc);
2795}
2796//******************************************************************************
2797//******************************************************************************
2798BOOL WIN32API SetCaretBlinkTime( UINT arg1)
2799{
2800#ifdef DEBUG
2801 WriteLog("USER32: SetCaretBlinkTime\n");
2802#endif
2803 return O32_SetCaretBlinkTime(arg1);
2804}
2805//******************************************************************************
2806//******************************************************************************
2807BOOL WIN32API SetCaretPos( int arg1, int arg2)
2808{
2809 dprintf(("USER32: SetCaretPos\n"));
2810 return O32_SetCaretPos(arg1, arg2);
2811}
2812//******************************************************************************
2813//******************************************************************************
2814HANDLE WIN32API SetClipboardData( UINT arg1, HANDLE arg2)
2815{
2816 dprintf(("USER32: SetClipboardData\n"));
2817 return O32_SetClipboardData(arg1, arg2);
2818}
2819//******************************************************************************
2820//******************************************************************************
2821HWND WIN32API SetClipboardViewer( HWND arg1)
2822{
2823 dprintf(("USER32: SetClipboardViewer\n"));
2824 return O32_SetClipboardViewer(arg1);
2825}
2826//******************************************************************************
2827//******************************************************************************
2828BOOL WIN32API SetDlgItemTextW( HWND arg1, int arg2, LPCWSTR arg3)
2829{
2830char *astring = UnicodeToAsciiString((LPWSTR)arg3);
2831BOOL rc;
2832
2833#ifdef DEBUG
2834 WriteLog("USER32: SetDlgItemTextW\n");
2835#endif
2836 // NOTE: This will not work as is (needs UNICODE support)
2837 rc = O32_SetDlgItemText(arg1, arg2, astring);
2838 FreeAsciiString(astring);
2839 return rc;
2840}
2841//******************************************************************************
2842//******************************************************************************
2843BOOL WIN32API SetDoubleClickTime( UINT arg1)
2844{
2845#ifdef DEBUG
2846 WriteLog("USER32: SetDoubleClickTime\n");
2847#endif
2848 return O32_SetDoubleClickTime(arg1);
2849}
2850//******************************************************************************
2851//******************************************************************************
2852HWND WIN32API SetParent( HWND arg1, HWND arg2)
2853{
2854#ifdef DEBUG
2855 WriteLog("USER32: SetParent\n");
2856#endif
2857 return O32_SetParent(arg1, arg2);
2858}
2859//******************************************************************************
2860//******************************************************************************
2861BOOL WIN32API SetPropA( HWND arg1, LPCSTR arg2, HANDLE arg3)
2862{
2863#ifdef DEBUG
2864 if((int)arg2 >> 16 != 0)
2865 WriteLog("USER32: SetPropA %S\n", arg2);
2866 else WriteLog("USER32: SetPropA %X\n", arg2);
2867#endif
2868 return O32_SetProp(arg1, arg2, arg3);
2869}
2870//******************************************************************************
2871//******************************************************************************
2872BOOL WIN32API SetPropW(HWND arg1, LPCWSTR arg2, HANDLE arg3)
2873{
2874 BOOL rc;
2875 char *astring;
2876
2877 if((int)arg2 >> 16 != 0)
2878 astring = UnicodeToAsciiString((LPWSTR)arg2);
2879 else astring = (char *)arg2;
2880
2881#ifdef DEBUG
2882 if((int)arg2 >> 16 != 0)
2883 WriteLog("USER32: SetPropW %S\n", astring);
2884 else WriteLog("USER32: SetPropW %X\n", astring);
2885#endif
2886 rc = O32_SetProp(arg1, astring, arg3);
2887 if((int)astring >> 16 != 0)
2888 FreeAsciiString(astring);
2889 return(rc);
2890}
2891//******************************************************************************
2892//******************************************************************************
2893BOOL WIN32API SetRectEmpty( PRECT arg1)
2894{
2895#ifdef DEBUG
2896 WriteLog("USER32: SetRectEmpty\n");
2897#endif
2898 return O32_SetRectEmpty(arg1);
2899}
2900//******************************************************************************
2901//******************************************************************************
2902int WIN32API SetScrollPos( HWND arg1, int arg2, int arg3, BOOL arg4)
2903{
2904#ifdef DEBUG
2905 WriteLog("USER32: SetScrollPos\n");
2906#endif
2907 return O32_SetScrollPos(arg1, arg2, arg3, arg4);
2908}
2909//******************************************************************************
2910//******************************************************************************
2911BOOL WIN32API SetScrollRange( HWND arg1, int arg2, int arg3, int arg4, BOOL arg5)
2912{
2913#ifdef DEBUG
2914 WriteLog("USER32: SetScrollRange\n");
2915#endif
2916 return O32_SetScrollRange(arg1, arg2, arg3, arg4, arg5);
2917}
2918//******************************************************************************
2919//******************************************************************************
2920BOOL WIN32API SetWindowPlacement( HWND arg1, const WINDOWPLACEMENT * arg2)
2921{
2922 dprintf(("USER32: SetWindowPlacement\n"));
2923 return O32_SetWindowPlacement(arg1, arg2);
2924}
2925//******************************************************************************
2926//******************************************************************************
2927BOOL WIN32API SetWindowTextW( HWND arg1, LPCWSTR arg2)
2928{
2929 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
2930 BOOL rc;
2931
2932 rc = SetWindowTextA(arg1, (LPCSTR)astring);
2933 dprintf(("USER32: SetWindowTextW %X %s returned %d\n", arg1, astring, rc));
2934 FreeAsciiString(astring);
2935 return(rc);
2936}
2937//******************************************************************************
2938//******************************************************************************
2939BOOL WIN32API ShowCaret( HWND arg1)
2940{
2941 dprintf(("USER32: ShowCaret\n"));
2942 return O32_ShowCaret(arg1);
2943}
2944//******************************************************************************
2945//******************************************************************************
2946BOOL WIN32API ShowOwnedPopups( HWND arg1, BOOL arg2)
2947{
2948 dprintf(("USER32: ShowOwnedPopups\n"));
2949 return O32_ShowOwnedPopups(arg1, arg2);
2950}
2951//******************************************************************************
2952//******************************************************************************
2953BOOL WIN32API ShowScrollBar( HWND arg1, int arg2, BOOL arg3)
2954{
2955#ifdef DEBUG
2956 WriteLog("USER32: ShowScrollBar\n");
2957#endif
2958 return O32_ShowScrollBar(arg1, arg2, arg3);
2959}
2960//******************************************************************************
2961//******************************************************************************
2962BOOL WIN32API SwapMouseButton( BOOL arg1)
2963{
2964#ifdef DEBUG
2965 WriteLog("USER32: SwapMouseButton\n");
2966#endif
2967 return O32_SwapMouseButton(arg1);
2968}
2969//******************************************************************************
2970//******************************************************************************
2971BOOL WIN32API SystemParametersInfoA(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni)
2972{
2973 BOOL rc;
2974 NONCLIENTMETRICSA *cmetric = (NONCLIENTMETRICSA *)pvParam;
2975
2976 switch(uiAction) {
2977 case SPI_SCREENSAVERRUNNING:
2978 *(BOOL *)pvParam = FALSE;
2979 rc = TRUE;
2980 break;
2981 case SPI_GETDRAGFULLWINDOWS:
2982 *(BOOL *)pvParam = FALSE;
2983 rc = TRUE;
2984 break;
2985 case SPI_GETNONCLIENTMETRICS:
2986 memset(cmetric, 0, sizeof(NONCLIENTMETRICSA));
2987 cmetric->cbSize = sizeof(NONCLIENTMETRICSA);
2988 //CB: font info not valid, needs improvements
2989 O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfCaptionFont),0);
2990 O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfMenuFont),0);
2991 //CB: experimental change for statusbar (and tooltips)
2992
2993 //O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfStatusFont),0);
2994 lstrcpyA(cmetric->lfStatusFont.lfFaceName,"WarpSans");
2995 cmetric->lfStatusFont.lfHeight = 9;
2996
2997 O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfMessageFont),0);
2998 cmetric->iBorderWidth = GetSystemMetrics(SM_CXBORDER);
2999 cmetric->iScrollWidth = GetSystemMetrics(SM_CXHSCROLL);
3000 cmetric->iScrollHeight = GetSystemMetrics(SM_CYHSCROLL);
3001 cmetric->iCaptionWidth = 32; //TODO
3002 cmetric->iCaptionHeight = 16; //TODO
3003 cmetric->iSmCaptionWidth = GetSystemMetrics(SM_CXSMSIZE);
3004 cmetric->iSmCaptionHeight = GetSystemMetrics(SM_CYSMSIZE);
3005 cmetric->iMenuWidth = 32; //TODO
3006 cmetric->iMenuHeight = GetSystemMetrics(SM_CYMENU);
3007 rc = TRUE;
3008 break;
3009 case 104: //TODO: Undocumented
3010 rc = 16;
3011 break;
3012 default:
3013 rc = O32_SystemParametersInfo(uiAction, uiParam, pvParam, fWinIni);
3014 break;
3015 }
3016#ifdef DEBUG
3017 WriteLog("USER32: SystemParametersInfoA %d, returned %d\n", uiAction, rc);
3018#endif
3019 return(rc);
3020}
3021//******************************************************************************
3022//TODO: Check for more options that have different structs for Unicode!!!!
3023//******************************************************************************
3024BOOL WIN32API SystemParametersInfoW(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni)
3025{
3026 BOOL rc;
3027 NONCLIENTMETRICSW *clientMetricsW = (NONCLIENTMETRICSW *)pvParam;
3028 NONCLIENTMETRICSA clientMetricsA = {0};
3029 PVOID pvParamA;
3030 UINT uiParamA;
3031
3032 switch(uiAction) {
3033 case SPI_SETNONCLIENTMETRICS:
3034 clientMetricsA.cbSize = sizeof(NONCLIENTMETRICSA);
3035 clientMetricsA.iBorderWidth = clientMetricsW->iBorderWidth;
3036 clientMetricsA.iScrollWidth = clientMetricsW->iScrollWidth;
3037 clientMetricsA.iScrollHeight = clientMetricsW->iScrollHeight;
3038 clientMetricsA.iCaptionWidth = clientMetricsW->iCaptionWidth;
3039 clientMetricsA.iCaptionHeight = clientMetricsW->iCaptionHeight;
3040 ConvertFontWA(&clientMetricsW->lfCaptionFont, &clientMetricsA.lfCaptionFont);
3041 clientMetricsA.iSmCaptionWidth = clientMetricsW->iSmCaptionWidth;
3042 clientMetricsA.iSmCaptionHeight = clientMetricsW->iSmCaptionHeight;
3043 ConvertFontWA(&clientMetricsW->lfSmCaptionFont, &clientMetricsA.lfSmCaptionFont);
3044 clientMetricsA.iMenuWidth = clientMetricsW->iMenuWidth;
3045 clientMetricsA.iMenuHeight = clientMetricsW->iMenuHeight;
3046 ConvertFontWA(&clientMetricsW->lfMenuFont, &clientMetricsA.lfMenuFont);
3047 ConvertFontWA(&clientMetricsW->lfStatusFont, &clientMetricsA.lfStatusFont);
3048 ConvertFontWA(&clientMetricsW->lfMessageFont, &clientMetricsA.lfMessageFont);
3049 //no break
3050 case SPI_GETNONCLIENTMETRICS:
3051 uiParamA = sizeof(NONCLIENTMETRICSA);
3052 pvParamA = &clientMetricsA;
3053 break;
3054 default:
3055 pvParamA = pvParam;
3056 uiParamA = uiParam;
3057 break;
3058 }
3059 rc = SystemParametersInfoA(uiAction, uiParamA, pvParamA, fWinIni);
3060
3061 switch(uiAction) {
3062 case SPI_GETNONCLIENTMETRICS:
3063 clientMetricsW->cbSize = sizeof(*clientMetricsW);
3064 clientMetricsW->iBorderWidth = clientMetricsA.iBorderWidth;
3065 clientMetricsW->iScrollWidth = clientMetricsA.iScrollWidth;
3066 clientMetricsW->iScrollHeight = clientMetricsA.iScrollHeight;
3067 clientMetricsW->iCaptionWidth = clientMetricsA.iCaptionWidth;
3068 clientMetricsW->iCaptionHeight = clientMetricsA.iCaptionHeight;
3069 ConvertFontAW(&clientMetricsA.lfCaptionFont, &clientMetricsW->lfCaptionFont);
3070
3071 clientMetricsW->iSmCaptionWidth = clientMetricsA.iSmCaptionWidth;
3072 clientMetricsW->iSmCaptionHeight = clientMetricsA.iSmCaptionHeight;
3073 ConvertFontAW(&clientMetricsA.lfSmCaptionFont, &clientMetricsW->lfSmCaptionFont);
3074
3075 clientMetricsW->iMenuWidth = clientMetricsA.iMenuWidth;
3076 clientMetricsW->iMenuHeight = clientMetricsA.iMenuHeight;
3077 ConvertFontAW(&clientMetricsA.lfMenuFont, &clientMetricsW->lfMenuFont);
3078 ConvertFontAW(&clientMetricsA.lfStatusFont, &clientMetricsW->lfStatusFont);
3079 ConvertFontAW(&clientMetricsA.lfMessageFont, &clientMetricsW->lfMessageFont);
3080 break;
3081 }
3082#ifdef DEBUG
3083 WriteLog("USER32: SystemParametersInfoW %d, returned %d\n", uiAction, rc);
3084#endif
3085 return(rc);
3086}
3087//******************************************************************************
3088//******************************************************************************
3089LONG WIN32API TabbedTextOutA( HDC arg1, int arg2, int arg3, LPCSTR arg4, int arg5, int arg6, int * arg7, int arg8)
3090{
3091#ifdef DEBUG
3092 WriteLog("USER32: TabbedTextOutA\n");
3093#endif
3094 return O32_TabbedTextOut(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
3095}
3096//******************************************************************************
3097//******************************************************************************
3098LONG WIN32API TabbedTextOutW( HDC arg1, int arg2, int arg3, LPCWSTR arg4, int arg5, int arg6, int * arg7, int arg8)
3099{
3100 char *astring = UnicodeToAsciiString((LPWSTR)arg4);
3101 LONG rc;
3102
3103#ifdef DEBUG
3104 WriteLog("USER32: TabbedTextOutW\n");
3105#endif
3106 rc = O32_TabbedTextOut(arg1, arg2, arg3, astring, arg5, arg6, arg7, arg8);
3107 FreeAsciiString(astring);
3108 return rc;
3109}
3110//******************************************************************************
3111//******************************************************************************
3112int WIN32API TranslateAccelerator( HWND arg1, HACCEL arg2, LPMSG arg3)
3113{
3114#ifdef DEBUG
3115 WriteLog("USER32: TranslateAccelerator\n");
3116#endif
3117 return O32_TranslateAccelerator(arg1, arg2, arg3);
3118}
3119//******************************************************************************
3120//******************************************************************************
3121int WIN32API TranslateAcceleratorW( HWND arg1, HACCEL arg2, LPMSG arg3)
3122{
3123#ifdef DEBUG
3124 WriteLog("USER32: TranslateAcceleratorW\n");
3125#endif
3126 // NOTE: This will not work as is (needs UNICODE support)
3127 return O32_TranslateAccelerator(arg1, arg2, arg3);
3128}
3129//******************************************************************************
3130//******************************************************************************
3131BOOL WIN32API TranslateMDISysAccel( HWND arg1, LPMSG arg2)
3132{
3133#ifdef DEBUG
3134//// WriteLog("USER32: TranslateMDISysAccel\n");
3135#endif
3136 return O32_TranslateMDISysAccel(arg1, arg2);
3137}
3138//******************************************************************************
3139//******************************************************************************
3140BOOL WIN32API UnionRect( PRECT arg1, const RECT * arg2, const RECT * arg3)
3141{
3142#ifdef DEBUG
3143 WriteLog("USER32: UnionRect\n");
3144#endif
3145 return O32_UnionRect(arg1, arg2, arg3);
3146}
3147//******************************************************************************
3148//******************************************************************************
3149BOOL WIN32API ValidateRect( HWND arg1, const RECT * arg2)
3150{
3151#ifdef DEBUG
3152 WriteLog("USER32: ValidateRect\n");
3153#endif
3154 return O32_ValidateRect(arg1, arg2);
3155}
3156//******************************************************************************
3157//******************************************************************************
3158BOOL WIN32API ValidateRgn( HWND arg1, HRGN arg2)
3159{
3160#ifdef DEBUG
3161 WriteLog("USER32: ValidateRgn\n");
3162#endif
3163 return O32_ValidateRgn(arg1, arg2);
3164}
3165//******************************************************************************
3166//******************************************************************************
3167WORD WIN32API VkKeyScanW( WCHAR arg1)
3168{
3169#ifdef DEBUG
3170 WriteLog("USER32: VkKeyScanW\n");
3171#endif
3172 // NOTE: This will not work as is (needs UNICODE support)
3173 return O32_VkKeyScan((char)arg1);
3174}
3175//******************************************************************************
3176//******************************************************************************
3177BOOL WIN32API WaitMessage(void)
3178{
3179#ifdef DEBUG
3180 WriteLog("USER32: WaitMessage\n");
3181#endif
3182 return O32_WaitMessage();
3183}
3184//******************************************************************************
3185//******************************************************************************
3186BOOL WIN32API WinHelpW( HWND arg1, LPCWSTR arg2, UINT arg3, DWORD arg4)
3187{
3188 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
3189 BOOL rc;
3190
3191#ifdef DEBUG
3192 WriteLog("USER32: WinHelpW\n");
3193#endif
3194 rc = WinHelpA(arg1, astring, arg3, arg4);
3195 FreeAsciiString(astring);
3196 return rc;
3197}
3198//******************************************************************************
3199//******************************************************************************
3200HWND WIN32API WindowFromDC( HDC arg1)
3201{
3202#ifdef DEBUG
3203 WriteLog("USER32: WindowFromDC\n");
3204#endif
3205 return O32_WindowFromDC(arg1);
3206}
3207//******************************************************************************
3208//******************************************************************************
3209HWND WIN32API WindowFromPoint( POINT arg1)
3210{
3211#ifdef DEBUG
3212 WriteLog("USER32: WindowFromPoint\n");
3213#endif
3214 return O32_WindowFromPoint(arg1);
3215}
3216//******************************************************************************
3217//******************************************************************************
3218int WIN32API wvsprintfA( LPSTR arg1, LPCSTR arg2, va_list arg3)
3219{
3220#ifdef DEBUG
3221 WriteLog("USER32: wvsprintfA\n");
3222#endif
3223 return O32_wvsprintf(arg1, arg2, (LPCVOID *)arg3);
3224}
3225//******************************************************************************
3226//******************************************************************************
3227int WIN32API wvsprintfW(LPWSTR lpOut, LPCWSTR lpFmt, va_list argptr)
3228{
3229 int rc;
3230 char szOut[256];
3231 char *lpFmtA;
3232
3233 lpFmtA = UnicodeToAsciiString((LPWSTR)lpFmt);
3234#ifdef DEBUG
3235 WriteLog("USER32: wvsprintfW, DOES NOT HANDLE UNICODE STRINGS!\n");
3236 WriteLog("USER32: %s\n", lpFmt);
3237#endif
3238 rc = O32_wvsprintf(szOut, lpFmtA, (LPCVOID)argptr);
3239
3240 AsciiToUnicode(szOut, lpOut);
3241#ifdef DEBUG
3242 WriteLog("USER32: %s\n", lpOut);
3243#endif
3244 FreeAsciiString(lpFmtA);
3245 return(rc);
3246}
3247//******************************************************************************
3248//No need to support this
3249//******************************************************************************
3250BOOL WIN32API SetMessageQueue(int cMessagesMax)
3251{
3252#ifdef DEBUG
3253 WriteLog("USER32: SetMessageQueue\n");
3254#endif
3255 return(TRUE);
3256}
3257//******************************************************************************
3258//TODO: Not complete
3259//******************************************************************************
3260BOOL WIN32API GetScrollInfo(HWND hwnd, int fnBar, LPSCROLLINFO lpsi)
3261{
3262#ifdef DEBUG
3263 WriteLog("USER32: GetScrollInfo\n");
3264#endif
3265 if(lpsi == NULL)
3266 return(FALSE);
3267
3268 if(lpsi->fMask & SIF_POS)
3269 lpsi->nPos = GetScrollPos(hwnd, fnBar);
3270 if(lpsi->fMask & SIF_RANGE)
3271 GetScrollRange(hwnd, fnBar, &lpsi->nMin, &lpsi->nMax);
3272 if(lpsi->fMask & SIF_PAGE) {
3273#ifdef DEBUG
3274 WriteLog("USER32: GetScrollInfo, page info not implemented\n");
3275#endif
3276 lpsi->nPage = 25;
3277 }
3278 return(TRUE);
3279}
3280//******************************************************************************
3281//TODO: Not complete
3282//******************************************************************************
3283INT WIN32API SetScrollInfo(HWND hwnd, INT fnBar, const SCROLLINFO *lpsi, BOOL fRedraw)
3284{
3285 int smin, smax;
3286
3287#ifdef DEBUG
3288 WriteLog("USER32: SetScrollInfo\n");
3289#endif
3290 if(lpsi == NULL)
3291 return(FALSE);
3292
3293 if(lpsi->fMask & SIF_POS)
3294 SetScrollPos(hwnd, fnBar, lpsi->nPos, fRedraw);
3295 if(lpsi->fMask & SIF_RANGE)
3296 SetScrollRange(hwnd, fnBar, lpsi->nMin, lpsi->nMax, fRedraw);
3297 if(lpsi->fMask & SIF_PAGE) {
3298#ifdef DEBUG
3299 WriteLog("USER32: GetScrollInfo, page info not implemented\n");
3300#endif
3301 }
3302 if(lpsi->fMask & SIF_DISABLENOSCROLL) {
3303#ifdef DEBUG
3304 WriteLog("USER32: GetScrollInfo, disable scrollbar not yet implemented\n");
3305#endif
3306 }
3307 return(TRUE);
3308}
3309//******************************************************************************
3310//******************************************************************************
3311BOOL WIN32API GrayStringA(HDC hdc, HBRUSH hBrush, GRAYSTRINGPROC lpOutputFunc,
3312 LPARAM lpData, int nCount, int X, int Y, int nWidth,
3313 int nHeight)
3314{
3315 BOOL rc;
3316 COLORREF curclr;
3317
3318#ifdef DEBUG
3319 WriteLog("USER32: GrayStringA, not completely implemented\n");
3320#endif
3321 if(lpOutputFunc == NULL && lpData == NULL) {
3322#ifdef DEBUG
3323 WriteLog("USER32: lpOutputFunc == NULL && lpData == NULL\n");
3324#endif
3325 return(FALSE);
3326 }
3327 if(lpOutputFunc) {
3328 return(lpOutputFunc(hdc, lpData, nCount));
3329 }
3330 curclr = SetTextColor(hdc, GetSysColor(COLOR_GRAYTEXT));
3331 rc = TextOutA(hdc, X, Y, (char *)lpData, nCount);
3332 SetTextColor(hdc, curclr);
3333
3334 return(rc);
3335}
3336//******************************************************************************
3337//******************************************************************************
3338BOOL WIN32API GrayStringW(HDC hdc, HBRUSH hBrush, GRAYSTRINGPROC lpOutputFunc,
3339 LPARAM lpData, int nCount, int X, int Y, int nWidth,
3340 int nHeight)
3341{
3342 BOOL rc;
3343 char *astring;
3344 COLORREF curclr;
3345
3346#ifdef DEBUG
3347 WriteLog("USER32: GrayStringW, not completely implemented\n");
3348#endif
3349
3350 if(lpOutputFunc == NULL && lpData == NULL) {
3351#ifdef DEBUG
3352 WriteLog("USER32: lpOutputFunc == NULL && lpData == NULL\n");
3353#endif
3354 return(FALSE);
3355 }
3356 if(nCount == 0)
3357 nCount = UniStrlen((UniChar*)lpData);
3358
3359 if(lpOutputFunc) {
3360 return(lpOutputFunc(hdc, lpData, nCount));
3361 }
3362 astring = UnicodeToAsciiString((LPWSTR)lpData);
3363
3364 curclr = SetTextColor(hdc, GetSysColor(COLOR_GRAYTEXT));
3365 rc = TextOutA(hdc, X, Y, astring, nCount);
3366 SetTextColor(hdc, curclr);
3367
3368 FreeAsciiString(astring);
3369 return(rc);
3370}
3371//******************************************************************************
3372//TODO:
3373//******************************************************************************
3374int WIN32API CopyAcceleratorTableA(HACCEL hAccelSrc, LPACCEL lpAccelDest,
3375 int cAccelEntries)
3376{
3377#ifdef DEBUG
3378 WriteLog("USER32: CopyAcceleratorTableA, not implemented\n");
3379#endif
3380 return(0);
3381}
3382//******************************************************************************
3383//TODO:
3384//******************************************************************************
3385int WIN32API CopyAcceleratorTableW(HACCEL hAccelSrc, LPACCEL lpAccelDest,
3386 int cAccelEntries)
3387{
3388#ifdef DEBUG
3389 WriteLog("USER32: CopyAcceleratorTableW, not implemented\n");
3390#endif
3391 return(0);
3392}
3393//******************************************************************************
3394//******************************************************************************
3395LRESULT WIN32API SendMessageTimeoutA(HWND hwnd, UINT Msg, WPARAM wParam,
3396 LPARAM lParam, UINT fuFlags, UINT uTimeOut,
3397 LPDWORD lpdwResult)
3398{
3399#ifdef DEBUG
3400 WriteLog("USER32: SendMessageTimeoutA, partially implemented\n");
3401#endif
3402 //ignore fuFlags & wTimeOut
3403 *lpdwResult = SendMessageA(hwnd, Msg, wParam, lParam);
3404 return(TRUE);
3405}
3406//******************************************************************************
3407//******************************************************************************
3408LRESULT WIN32API SendMessageTimeoutW(HWND hwnd, UINT Msg, WPARAM wParam,
3409 LPARAM lParam, UINT fuFlags, UINT uTimeOut,
3410 LPDWORD lpdwResult)
3411{
3412#ifdef DEBUG
3413 WriteLog("USER32: SendMessageTimeoutW, partially implemented\n");
3414#endif
3415 return(SendMessageTimeoutA(hwnd, Msg, wParam, lParam, fuFlags, uTimeOut, lpdwResult));
3416}
3417//******************************************************************************
3418//******************************************************************************
3419HANDLE WIN32API CopyImage(HANDLE hImage, UINT uType, int cxDesired, int cyDesired, UINT fuFlags)
3420{
3421#ifdef DEBUG
3422 WriteLog("USER32: CopyImage, not implemented\n");
3423#endif
3424 switch(uType) {
3425 case IMAGE_BITMAP:
3426 case IMAGE_CURSOR:
3427 case IMAGE_ICON:
3428 default:
3429#ifdef DEBUG
3430 WriteLog("USER32: CopyImage, unknown type\n");
3431#endif
3432 return(NULL);
3433 }
3434 return(NULL);
3435}
3436//******************************************************************************
3437//******************************************************************************
3438BOOL WIN32API GetKeyboardState(PBYTE lpKeyState)
3439{
3440#ifdef DEBUG
3441 WriteLog("USER32: GetKeyboardState, not properly implemented\n");
3442#endif
3443 memset(lpKeyState, 0, 256);
3444 return(TRUE);
3445}
3446//******************************************************************************
3447//******************************************************************************
3448BOOL WIN32API SetKeyboardState(PBYTE lpKeyState)
3449{
3450#ifdef DEBUG
3451 WriteLog("USER32: SetKeyboardState, not implemented\n");
3452#endif
3453 return(TRUE);
3454}
3455//******************************************************************************
3456//******************************************************************************
3457BOOL WIN32API SendNotifyMessageA(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)
3458{
3459#ifdef DEBUG
3460 WriteLog("USER32: SendNotifyMessageA, not completely implemented\n");
3461#endif
3462 return(SendMessageA(hwnd, Msg, wParam, lParam));
3463}
3464//******************************************************************************
3465//******************************************************************************
3466BOOL WIN32API SendNotifyMessageW(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)
3467{
3468#ifdef DEBUG
3469 WriteLog("USER32: SendNotifyMessageW, not completely implemented\n");
3470#endif
3471 return(SendMessageA(hwnd, Msg, wParam, lParam));
3472}
3473//******************************************************************************
3474//2nd parameter not used according to SDK (yet?)
3475//******************************************************************************
3476VOID WIN32API SetLastErrorEx(DWORD dwErrCode, DWORD dwType)
3477{
3478#ifdef DEBUG
3479 WriteLog("USER32: SetLastErrorEx\n");
3480#endif
3481 SetLastError(dwErrCode);
3482}
3483//******************************************************************************
3484//******************************************************************************
3485LPARAM WIN32API SetMessageExtraInfo(LPARAM lParam)
3486{
3487#ifdef DEBUG
3488 WriteLog("USER32: SetMessageExtraInfo, not implemented\n");
3489#endif
3490 return(0);
3491}
3492//******************************************************************************
3493//******************************************************************************
3494BOOL WIN32API ActivateKeyboardLayout(HKL hkl, UINT fuFlags)
3495{
3496#ifdef DEBUG
3497 WriteLog("USER32: ActivateKeyboardLayout, not implemented\n");
3498#endif
3499 return(TRUE);
3500}
3501//******************************************************************************
3502//******************************************************************************
3503int WIN32API GetKeyboardLayoutList(int nBuff, HKL *lpList)
3504{
3505#ifdef DEBUG
3506 WriteLog("USER32: GetKeyboardLayoutList, not implemented\n");
3507#endif
3508 return(0);
3509}
3510//******************************************************************************
3511//******************************************************************************
3512HKL WIN32API GetKeyboardLayout(DWORD dwLayout)
3513{
3514#ifdef DEBUG
3515 WriteLog("USER32: GetKeyboardLayout, not implemented\n");
3516#endif
3517 return(0);
3518}
3519//******************************************************************************
3520//******************************************************************************
3521int WIN32API LookupIconIdFromDirectory(PBYTE presbits, BOOL fIcon)
3522{
3523#ifdef DEBUG
3524 WriteLog("USER32: LookupIconIdFromDirectory, not implemented\n");
3525#endif
3526 return(0);
3527}
3528//******************************************************************************
3529//******************************************************************************
3530int WIN32API LookupIconIdFromDirectoryEx(PBYTE presbits, BOOL fIcon,
3531 int cxDesired, int cyDesired,
3532 UINT Flags)
3533{
3534#ifdef DEBUG
3535 WriteLog("USER32: LookupIconIdFromDirectoryEx, not implemented\n");
3536#endif
3537 return(0);
3538}
3539//******************************************************************************
3540//DWORD idAttach; /* thread to attach */
3541//DWORD idAttachTo; /* thread to attach to */
3542//BOOL fAttach; /* attach or detach */
3543//******************************************************************************
3544BOOL WIN32API AttachThreadInput(DWORD idAttach, DWORD idAttachTo, BOOL fAttach)
3545{
3546#ifdef DEBUG
3547 WriteLog("USER32: AttachThreadInput, not implemented\n");
3548#endif
3549 return(TRUE);
3550}
3551//******************************************************************************
3552//******************************************************************************
3553BOOL WIN32API RegisterHotKey(HWND hwnd, int idHotKey, UINT fuModifiers, UINT uVirtKey)
3554{
3555#ifdef DEBUG
3556 WriteLog("USER32: RegisterHotKey, not implemented\n");
3557#endif
3558 return(TRUE);
3559}
3560//******************************************************************************
3561//******************************************************************************
3562BOOL WIN32API UnregisterHotKey(HWND hwnd, int idHotKey)
3563{
3564#ifdef DEBUG
3565 WriteLog("USER32: UnregisterHotKey, not implemented\n");
3566#endif
3567 return(TRUE);
3568}
3569//******************************************************************************
3570//******************************************************************************
3571//******************************************************************************
3572//******************************************************************************
3573BOOL WIN32API SetWindowContextHelpId(HWND hwnd, DWORD dwContextHelpId)
3574{
3575#ifdef DEBUG
3576 WriteLog("USER32: SetWindowContextHelpId, not implemented\n");
3577#endif
3578 return(TRUE);
3579}
3580//******************************************************************************
3581//******************************************************************************
3582DWORD WIN32API GetWindowContextHelpId(HWND hwnd)
3583{
3584#ifdef DEBUG
3585 WriteLog("USER32: GetWindowContextHelpId, not implemented\n");
3586#endif
3587 return(0);
3588}
3589//******************************************************************************
3590//restores iconized window to previous size/position
3591//******************************************************************************
3592BOOL WIN32API OpenIcon(HWND hwnd)
3593{
3594#ifdef DEBUG
3595 WriteLog("USER32: OpenIcon\n");
3596#endif
3597 if(!IsIconic(hwnd))
3598 return FALSE;
3599 ShowWindow(hwnd, SW_SHOWNORMAL);
3600 return TRUE;
3601}
3602//******************************************************************************
3603//******************************************************************************
3604BOOL WIN32API IsWindowUnicode(HWND hwnd)
3605{
3606#ifdef DEBUG
3607 WriteLog("USER32: IsWindowUnicode, not implemented\n");
3608#endif
3609 return(FALSE);
3610}
3611//******************************************************************************
3612//******************************************************************************
3613BOOL WIN32API GetMonitorInfoA(HMONITOR,LPMONITORINFO)
3614{
3615#ifdef DEBUG
3616 WriteLog("USER32: GetMonitorInfoA not supported!!\n");
3617#endif
3618 return(FALSE);
3619}
3620//******************************************************************************
3621//******************************************************************************
3622BOOL WIN32API GetMonitorInfoW(HMONITOR,LPMONITORINFO)
3623{
3624#ifdef DEBUG
3625 WriteLog("USER32: GetMonitorInfoW not supported!!\n");
3626#endif
3627 return(FALSE);
3628}
3629//******************************************************************************
3630//******************************************************************************
3631HMONITOR WIN32API MonitorFromWindow(HWND hwnd, DWORD dwFlags)
3632{
3633#ifdef DEBUG
3634 WriteLog("USER32: MonitorFromWindow not correctly supported??\n");
3635#endif
3636 return(0);
3637}
3638//******************************************************************************
3639//******************************************************************************
3640HMONITOR WIN32API MonitorFromRect(LPRECT rect, DWORD dwFlags)
3641{
3642#ifdef DEBUG
3643 WriteLog("USER32: MonitorFromRect not correctly supported??\n");
3644#endif
3645 return(0);
3646}
3647//******************************************************************************
3648//******************************************************************************
3649HMONITOR WIN32API MonitorFromPoint(POINT point, DWORD dwflags)
3650{
3651#ifdef DEBUG
3652 WriteLog("USER32: MonitorFromPoint not correctly supported??\n");
3653#endif
3654 return(0);
3655}
3656//******************************************************************************
3657//******************************************************************************
3658BOOL WIN32API EnumDisplayMonitors(HDC,LPRECT,MONITORENUMPROC,LPARAM)
3659{
3660#ifdef DEBUG
3661 WriteLog("USER32: EnumDisplayMonitors not supported??\n");
3662#endif
3663 return(FALSE);
3664}
3665//******************************************************************************
3666//******************************************************************************
3667BOOL WIN32API EnumDisplaySettingsA(LPCSTR lpszDeviceName, DWORD iModeNum,
3668 LPDEVMODEA lpDevMode)
3669{
3670#ifdef DEBUG
3671 WriteLog("USER32: EnumDisplaySettingsA FAKED\n");
3672#endif
3673 switch(iModeNum) {
3674 case 0:
3675 lpDevMode->dmBitsPerPel = 16;
3676 lpDevMode->dmPelsWidth = 768;
3677 lpDevMode->dmPelsHeight = 1024;
3678 lpDevMode->dmDisplayFlags = 0;
3679 lpDevMode->dmDisplayFrequency = 70;
3680 break;
3681 case 1:
3682 lpDevMode->dmBitsPerPel = 16;
3683 lpDevMode->dmPelsWidth = 640;
3684 lpDevMode->dmPelsHeight = 480;
3685 lpDevMode->dmDisplayFlags = 0;
3686 lpDevMode->dmDisplayFrequency = 70;
3687 break;
3688 default:
3689 return(FALSE);
3690 }
3691 return(TRUE);
3692}
3693//******************************************************************************
3694//******************************************************************************
3695LONG WIN32API ChangeDisplaySettingsA(LPDEVMODEA lpDevMode, DWORD dwFlags)
3696{
3697#ifdef DEBUG
3698 if(lpDevMode) {
3699 WriteLog("USER32: ChangeDisplaySettingsA FAKED %X\n", dwFlags);
3700 WriteLog("USER32: ChangeDisplaySettingsA lpDevMode->dmBitsPerPel %d\n", lpDevMode->dmBitsPerPel);
3701 WriteLog("USER32: ChangeDisplaySettingsA lpDevMode->dmPelsWidth %d\n", lpDevMode->dmPelsWidth);
3702 WriteLog("USER32: ChangeDisplaySettingsA lpDevMode->dmPelsHeight %d\n", lpDevMode->dmPelsHeight);
3703 }
3704#endif
3705 return(DISP_CHANGE_SUCCESSFUL);
3706}
3707//******************************************************************************
3708//******************************************************************************
3709
3710
3711/*****************************************************************************
3712 * Name : BOOL WIN32API AnyPopup
3713 * Purpose : The AnyPopup function indicates whether an owned, visible,
3714 * top-level pop-up, or overlapped window exists on the screen. The
3715 * function searches the entire Windows screen, not just the calling
3716 * application's client area.
3717 * Parameters: VOID
3718 * Variables :
3719 * Result : If a pop-up window exists, the return value is TRUE even if the
3720 * pop-up window is completely covered by other windows. Otherwise,
3721 * it is FALSE.
3722 * Remark : AnyPopup is a Windows version 1.x function and is retained for
3723 * compatibility purposes. It is generally not useful.
3724 * Status : UNTESTED STUB
3725 *
3726 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3727 *****************************************************************************/
3728
3729BOOL WIN32API AnyPopup(VOID)
3730{
3731 dprintf(("USER32:AnyPopup() not implemented.\n"));
3732
3733 return (FALSE);
3734}
3735
3736
3737/*****************************************************************************
3738 * Name : long WIN32API BroadcastSystemMessage
3739 * Purpose : The BroadcastSystemMessage function sends a message to the given
3740 * recipients. The recipients can be applications, installable
3741 * drivers, Windows-based network drivers, system-level device
3742 * drivers, or any combination of these system components.
3743 * Parameters: DWORD dwFlags,
3744 LPDWORD lpdwRecipients,
3745 UINT uiMessage,
3746 WPARAM wParam,
3747 LPARAM lParam
3748 * Variables :
3749 * Result : If the function succeeds, the return value is a positive value.
3750 * If the function is unable to broadcast the message, the return value is -1.
3751 * If the dwFlags parameter is BSF_QUERY and at least one recipient returned FALSE to the corresponding message, the return value is zero.
3752 * Remark :
3753 * Status : UNTESTED STUB
3754 *
3755 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3756 *****************************************************************************/
3757
3758long WIN32API BroadcastSystemMessage(DWORD dwFlags,
3759 LPDWORD lpdwRecipients,
3760 UINT uiMessage,
3761 WPARAM wParam,
3762 LPARAM lParam)
3763{
3764 dprintf(("USER32:BroadcastSystemMessage(%08xh,%08xh,%08xh,%08xh,%08x) not implemented.\n",
3765 dwFlags,
3766 lpdwRecipients,
3767 uiMessage,
3768 wParam,
3769 lParam));
3770
3771 return (-1);
3772}
3773
3774
3775/*****************************************************************************
3776 * Name : WORD WIN32API CascadeWindows
3777 * Purpose : The CascadeWindows function cascades the specified windows or
3778 * the child windows of the specified parent window.
3779 * Parameters: HWND hwndParent handle of parent window
3780 * UINT wHow types of windows not to arrange
3781 * CONST RECT * lpRect rectangle to arrange windows in
3782 * UINT cKids number of windows to arrange
3783 * const HWND FAR * lpKids array of window handles
3784 * Variables :
3785 * Result : If the function succeeds, the return value is the number of windows arranged.
3786 * If the function fails, the return value is zero.
3787 * Remark :
3788 * Status : UNTESTED STUB
3789 *
3790 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3791 *****************************************************************************/
3792
3793WORD WIN32API CascadeWindows(HWND hwndParent,
3794 UINT wHow,
3795 CONST LPRECT lpRect,
3796 UINT cKids,
3797 const HWND *lpKids)
3798{
3799 dprintf(("USER32:CascadeWindows(%08xh,%u,%08xh,%u,%08x) not implemented.\n",
3800 hwndParent,
3801 wHow,
3802 lpRect,
3803 cKids,
3804 lpKids));
3805
3806 return (0);
3807}
3808
3809
3810/*****************************************************************************
3811 * Name : LONG WIN32API ChangeDisplaySettingsW
3812 * Purpose : The ChangeDisplaySettings function changes the display settings
3813 * to the specified graphics mode.
3814 * Parameters: LPDEVMODEW lpDevModeW
3815 * DWORD dwFlags
3816 * Variables :
3817 * Result : DISP_CHANGE_SUCCESSFUL The settings change was successful.
3818 * DISP_CHANGE_RESTART The computer must be restarted in order for the graphics mode to work.
3819 * DISP_CHANGE_BADFLAGS An invalid set of flags was passed in.
3820 * DISP_CHANGE_FAILED The display driver failed the specified graphics mode.
3821 * DISP_CHANGE_BADMODE The graphics mode is not supported.
3822 * DISP_CHANGE_NOTUPDATED Unable to write settings to the registry.
3823 * Remark :
3824 * Status : UNTESTED STUB
3825 *
3826 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3827 *****************************************************************************/
3828
3829LONG WIN32API ChangeDisplaySettingsW(LPDEVMODEW lpDevMode,
3830 DWORD dwFlags)
3831{
3832 dprintf(("USER32:ChangeDisplaySettingsW(%08xh,%08x) not implemented.\n",
3833 lpDevMode,
3834 dwFlags));
3835
3836 return (ChangeDisplaySettingsA((LPDEVMODEA)lpDevMode,
3837 dwFlags));
3838}
3839
3840/*****************************************************************************
3841 * Name : BOOL WIN32API CloseDesktop
3842 * Purpose : The CloseDesktop function closes an open handle of a desktop
3843 * object. A desktop is a secure object contained within a window
3844 * station object. A desktop has a logical display surface and
3845 * contains windows, menus and hooks.
3846 * Parameters: HDESK hDesktop
3847 * Variables :
3848 * Result : If the function succeeds, the return value is TRUE.
3849 * If the functions fails, the return value is FALSE. To get
3850 * extended error information, call GetLastError.
3851 * Remark :
3852 * Status : UNTESTED STUB
3853 *
3854 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3855 *****************************************************************************/
3856
3857BOOL WIN32API CloseDesktop(HDESK hDesktop)
3858{
3859 dprintf(("USER32:CloseDesktop(%08x) not implemented.\n",
3860 hDesktop));
3861
3862 return (FALSE);
3863}
3864
3865
3866/*****************************************************************************
3867 * Name : BOOL WIN32API CloseWindowStation
3868 * Purpose : The CloseWindowStation function closes an open window station handle.
3869 * Parameters: HWINSTA hWinSta
3870 * Variables :
3871 * Result :
3872 * Remark : If the function succeeds, the return value is TRUE.
3873 * If the functions fails, the return value is FALSE. To get
3874 * extended error information, call GetLastError.
3875 * Status : UNTESTED STUB
3876 *
3877 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3878 *****************************************************************************/
3879
3880BOOL WIN32API CloseWindowStation(HWINSTA hWinSta)
3881{
3882 dprintf(("USER32:CloseWindowStation(%08x) not implemented.\n",
3883 hWinSta));
3884
3885 return (FALSE);
3886}
3887
3888
3889/*****************************************************************************
3890 * Name : HDESK WIN32API CreateDesktopA
3891 * Purpose : The CreateDesktop function creates a new desktop on the window
3892 * station associated with the calling process.
3893 * Parameters: LPCTSTR lpszDesktop name of the new desktop
3894 * LPCTSTR lpszDevice name of display device to assign to the desktop
3895 * LPDEVMODE pDevMode reserved; must be NULL
3896 * DWORD dwFlags flags to control interaction with other applications
3897 * DWORD dwDesiredAccess specifies access of returned handle
3898 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the desktop
3899 * Variables :
3900 * Result : If the function succeeds, the return value is a handle of the
3901 * newly created desktop.
3902 * If the function fails, the return value is NULL. To get extended
3903 * error information, call GetLastError.
3904 * Remark :
3905 * Status : UNTESTED STUB
3906 *
3907 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3908 *****************************************************************************/
3909
3910HDESK WIN32API CreateDesktopA(LPCTSTR lpszDesktop,
3911 LPCTSTR lpszDevice,
3912 LPDEVMODEA pDevMode,
3913 DWORD dwFlags,
3914 DWORD dwDesiredAccess,
3915 LPSECURITY_ATTRIBUTES lpsa)
3916{
3917 dprintf(("USER32:CreateDesktopA(%s,%s,%08xh,%08xh,%08xh,%08x) not implemented.\n",
3918 lpszDesktop,
3919 lpszDevice,
3920 pDevMode,
3921 dwFlags,
3922 dwDesiredAccess,
3923 lpsa));
3924
3925 return (NULL);
3926}
3927
3928
3929/*****************************************************************************
3930 * Name : HDESK WIN32API CreateDesktopW
3931 * Purpose : The CreateDesktop function creates a new desktop on the window
3932 * station associated with the calling process.
3933 * Parameters: LPCTSTR lpszDesktop name of the new desktop
3934 * LPCTSTR lpszDevice name of display device to assign to the desktop
3935 * LPDEVMODE pDevMode reserved; must be NULL
3936 * DWORD dwFlags flags to control interaction with other applications
3937 * DWORD dwDesiredAccess specifies access of returned handle
3938 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the desktop
3939 * Variables :
3940 * Result : If the function succeeds, the return value is a handle of the
3941 * newly created desktop.
3942 * If the function fails, the return value is NULL. To get extended
3943 * error information, call GetLastError.
3944 * Remark :
3945 * Status : UNTESTED STUB
3946 *
3947 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3948 *****************************************************************************/
3949
3950HDESK WIN32API CreateDesktopW(LPCTSTR lpszDesktop,
3951 LPCTSTR lpszDevice,
3952 LPDEVMODEW pDevMode,
3953 DWORD dwFlags,
3954 DWORD dwDesiredAccess,
3955 LPSECURITY_ATTRIBUTES lpsa)
3956{
3957 dprintf(("USER32:CreateDesktopW(%s,%s,%08xh,%08xh,%08xh,%08x) not implemented.\n",
3958 lpszDesktop,
3959 lpszDevice,
3960 pDevMode,
3961 dwFlags,
3962 dwDesiredAccess,
3963 lpsa));
3964
3965 return (NULL);
3966}
3967
3968
3969/*****************************************************************************
3970 * Name : HWINSTA WIN32API CreateWindowStationA
3971 * Purpose : The CreateWindowStation function creates a window station object.
3972 * It returns a handle that can be used to access the window station.
3973 * A window station is a secure object that contains a set of global
3974 * atoms, a clipboard, and a set of desktop objects.
3975 * Parameters: LPTSTR lpwinsta name of the new window station
3976 * DWORD dwReserved reserved; must be NULL
3977 * DWORD dwDesiredAccess specifies access of returned handle
3978 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the window station
3979 * Variables :
3980 * Result : If the function succeeds, the return value is the handle to the
3981 * newly created window station.
3982 * If the function fails, the return value is NULL. To get extended
3983 * error information, call GetLastError.
3984 * Remark :
3985 * Status : UNTESTED STUB
3986 *
3987 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3988 *****************************************************************************/
3989
3990HWINSTA WIN32API CreateWindowStationA(LPTSTR lpWinSta,
3991 DWORD dwReserved,
3992 DWORD dwDesiredAccess,
3993 LPSECURITY_ATTRIBUTES lpsa)
3994{
3995 dprintf(("USER32:CreateWindowStationA(%s,%08xh,%08xh,%08x) not implemented.\n",
3996 lpWinSta,
3997 dwReserved,
3998 dwDesiredAccess,
3999 lpsa));
4000
4001 return (NULL);
4002}
4003
4004
4005/*****************************************************************************
4006 * Name : HWINSTA WIN32API CreateWindowStationW
4007 * Purpose : The CreateWindowStation function creates a window station object.
4008 * It returns a handle that can be used to access the window station.
4009 * A window station is a secure object that contains a set of global
4010 * atoms, a clipboard, and a set of desktop objects.
4011 * Parameters: LPTSTR lpwinsta name of the new window station
4012 * DWORD dwReserved reserved; must be NULL
4013 * DWORD dwDesiredAccess specifies access of returned handle
4014 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the window station
4015 * Variables :
4016 * Result : If the function succeeds, the return value is the handle to the
4017 * newly created window station.
4018 * If the function fails, the return value is NULL. To get extended
4019 * error information, call GetLastError.
4020 * Remark :
4021 * Status : UNTESTED STUB
4022 *
4023 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4024 *****************************************************************************/
4025
4026HWINSTA WIN32API CreateWindowStationW(LPWSTR lpWinSta,
4027 DWORD dwReserved,
4028 DWORD dwDesiredAccess,
4029 LPSECURITY_ATTRIBUTES lpsa)
4030{
4031 dprintf(("USER32:CreateWindowStationW(%s,%08xh,%08xh,%08x) not implemented.\n",
4032 lpWinSta,
4033 dwReserved,
4034 dwDesiredAccess,
4035 lpsa));
4036
4037 return (NULL);
4038}
4039
4040/*****************************************************************************
4041 * Name : BOOL WIN32API DragDetect
4042 * Purpose : The DragDetect function captures the mouse and tracks its movement
4043 * Parameters: HWND hwnd
4044 * POINT pt
4045 * Variables :
4046 * Result : If the user moved the mouse outside of the drag rectangle while
4047 * holding the left button down, the return value is TRUE.
4048 * If the user did not move the mouse outside of the drag rectangle
4049 * while holding the left button down, the return value is FALSE.
4050 * Remark :
4051 * Status : UNTESTED STUB
4052 *
4053 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4054 *****************************************************************************/
4055
4056BOOL WIN32API DragDetect(HWND hwnd,
4057 POINT pt)
4058{
4059 dprintf(("USER32:DragDetect(%08xh,...) not implemented.\n",
4060 hwnd));
4061
4062 return (FALSE);
4063}
4064
4065
4066/*****************************************************************************
4067 * Name : BOOL WIN32API DrawAnimatedRects
4068 * Purpose : The DrawAnimatedRects function draws a wire-frame rectangle
4069 * and animates it to indicate the opening of an icon or the
4070 * minimizing or maximizing of a window.
4071 * Parameters: HWND hwnd handle of clipping window
4072 * int idAni type of animation
4073 * CONST RECT * lprcFrom address of rectangle coordinates (minimized)
4074 * CONST RECT * lprcTo address of rectangle coordinates (restored)
4075 * Variables :
4076 * Result : If the function succeeds, the return value is TRUE.
4077 * If the function fails, the return value is FALSE.
4078 * Remark :
4079 * Status : UNTESTED STUB
4080 *
4081 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4082 *****************************************************************************/
4083
4084BOOL WIN32API DrawAnimatedRects(HWND hwnd,
4085 int idAni,
4086 CONST RECT *lprcFrom,
4087 CONST RECT *lprcTo)
4088{
4089 dprintf(("USER32:DrawAnimatedRects (%08xh,%u,%08xh,%08x) not implemented.\n",
4090 hwnd,
4091 idAni,
4092 lprcFrom,
4093 lprcTo));
4094
4095 return (TRUE);
4096}
4097
4098
4099/*****************************************************************************
4100 * Name : VOID WIN32API DrawCaption
4101 * Purpose : The DrawCaption function draws a window caption.
4102 * Parameters: HDC hdc handle of device context
4103 * LPRECT lprc address of bounding rectangle coordinates
4104 * HFONT hfont handle of font for caption
4105 * HICON hicon handle of icon in caption
4106 * LPSTR lpszText address of caption string
4107 * WORD wFlags drawing options
4108 * Variables :
4109 * Result :
4110 * Remark :
4111 * Status : UNTESTED STUB
4112 *
4113 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4114 *****************************************************************************/
4115
4116BOOL WIN32API DrawCaption (HWND hwnd,
4117 HDC hdc,
4118 const RECT *lprc,
4119 UINT wFlags)
4120{
4121 dprintf(("USER32:DrawCaption (%08xh,%08xh,%08xh,%08xh) not implemented.\n",
4122 hwnd,
4123 hdc,
4124 lprc,
4125 wFlags));
4126
4127 return FALSE;
4128}
4129
4130
4131/*****************************************************************************
4132 * Name :
4133 * Purpose :
4134 * Parameters:
4135 * Variables :
4136 * Result :
4137 * Remark :
4138 * Status : UNTESTED STUB
4139 *
4140 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4141 *****************************************************************************/
4142
4143/*****************************************************************************
4144 * Name : BOOL WIN32API EnumDesktopWindows
4145 * Purpose : The EnumDesktopWindows function enumerates all windows in a
4146 * desktop by passing the handle of each window, in turn, to an
4147 * application-defined callback function.
4148 * Parameters: HDESK hDesktop handle of desktop to enumerate
4149 * WNDENUMPROC lpfn points to application's callback function
4150 * LPARAM lParam 32-bit value to pass to the callback function
4151 * Variables :
4152 * Result : If the function succeeds, the return value is TRUE.
4153 * If the function fails, the return value is FALSE. To get
4154 * extended error information, call GetLastError.
4155 * Remark :
4156 * Status : UNTESTED STUB
4157 *
4158 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4159 *****************************************************************************/
4160
4161BOOL WIN32API EnumDesktopWindows(HDESK hDesktop,
4162 WNDENUMPROC lpfn,
4163 LPARAM lParam)
4164{
4165 dprintf(("USER32:EnumDesktopWindows (%08xh,%08xh,%08x) not implemented.\n",
4166 hDesktop,
4167 lpfn,
4168 lParam));
4169
4170 return (FALSE);
4171}
4172
4173
4174/*****************************************************************************
4175 * Name : BOOL WIN32API EnumDesktopsA
4176 * Purpose : The EnumDesktops function enumerates all desktops in the window
4177 * station assigned to the calling process. The function does so by
4178 * passing the name of each desktop, in turn, to an application-
4179 * defined callback function.
4180 * Parameters: HWINSTA hwinsta handle of window station to enumerate
4181 * DESKTOPENUMPROC lpEnumFunc points to application's callback function
4182 * LPARAM lParam 32-bit value to pass to the callback function
4183 * Variables :
4184 * Result : If the function succeeds, the return value is TRUE.
4185 * If the function fails, the return value is FALSE. To get extended
4186 * error information, call GetLastError.
4187 * Remark :
4188 * Status : UNTESTED STUB
4189 *
4190 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4191 *****************************************************************************/
4192
4193BOOL WIN32API EnumDesktopsA(HWINSTA hWinSta,
4194 DESKTOPENUMPROCA lpEnumFunc,
4195 LPARAM lParam)
4196{
4197 dprintf(("USER32:EnumDesktopsA (%08xh,%08xh,%08x) not implemented.\n",
4198 hWinSta,
4199 lpEnumFunc,
4200 lParam));
4201
4202 return (FALSE);
4203}
4204
4205
4206/*****************************************************************************
4207 * Name : BOOL WIN32API EnumDesktopsW
4208 * Purpose : The EnumDesktops function enumerates all desktops in the window
4209 * station assigned to the calling process. The function does so by
4210 * passing the name of each desktop, in turn, to an application-
4211 * defined callback function.
4212 * Parameters: HWINSTA hwinsta handle of window station to enumerate
4213 * DESKTOPENUMPROC lpEnumFunc points to application's callback function
4214 * LPARAM lParam 32-bit value to pass to the callback function
4215 * Variables :
4216 * Result : If the function succeeds, the return value is TRUE.
4217 * If the function fails, the return value is FALSE. To get extended
4218 * error information, call GetLastError.
4219 * Remark :
4220 * Status : UNTESTED STUB
4221 *
4222 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4223 *****************************************************************************/
4224
4225BOOL WIN32API EnumDesktopsW(HWINSTA hWinSta,
4226 DESKTOPENUMPROCW lpEnumFunc,
4227 LPARAM lParam)
4228{
4229 dprintf(("USER32:EnumDesktopsW (%08xh,%08xh,%08x) not implemented.\n",
4230 hWinSta,
4231 lpEnumFunc,
4232 lParam));
4233
4234 return (FALSE);
4235}
4236
4237
4238
4239/*****************************************************************************
4240 * Name : BOOL WIN32API EnumDisplaySettingsW
4241 * Purpose : The EnumDisplaySettings function obtains information about one
4242 * of a display device's graphics modes. You can obtain information
4243 * for all of a display device's graphics modes by making a series
4244 * of calls to this function.
4245 * Parameters: LPCTSTR lpszDeviceName specifies the display device
4246 * DWORD iModeNum specifies the graphics mode
4247 * LPDEVMODE lpDevMode points to structure to receive settings
4248 * Variables :
4249 * Result : If the function succeeds, the return value is TRUE.
4250 * If the function fails, the return value is FALSE.
4251 * Remark :
4252 * Status : UNTESTED STUB
4253 *
4254 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4255 *****************************************************************************/
4256
4257BOOL WIN32API EnumDisplaySettingsW(LPCSTR lpszDeviceName,
4258 DWORD iModeNum,
4259 LPDEVMODEW lpDevMode)
4260{
4261 dprintf(("USER32:EnumDisplaySettingsW (%s,%08xh,%08x) not implemented.\n",
4262 lpszDeviceName,
4263 iModeNum,
4264 lpDevMode));
4265
4266 return (EnumDisplaySettingsA(lpszDeviceName,
4267 iModeNum,
4268 (LPDEVMODEA)lpDevMode));
4269}
4270
4271
4272/*****************************************************************************
4273 * Name : BOOL WIN32API EnumWindowStationsA
4274 * Purpose : The EnumWindowStations function enumerates all windowstations
4275 * in the system by passing the name of each window station, in
4276 * turn, to an application-defined callback function.
4277 * Parameters:
4278 * Variables : WINSTAENUMPROC lpEnumFunc points to application's callback function
4279 * LPARAM lParam 32-bit value to pass to the callback function
4280 * Result : If the function succeeds, the return value is TRUE.
4281 * If the function fails the return value is FALSE. To get extended
4282 * error information, call GetLastError.
4283 * Remark :
4284 * Status : UNTESTED STUB
4285 *
4286 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4287 *****************************************************************************/
4288
4289BOOL WIN32API EnumWindowStationsA(WINSTAENUMPROCA lpEnumFunc,
4290 LPARAM lParam)
4291{
4292 dprintf(("USER32:EnumWindowStationsA (%08xh,%08x) not implemented.\n",
4293 lpEnumFunc,
4294 lParam));
4295
4296 return (FALSE);
4297}
4298
4299
4300/*****************************************************************************
4301 * Name : BOOL WIN32API EnumWindowStationsW
4302 * Purpose : The EnumWindowStations function enumerates all windowstations
4303 * in the system by passing the name of each window station, in
4304 * turn, to an application-defined callback function.
4305 * Parameters:
4306 * Variables : WINSTAENUMPROC lpEnumFunc points to application's callback function
4307 * LPARAM lParam 32-bit value to pass to the callback function
4308 * Result : If the function succeeds, the return value is TRUE.
4309 * If the function fails the return value is FALSE. To get extended
4310 * error information, call GetLastError.
4311 * Remark :
4312 * Status : UNTESTED STUB
4313 *
4314 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4315 *****************************************************************************/
4316
4317BOOL WIN32API EnumWindowStationsW(WINSTAENUMPROCW lpEnumFunc,
4318 LPARAM lParam)
4319{
4320 dprintf(("USER32:EnumWindowStationsW (%08xh,%08x) not implemented.\n",
4321 lpEnumFunc,
4322 lParam));
4323
4324 return (FALSE);
4325}
4326
4327
4328/*****************************************************************************
4329 * Name : HWND WIN32API FindWindowExW
4330 * Purpose : The FindWindowEx function retrieves the handle of a window whose
4331 * class name and window name match the specified strings. The
4332 * function searches child windows, beginning with the one following
4333 * the given child window.
4334 * Parameters: HWND hwndParent handle of parent window
4335 * HWND hwndChildAfter handle of a child window
4336 * LPCTSTR lpszClass address of class name
4337 * LPCTSTR lpszWindow address of window name
4338 * Variables :
4339 * Result : If the function succeeds, the return value is the handle of the
4340 * window that has the specified class and window names.
4341 * If the function fails, the return value is NULL. To get extended
4342 * error information, call GetLastError.
4343 * Remark :
4344 * Status : UNTESTED STUB
4345 *
4346 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4347 *****************************************************************************/
4348
4349HWND WIN32API FindWindowExW(HWND hwndParent,
4350 HWND hwndChildAfter,
4351 LPCWSTR lpszClass,
4352 LPCWSTR lpszWindow)
4353{
4354 dprintf(("USER32:FindWindowExW (%08xh,%08xh,%s,%s) not implemented.\n",
4355 hwndParent,
4356 hwndChildAfter,
4357 lpszClass,
4358 lpszWindow));
4359
4360 return (NULL);
4361}
4362
4363/*****************************************************************************
4364 * Name : BOOL WIN32API GetInputState
4365 * Purpose : The GetInputState function determines whether there are
4366 * mouse-button or keyboard messages in the calling thread's message queue.
4367 * Parameters:
4368 * Variables :
4369 * Result : If the queue contains one or more new mouse-button or keyboard
4370 * messages, the return value is TRUE.
4371 * If the function fails, the return value is FALSE.
4372 * Remark :
4373 * Status : UNTESTED STUB
4374 *
4375 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4376 *****************************************************************************/
4377
4378BOOL WIN32API GetInputState(VOID)
4379{
4380 dprintf(("USER32:GetInputState () not implemented.\n"));
4381
4382 return (FALSE);
4383}
4384
4385
4386/*****************************************************************************
4387 * Name : UINT WIN32API GetKBCodePage
4388 * Purpose : The GetKBCodePage function is provided for compatibility with
4389 * earlier versions of Windows. In the Win32 application programming
4390 * interface (API) it just calls the GetOEMCP function.
4391 * Parameters:
4392 * Variables :
4393 * Result : If the function succeeds, the return value is an OEM code-page
4394 * identifier, or it is the default identifier if the registry
4395 * value is not readable. For a list of OEM code-page identifiers,
4396 * see GetOEMCP.
4397 * Remark :
4398 * Status : UNTESTED
4399 *
4400 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4401 *****************************************************************************/
4402
4403UINT WIN32API GetKBCodePage(VOID)
4404{
4405 return (GetOEMCP());
4406}
4407
4408
4409/*****************************************************************************
4410 * Name : BOOL WIN32API GetKeyboardLayoutNameA
4411 * Purpose : The GetKeyboardLayoutName function retrieves the name of the
4412 * active keyboard layout.
4413 * Parameters: LPTSTR pwszKLID address of buffer for layout name
4414 * Variables :
4415 * Result : If the function succeeds, the return value is TRUE.
4416 * If the function fails, the return value is FALSE. To get extended
4417 * error information, call GetLastError.
4418 * Remark :
4419 * Status : UNTESTED STUB
4420 *
4421 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4422 *****************************************************************************/
4423
4424BOOL WIN32API GetKeyboardLayoutNameA(LPTSTR pwszKLID)
4425{
4426 dprintf(("USER32:GetKeyboardLayoutNameA (%08x) not implemented.",
4427 pwszKLID));
4428
4429 return(FALSE);
4430}
4431
4432
4433/*****************************************************************************
4434 * Name : BOOL WIN32API GetKeyboardLayoutNameW
4435 * Purpose : The GetKeyboardLayoutName function retrieves the name of the
4436 * active keyboard layout.
4437 * Parameters: LPTSTR pwszKLID address of buffer for layout name
4438 * Variables :
4439 * Result : If the function succeeds, the return value is TRUE.
4440 * If the function fails, the return value is FALSE. To get extended
4441 * error information, call GetLastError.
4442 * Remark :
4443 * Status : UNTESTED STUB
4444 *
4445 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4446 *****************************************************************************/
4447
4448BOOL WIN32API GetKeyboardLayoutNameW(LPWSTR pwszKLID)
4449{
4450 dprintf(("USER32:GetKeyboardLayoutNameW (%08x) not implemented.",
4451 pwszKLID));
4452
4453 return(FALSE);
4454}
4455
4456
4457
4458
4459/*****************************************************************************
4460 * Name : HWINSTA WIN32API GetProcessWindowStation
4461 * Purpose : The GetProcessWindowStation function returns a handle of the
4462 * window station associated with the calling process.
4463 * Parameters:
4464 * Variables :
4465 * Result : If the function succeeds, the return value is a handle of the
4466 * window station associated with the calling process.
4467 * If the function fails, the return value is NULL. This can occur
4468 * if the calling process is not an application written for Windows
4469 * NT. To get extended error information, call GetLastError.
4470 * Remark :
4471 * Status : UNTESTED STUB
4472 *
4473 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4474 *****************************************************************************/
4475
4476HWINSTA WIN32API GetProcessWindowStation(VOID)
4477{
4478 dprintf(("USER32:GetProcessWindowStation () not implemented.\n"));
4479
4480 return (NULL);
4481}
4482
4483
4484
4485/*****************************************************************************
4486 * Name : HDESK WIN32API GetThreadDesktop
4487 * Purpose : The GetThreadDesktop function returns a handle to the desktop
4488 * associated with a specified thread.
4489 * Parameters: DWORD dwThreadId thread identifier
4490 * Variables :
4491 * Result : If the function succeeds, the return value is the handle of the
4492 * desktop associated with the specified thread.
4493 * Remark :
4494 * Status : UNTESTED STUB
4495 *
4496 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4497 *****************************************************************************/
4498
4499HDESK WIN32API GetThreadDesktop(DWORD dwThreadId)
4500{
4501 dprintf(("USER32:GetThreadDesktop (%u) not implemented.\n",
4502 dwThreadId));
4503
4504 return (NULL);
4505}
4506
4507
4508/*****************************************************************************
4509 * Name : BOOL WIN32API GetUserObjectInformationA
4510 * Purpose : The GetUserObjectInformation function returns information about
4511 * a window station or desktop object.
4512 * Parameters: HANDLE hObj handle of object to get information for
4513 * int nIndex type of information to get
4514 * PVOID pvInfo points to buffer that receives the information
4515 * DWORD nLength size, in bytes, of pvInfo buffer
4516 * LPDWORD lpnLengthNeeded receives required size, in bytes, of pvInfo buffer
4517 * Variables :
4518 * Result : If the function succeeds, the return value is TRUE.
4519 * If the function fails, the return value is FALSE. To get extended
4520 * error information, call GetLastError.
4521 * Remark :
4522 * Status : UNTESTED STUB
4523 *
4524 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4525 *****************************************************************************/
4526
4527BOOL WIN32API GetUserObjectInformationA(HANDLE hObj,
4528 int nIndex,
4529 PVOID pvInfo,
4530 DWORD nLength,
4531 LPDWORD lpnLengthNeeded)
4532{
4533 dprintf(("USER32:GetUserObjectInformationA (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
4534 hObj,
4535 nIndex,
4536 pvInfo,
4537 nLength,
4538 lpnLengthNeeded));
4539
4540 return (FALSE);
4541}
4542
4543
4544/*****************************************************************************
4545 * Name : BOOL WIN32API GetUserObjectInformationW
4546 * Purpose : The GetUserObjectInformation function returns information about
4547 * a window station or desktop object.
4548 * Parameters: HANDLE hObj handle of object to get information for
4549 * int nIndex type of information to get
4550 * PVOID pvInfo points to buffer that receives the information
4551 * DWORD nLength size, in bytes, of pvInfo buffer
4552 * LPDWORD lpnLengthNeeded receives required size, in bytes, of pvInfo buffer
4553 * Variables :
4554 * Result : If the function succeeds, the return value is TRUE.
4555 * If the function fails, the return value is FALSE. To get extended
4556 * error information, call GetLastError.
4557 * Remark :
4558 * Status : UNTESTED STUB
4559 *
4560 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4561 *****************************************************************************/
4562
4563BOOL WIN32API GetUserObjectInformationW(HANDLE hObj,
4564 int nIndex,
4565 PVOID pvInfo,
4566 DWORD nLength,
4567 LPDWORD lpnLengthNeeded)
4568{
4569 dprintf(("USER32:GetUserObjectInformationW (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
4570 hObj,
4571 nIndex,
4572 pvInfo,
4573 nLength,
4574 lpnLengthNeeded));
4575
4576 return (FALSE);
4577}
4578
4579
4580/*****************************************************************************
4581 * Name : BOOL WIN32API GetUserObjectSecurity
4582 * Purpose : The GetUserObjectSecurity function retrieves security information
4583 * for the specified user object.
4584 * Parameters: HANDLE hObj handle of user object
4585 * SECURITY_INFORMATION * pSIRequested address of requested security information
4586 * LPSECURITY_DESCRIPTOR pSID address of security descriptor
4587 * DWORD nLength size of buffer for security descriptor
4588 * LPDWORD lpnLengthNeeded address of required size of buffer
4589 * Variables :
4590 * Result : If the function succeeds, the return value is TRUE.
4591 * If the function fails, the return value is FALSE. To get extended
4592 * error information, call GetLastError.
4593 * Remark :
4594 * Status : UNTESTED STUB
4595 *
4596 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4597 *****************************************************************************/
4598
4599BOOL WIN32API GetUserObjectSecurity(HANDLE hObj,
4600 SECURITY_INFORMATION * pSIRequested,
4601 LPSECURITY_DESCRIPTOR pSID,
4602 DWORD nLength,
4603 LPDWORD lpnLengthNeeded)
4604{
4605 dprintf(("USER32:GetUserObjectSecurity (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
4606 hObj,
4607 pSIRequested,
4608 pSID,
4609 nLength,
4610 lpnLengthNeeded));
4611
4612 return (FALSE);
4613}
4614
4615
4616
4617/*****************************************************************************
4618 * Name : int WIN32API GetWindowRgn
4619 * Purpose : The GetWindowRgn function obtains a copy of the window region of a window.
4620 * Parameters: HWND hWnd handle to window whose window region is to be obtained
4621 * HRGN hRgn handle to region that receives a copy of the window region
4622 * Variables :
4623 * Result : NULLREGION, SIMPLEREGION, COMPLEXREGION, ERROR
4624 * Remark :
4625 * Status : UNTESTED STUB
4626 *
4627 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4628 *****************************************************************************/
4629
4630int WIN32API GetWindowRgn (HWND hWnd,
4631 HRGN hRgn)
4632{
4633 dprintf(("USER32:GetWindowRgn (%08xh,%08x) not implemented.\n",
4634 hWnd,
4635 hRgn));
4636
4637 return (NULLREGION);
4638}
4639
4640
4641
4642/*****************************************************************************
4643 * Name : HCURSOR WIN32API LoadCursorFromFileA
4644 * Purpose : The LoadCursorFromFile function creates a cursor based on data
4645 * contained in a file. The file is specified by its name or by a
4646 * system cursor identifier. The function returns a handle to the
4647 * newly created cursor. Files containing cursor data may be in
4648 * either cursor (.CUR) or animated cursor (.ANI) format.
4649 * Parameters: LPCTSTR lpFileName pointer to cursor file, or system cursor id
4650 * Variables :
4651 * Result : If the function is successful, the return value is a handle to
4652 * the new cursor.
4653 * If the function fails, the return value is NULL. To get extended
4654 * error information, call GetLastError. GetLastError may return
4655 * the following
4656 * Remark :
4657 * Status : UNTESTED STUB
4658 *
4659 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4660 *****************************************************************************/
4661
4662HCURSOR WIN32API LoadCursorFromFileA(LPCTSTR lpFileName)
4663{
4664 dprintf(("USER32:LoadCursorFromFileA (%s) not implemented.\n",
4665 lpFileName));
4666
4667 return (NULL);
4668}
4669
4670
4671/*****************************************************************************
4672 * Name : HCURSOR WIN32API LoadCursorFromFileW
4673 * Purpose : The LoadCursorFromFile function creates a cursor based on data
4674 * contained in a file. The file is specified by its name or by a
4675 * system cursor identifier. The function returns a handle to the
4676 * newly created cursor. Files containing cursor data may be in
4677 * either cursor (.CUR) or animated cursor (.ANI) format.
4678 * Parameters: LPCTSTR lpFileName pointer to cursor file, or system cursor id
4679 * Variables :
4680 * Result : If the function is successful, the return value is a handle to
4681 * the new cursor.
4682 * If the function fails, the return value is NULL. To get extended
4683 * error information, call GetLastError. GetLastError may return
4684 * the following
4685 * Remark :
4686 * Status : UNTESTED STUB
4687 *
4688 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4689 *****************************************************************************/
4690
4691HCURSOR WIN32API LoadCursorFromFileW(LPCWSTR lpFileName)
4692{
4693 dprintf(("USER32:LoadCursorFromFileW (%s) not implemented.\n",
4694 lpFileName));
4695
4696 return (NULL);
4697}
4698
4699
4700/*****************************************************************************
4701 * Name : HLK WIN32API LoadKeyboardLayoutA
4702 * Purpose : The LoadKeyboardLayout function loads a new keyboard layout into
4703 * the system. Several keyboard layouts can be loaded at a time, but
4704 * only one per process is active at a time. Loading multiple keyboard
4705 * layouts makes it possible to rapidly switch between layouts.
4706 * Parameters:
4707 * Variables :
4708 * Result : If the function succeeds, the return value is the handle of the
4709 * keyboard layout.
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
4718HKL WIN32API LoadKeyboardLayoutA(LPCTSTR pwszKLID,
4719 UINT Flags)
4720{
4721 dprintf(("USER32:LeadKeyboardLayoutA (%s,%u) not implemented.\n",
4722 pwszKLID,
4723 Flags));
4724
4725 return (NULL);
4726}
4727
4728
4729/*****************************************************************************
4730 * Name : HLK WIN32API LoadKeyboardLayoutW
4731 * Purpose : The LoadKeyboardLayout function loads a new keyboard layout into
4732 * the system. Several keyboard layouts can be loaded at a time, but
4733 * only one per process is active at a time. Loading multiple keyboard
4734 * layouts makes it possible to rapidly switch between layouts.
4735 * Parameters:
4736 * Variables :
4737 * Result : If the function succeeds, the return value is the handle of the
4738 * keyboard layout.
4739 * If the function fails, the return value is NULL. To get extended
4740 * error information, call GetLastError.
4741 * Remark :
4742 * Status : UNTESTED STUB
4743 *
4744 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4745 *****************************************************************************/
4746
4747HKL WIN32API LoadKeyboardLayoutW(LPCWSTR pwszKLID,
4748 UINT Flags)
4749{
4750 dprintf(("USER32:LeadKeyboardLayoutW (%s,%u) not implemented.\n",
4751 pwszKLID,
4752 Flags));
4753
4754 return (NULL);
4755}
4756
4757
4758/*****************************************************************************
4759 * Name : UINT WIN32API MapVirtualKeyExA
4760 * Purpose : The MapVirtualKeyEx function translates (maps) a virtual-key
4761 * code into a scan code or character value, or translates a scan
4762 * code into a virtual-key code. The function translates the codes
4763 * using the input language and physical keyboard layout identified
4764 * by the given keyboard layout handle.
4765 * Parameters:
4766 * Variables :
4767 * Result : The return value is either a scan code, a virtual-key code, or
4768 * a character value, depending on the value of uCode and uMapType.
4769 * If there is no translation, the return value is zero.
4770 * Remark :
4771 * Status : UNTESTED STUB
4772 *
4773 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4774 *****************************************************************************/
4775
4776UINT WIN32API MapVirtualKeyExA(UINT uCode,
4777 UINT uMapType,
4778 HKL dwhkl)
4779{
4780 dprintf(("USER32:MapVirtualKeyExA (%u,%u,%08x) not implemented.\n",
4781 uCode,
4782 uMapType,
4783 dwhkl));
4784
4785 return (0);
4786}
4787
4788
4789/*****************************************************************************
4790 * Name : UINT WIN32API MapVirtualKeyExW
4791 * Purpose : The MapVirtualKeyEx function translates (maps) a virtual-key
4792 * code into a scan code or character value, or translates a scan
4793 * code into a virtual-key code. The function translates the codes
4794 * using the input language and physical keyboard layout identified
4795 * by the given keyboard layout handle.
4796 * Parameters:
4797 * Variables :
4798 * Result : The return value is either a scan code, a virtual-key code, or
4799 * a character value, depending on the value of uCode and uMapType.
4800 * If there is no translation, the return value is zero.
4801 * Remark :
4802 * Status : UNTESTED STUB
4803
4804 *
4805 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4806 *****************************************************************************/
4807
4808UINT WIN32API MapVirtualKeyExW(UINT uCode,
4809 UINT uMapType,
4810 HKL dwhkl)
4811{
4812 dprintf(("USER32:MapVirtualKeyExW (%u,%u,%08x) not implemented.\n",
4813 uCode,
4814 uMapType,
4815 dwhkl));
4816
4817 return (0);
4818}
4819
4820
4821/*****************************************************************************
4822 * Name : int WIN32API MessageBoxExA
4823 * Purpose : The MessageBoxEx function creates, displays, and operates a message box.
4824 * Parameters: HWND hWnd handle of owner window
4825 * LPCTSTR lpText address of text in message box
4826 * LPCTSTR lpCaption address of title of message box
4827 * UINT uType style of message box
4828 * WORD wLanguageId language identifier
4829 * Variables :
4830 * Result : If the function succeeds, the return value is a nonzero menu-item
4831 * value returned by the dialog box.
4832 * Remark :
4833 * Status : UNTESTED STUB
4834 *
4835 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4836 *****************************************************************************/
4837
4838int WIN32API MessageBoxExA(HWND hWnd,
4839 LPCTSTR lpText,
4840 LPCTSTR lpCaption,
4841 UINT uType,
4842 WORD wLanguageId)
4843{
4844 dprintf(("USER32:MessageBoxExA (%08xh,%s,%s,%u,%08w) not implemented.\n",
4845 hWnd,
4846 lpText,
4847 lpCaption,
4848 uType,
4849 wLanguageId));
4850
4851 return (MessageBoxA(hWnd,
4852 lpText,
4853 lpCaption,
4854 uType));
4855}
4856
4857
4858/*****************************************************************************
4859 * Name : int WIN32API MessageBoxExW
4860 * Purpose : The MessageBoxEx function creates, displays, and operates a message box.
4861 * Parameters: HWND hWnd handle of owner window
4862 * LPCTSTR lpText address of text in message box
4863 * LPCTSTR lpCaption address of title of message box
4864 * UINT uType style of message box
4865 * WORD wLanguageId language identifier
4866 * Variables :
4867 * Result : If the function succeeds, the return value is a nonzero menu-item
4868 * value returned by the dialog box.
4869 * Remark :
4870 * Status : UNTESTED STUB
4871 *
4872 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4873 *****************************************************************************/
4874
4875int WIN32API MessageBoxExW(HWND hWnd,
4876 LPCWSTR lpText,
4877 LPCWSTR lpCaption,
4878 UINT uType,
4879 WORD wLanguageId)
4880{
4881
4882 dprintf(("USER32:MessageBoxExW (%08xh,%x,%x,%u,%08w) not implemented.\n",
4883 hWnd,
4884 lpText,
4885 lpCaption,
4886 uType,
4887 wLanguageId));
4888
4889 return MessageBoxW(hWnd, lpText, lpCaption, uType);
4890}
4891
4892
4893/*****************************************************************************
4894 * Name : BOOL WIN32API MessageBoxIndirectW
4895 * Purpose : The MessageBoxIndirect function creates, displays, and operates
4896 * a message box. The message box contains application-defined
4897 * message text and title, any icon, and any combination of
4898 * predefined push buttons.
4899 * Parameters:
4900 * Variables :
4901 * Result :
4902 * Remark :
4903 * Status : UNTESTED STUB
4904 *
4905 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4906 *****************************************************************************/
4907
4908BOOL WIN32API MessageBoxIndirectW(LPMSGBOXPARAMSW lpMsgBoxParams)
4909{
4910 dprintf(("USER32:MessageBoxIndirectW (%08x) not implemented.\n",
4911 lpMsgBoxParams));
4912
4913 return (FALSE);
4914}
4915
4916
4917/*****************************************************************************
4918 * Name : BOOL WIN32API MessageBoxIndirectA
4919 * Purpose : The MessageBoxIndirect function creates, displays, and operates
4920 * a message box. The message box contains application-defined
4921 * message text and title, any icon, and any combination of
4922 * predefined push buttons.
4923 * Parameters:
4924 * Variables :
4925 * Result :
4926 * Remark :
4927 * Status : UNTESTED STUB
4928 *
4929 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4930 *****************************************************************************/
4931
4932BOOL WIN32API MessageBoxIndirectA(LPMSGBOXPARAMSA lpMsgBoxParams)
4933{
4934 dprintf(("USER32:MessageBoxIndirectA (%08x) not implemented.\n",
4935 lpMsgBoxParams));
4936
4937 return (FALSE);
4938}
4939
4940
4941/*****************************************************************************
4942 * Name : DWORD WIN32API OemKeyScan
4943 * Purpose : The OemKeyScan function maps OEM ASCII codes 0 through 0x0FF
4944 * into the OEM scan codes and shift states. The function provides
4945 * information that allows a program to send OEM text to another
4946 * program by simulating keyboard input.
4947 * Parameters:
4948 * Variables :
4949 * Result :
4950 * Remark :
4951 * Status : UNTESTED STUB
4952 *
4953 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4954 *****************************************************************************/
4955
4956DWORD WIN32API OemKeyScan(WORD wOemChar)
4957{
4958 dprintf(("USER32:OemKeyScan (%u) not implemented.\n",
4959 wOemChar));
4960
4961 return (wOemChar);
4962}
4963
4964
4965/*****************************************************************************
4966 * Name : HDESK WIN32API OpenDesktopA
4967 * Purpose : The OpenDesktop function returns a handle to an existing desktop.
4968 * A desktop is a secure object contained within a window station
4969 * object. A desktop has a logical display surface and contains
4970 * windows, menus and hooks.
4971 * Parameters: LPCTSTR lpszDesktopName name of the desktop to open
4972 * DWORD dwFlags flags to control interaction with other applications
4973 * BOOL fInherit specifies whether returned handle is inheritable
4974 * DWORD dwDesiredAccess specifies access of returned handle
4975 * Variables :
4976 * Result : If the function succeeds, the return value is the handle to the
4977 * opened desktop.
4978 * If the function fails, the return value is NULL. To get extended
4979 * error information, call GetLastError.
4980 * Remark :
4981 * Status : UNTESTED STUB
4982 *
4983 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4984 *****************************************************************************/
4985
4986HDESK WIN32API OpenDesktopA(LPCTSTR lpszDesktopName,
4987 DWORD dwFlags,
4988 BOOL fInherit,
4989 DWORD dwDesiredAccess)
4990{
4991 dprintf(("USER32:OpenDesktopA (%s,%08xh,%08xh,%08x) not implemented.\n",
4992 lpszDesktopName,
4993 dwFlags,
4994 fInherit,
4995 dwDesiredAccess));
4996
4997 return (NULL);
4998}
4999
5000
5001/*****************************************************************************
5002 * Name : HDESK WIN32API OpenDesktopW
5003 * Purpose : The OpenDesktop function returns a handle to an existing desktop.
5004 * A desktop is a secure object contained within a window station
5005 * object. A desktop has a logical display surface and contains
5006 * windows, menus and hooks.
5007 * Parameters: LPCTSTR lpszDesktopName name of the desktop to open
5008 * DWORD dwFlags flags to control interaction with other applications
5009 * BOOL fInherit specifies whether returned handle is inheritable
5010 * DWORD dwDesiredAccess specifies access of returned handle
5011 * Variables :
5012 * Result : If the function succeeds, the return value is the handle to the
5013 * opened desktop.
5014 * If the function fails, the return value is NULL. To get extended
5015 * error information, call GetLastError.
5016 * Remark :
5017 * Status : UNTESTED STUB
5018 *
5019 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5020 *****************************************************************************/
5021
5022HDESK WIN32API OpenDesktopW(LPCTSTR lpszDesktopName,
5023 DWORD dwFlags,
5024 BOOL fInherit,
5025 DWORD dwDesiredAccess)
5026{
5027 dprintf(("USER32:OpenDesktopW (%s,%08xh,%08xh,%08x) not implemented.\n",
5028 lpszDesktopName,
5029 dwFlags,
5030 fInherit,
5031 dwDesiredAccess));
5032
5033 return (NULL);
5034}
5035
5036
5037/*****************************************************************************
5038 * Name : HDESK WIN32API OpenInputDesktop
5039 * Purpose : The OpenInputDesktop function returns a handle to the desktop
5040 * that receives user input. The input desktop is a desktop on the
5041 * window station associated with the logged-on user.
5042 * Parameters: DWORD dwFlags flags to control interaction with other applications
5043 * BOOL fInherit specifies whether returned handle is inheritable
5044 * DWORD dwDesiredAccess specifies access of returned handle
5045 * Variables :
5046 * Result : If the function succeeds, the return value is a handle of the
5047 * desktop that receives user input.
5048 * If the function fails, the return value is NULL. To get extended
5049 * error information, call GetLastError.
5050 * Remark :
5051 * Status : UNTESTED STUB
5052 *
5053 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5054 *****************************************************************************/
5055
5056HDESK WIN32API OpenInputDesktop(DWORD dwFlags,
5057 BOOL fInherit,
5058 DWORD dwDesiredAccess)
5059{
5060 dprintf(("USER32:OpenInputDesktop (%08xh,%08xh,%08x) not implemented.\n",
5061 dwFlags,
5062 fInherit,
5063 dwDesiredAccess));
5064
5065 return (NULL);
5066}
5067
5068
5069/*****************************************************************************
5070 * Name : HWINSTA WIN32API OpenWindowStationA
5071 * Purpose : The OpenWindowStation function returns a handle to an existing
5072 * window station.
5073 * Parameters: LPCTSTR lpszWinStaName name of the window station to open
5074 * BOOL fInherit specifies whether returned handle is inheritable
5075 * DWORD dwDesiredAccess specifies access of returned handle
5076 * Variables :
5077 * Result : If the function succeeds, the return value is the handle to the
5078 * specified window station.
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
5087HWINSTA WIN32API OpenWindowStationA(LPCTSTR lpszWinStaName,
5088 BOOL fInherit,
5089 DWORD dwDesiredAccess)
5090{
5091 dprintf(("USER32:OpenWindowStatieonA (%s,%08xh,%08x) not implemented.\n",
5092 lpszWinStaName,
5093 fInherit,
5094 dwDesiredAccess));
5095
5096 return (NULL);
5097}
5098
5099
5100/*****************************************************************************
5101 * Name : HWINSTA WIN32API OpenWindowStationW
5102 * Purpose : The OpenWindowStation function returns a handle to an existing
5103 * window station.
5104 * Parameters: LPCTSTR lpszWinStaName name of the window station to open
5105 * BOOL fInherit specifies whether returned handle is inheritable
5106 * DWORD dwDesiredAccess specifies access of returned handle
5107 * Variables :
5108 * Result : If the function succeeds, the return value is the handle to the
5109 * specified window station.
5110 * If the function fails, the return value is NULL. To get extended
5111 * error information, call GetLastError.
5112
5113
5114 * Remark :
5115 * Status : UNTESTED STUB
5116 *
5117 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5118 *****************************************************************************/
5119
5120HWINSTA WIN32API OpenWindowStationW(LPCTSTR lpszWinStaName,
5121 BOOL fInherit,
5122 DWORD dwDesiredAccess)
5123{
5124 dprintf(("USER32:OpenWindowStatieonW (%s,%08xh,%08x) not implemented.\n",
5125 lpszWinStaName,
5126 fInherit,
5127 dwDesiredAccess));
5128
5129 return (NULL);
5130}
5131
5132
5133/*****************************************************************************
5134 * Name : BOOL WIN32API PaintDesktop
5135 * Purpose : The PaintDesktop function fills the clipping region in the
5136 * specified device context with the desktop pattern or wallpaper.
5137 * The function is provided primarily for shell desktops.
5138 * Parameters:
5139 * Variables :
5140 * Result : If the function succeeds, the return value is TRUE.
5141 * If the function fails, the return value is FALSE.
5142 * Remark :
5143 * Status : UNTESTED STUB
5144 *
5145 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5146 *****************************************************************************/
5147
5148BOOL WIN32API PaintDesktop(HDC hdc)
5149{
5150 dprintf(("USER32:PaintDesktop (%08x) not implemented.\n",
5151 hdc));
5152
5153 return (FALSE);
5154}
5155
5156
5157/*****************************************************************************
5158 * Name : BOOL WIN32API SendMessageCallbackA
5159 * Purpose : The SendMessageCallback function sends the specified message to
5160 * a window or windows. The function calls the window procedure for
5161 * the specified window and returns immediately. After the window
5162 * procedure processes the message, the system calls the specified
5163 * callback function, passing the result of the message processing
5164 * and an application-defined value to the callback function.
5165 * Parameters: HWND hwnd handle of destination window
5166 * UINT uMsg message to send
5167 * WPARAM wParam first message parameter
5168 * LPARAM lParam second message parameter
5169 * SENDASYNCPROC lpResultCallBack function to receive message value
5170 * DWORD dwData value to pass to callback function
5171 * Variables :
5172 * Result : If the function succeeds, the return value is TRUE.
5173 * If the function fails, the return value is FALSE. To get extended
5174 * error information, call GetLastError.
5175 * Remark :
5176 * Status : UNTESTED STUB
5177 *
5178 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5179 *****************************************************************************/
5180
5181BOOL WIN32API SendMessageCallbackA(HWND hWnd,
5182 UINT uMsg,
5183 WPARAM wParam,
5184 LPARAM lParam,
5185 SENDASYNCPROC lpResultCallBack,
5186 DWORD dwData)
5187{
5188 dprintf(("USER32:SendMessageCallBackA (%08xh,%08xh,%08xh,%08xh,%08xh,%08x) not implemented.\n",
5189 hWnd,
5190 uMsg,
5191 wParam,
5192 lParam,
5193 lpResultCallBack,
5194 dwData));
5195
5196 return (FALSE);
5197}
5198
5199
5200/*****************************************************************************
5201 * Name : BOOL WIN32API SendMessageCallbackW
5202 * Purpose : The SendMessageCallback function sends the specified message to
5203 * a window or windows. The function calls the window procedure for
5204 * the specified window and returns immediately. After the window
5205 * procedure processes the message, the system calls the specified
5206 * callback function, passing the result of the message processing
5207 * and an application-defined value to the callback function.
5208 * Parameters: HWND hwnd handle of destination window
5209 * UINT uMsg message to send
5210 * WPARAM wParam first message parameter
5211 * LPARAM lParam second message parameter
5212 * SENDASYNCPROC lpResultCallBack function to receive message value
5213 * DWORD dwData value to pass to callback function
5214 * Variables :
5215 * Result : If the function succeeds, the return value is TRUE.
5216 * If the function fails, the return value is FALSE. To get extended
5217 * error information, call GetLastError.
5218 * Remark :
5219 * Status : UNTESTED STUB
5220 *
5221 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5222 *****************************************************************************/
5223
5224BOOL WIN32API SendMessageCallbackW(HWND hWnd,
5225 UINT uMsg,
5226 WPARAM wParam,
5227 LPARAM lParam,
5228 SENDASYNCPROC lpResultCallBack,
5229 DWORD dwData)
5230{
5231 dprintf(("USER32:SendMessageCallBackW (%08xh,%08xh,%08xh,%08xh,%08xh,%08x) not implemented.\n",
5232 hWnd,
5233 uMsg,
5234 wParam,
5235 lParam,
5236 lpResultCallBack,
5237 dwData));
5238
5239 return (FALSE);
5240}
5241
5242
5243/*****************************************************************************
5244 * Name : VOID WIN32API SetDebugErrorLevel
5245 * Purpose : The SetDebugErrorLevel function sets the minimum error level at
5246 * which Windows will generate debugging events and pass them to a debugger.
5247 * Parameters: DWORD dwLevel debugging error level
5248 * Variables :
5249 * Result :
5250 * Remark :
5251 * Status : UNTESTED STUB
5252 *
5253 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5254 *****************************************************************************/
5255
5256VOID WIN32API SetDebugErrorLevel(DWORD dwLevel)
5257{
5258 dprintf(("USER32:SetDebugErrorLevel (%08x) not implemented.\n",
5259 dwLevel));
5260}
5261
5262
5263/*****************************************************************************
5264 * Name : BOOL WIN32API SetProcessWindowStation
5265 * Purpose : The SetProcessWindowStation function assigns a window station
5266 * to the calling process. This enables the process to access
5267 * objects in the window station such as desktops, the clipboard,
5268 * and global atoms. All subsequent operations on the window station
5269 * use the access rights granted to hWinSta.
5270 * Parameters:
5271 * Variables :
5272 * Result : If the function succeeds, the return value is TRUE.
5273 * If the function fails, the return value is FALSE. To get extended
5274 * error information, call GetLastError.
5275 * Remark :
5276 * Status : UNTESTED STUB
5277 *
5278 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5279 *****************************************************************************/
5280
5281BOOL WIN32API SetProcessWindowStation(HWINSTA hWinSta)
5282{
5283 dprintf(("USER32:SetProcessWindowStation (%08x) not implemented.\n",
5284 hWinSta));
5285
5286 return (FALSE);
5287}
5288
5289
5290/*****************************************************************************
5291 * Name : BOOL WIN32API SetSystemCursor
5292 * Purpose : The SetSystemCursor function replaces the contents of the system
5293 * cursor specified by dwCursorId with the contents of the cursor
5294 * specified by hCursor, and then destroys hCursor. This function
5295 * lets an application customize the system cursors.
5296 * Parameters: HCURSOR hCursor set specified system cursor to this cursor's
5297 * contents, then destroy this
5298 * DWORD dwCursorID system cursor specified by its identifier
5299 * Variables :
5300 * Result : If the function succeeds, the return value is TRUE.
5301 * If the function fails, the return value is FALSE. To get extended
5302 * error information, call GetLastError.
5303 * Remark :
5304 * Status : UNTESTED STUB
5305 *
5306 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5307 *****************************************************************************/
5308
5309BOOL WIN32API SetSystemCursor(HCURSOR hCursor,
5310 DWORD dwCursorId)
5311{
5312 dprintf(("USER32:SetSystemCursor (%08xh,%08x) not implemented.\n",
5313 hCursor,
5314 dwCursorId));
5315
5316 return (FALSE);
5317}
5318
5319
5320/*****************************************************************************
5321 * Name : BOOL WIN32API SetThreadDesktop
5322 * Purpose : The SetThreadDesktop function assigns a desktop to the calling
5323 * thread. All subsequent operations on the desktop use the access
5324 * rights granted to hDesk.
5325 * Parameters: HDESK hDesk handle of the desktop to assign to this thread
5326 * Variables :
5327 * Result : If the function succeeds, the return value is TRUE.
5328 * If the function fails, the return value is FALSE. To get extended
5329 * error information, call GetLastError.
5330 * Remark :
5331 * Status : UNTESTED STUB
5332 *
5333 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5334 *****************************************************************************/
5335
5336BOOL WIN32API SetThreadDesktop(HDESK hDesktop)
5337{
5338 dprintf(("USER32:SetThreadDesktop (%08x) not implemented.\n",
5339 hDesktop));
5340
5341 return (FALSE);
5342}
5343
5344
5345/*****************************************************************************
5346 * Name : BOOL WIN32API SetUserObjectInformationA
5347 * Purpose : The SetUserObjectInformation function sets information about a
5348 * window station or desktop object.
5349 * Parameters: HANDLE hObject handle of the object for which to set information
5350 * int nIndex type of information to set
5351 * PVOID lpvInfo points to a buffer that contains the information
5352 * DWORD cbInfo size, in bytes, of lpvInfo buffer
5353 * Variables :
5354 * Result : If the function succeeds, the return value is TRUE.
5355 * If the function fails the return value is FALSE. To get extended
5356 * error information, call GetLastError.
5357 * Remark :
5358 * Status : UNTESTED STUB
5359 *
5360 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5361 *****************************************************************************/
5362
5363BOOL WIN32API SetUserObjectInformationA(HANDLE hObject,
5364 int nIndex,
5365 PVOID lpvInfo,
5366 DWORD cbInfo)
5367{
5368 dprintf(("USER32:SetUserObjectInformationA (%08xh,%u,%08xh,%08x) not implemented.\n",
5369 hObject,
5370 nIndex,
5371 lpvInfo,
5372 cbInfo));
5373
5374 return (FALSE);
5375}
5376
5377
5378/*****************************************************************************
5379 * Name : BOOL WIN32API SetUserObjectInformationW
5380 * Purpose : The SetUserObjectInformation function sets information about a
5381 * window station or desktop object.
5382 * Parameters: HANDLE hObject handle of the object for which to set information
5383 * int nIndex type of information to set
5384 * PVOID lpvInfo points to a buffer that contains the information
5385 * DWORD cbInfo size, in bytes, of lpvInfo buffer
5386 * Variables :
5387 * Result : If the function succeeds, the return value is TRUE.
5388 * If the function fails the return value is FALSE. To get extended
5389 * error information, call GetLastError.
5390 * Remark :
5391 * Status : UNTESTED STUB
5392 *
5393 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5394 *****************************************************************************/
5395
5396BOOL WIN32API SetUserObjectInformationW(HANDLE hObject,
5397 int nIndex,
5398 PVOID lpvInfo,
5399 DWORD cbInfo)
5400{
5401 dprintf(("USER32:SetUserObjectInformationW (%08xh,%u,%08xh,%08x) not implemented.\n",
5402 hObject,
5403 nIndex,
5404 lpvInfo,
5405 cbInfo));
5406
5407 return (FALSE);
5408}
5409
5410
5411/*****************************************************************************
5412 * Name : BOOL WIN32API SetUserObjectSecurity
5413 * Purpose : The SetUserObjectSecurity function sets the security of a user
5414 * object. This can be, for example, a window or a DDE conversation
5415 * Parameters: HANDLE hObject handle of user object
5416 * SECURITY_INFORMATION * psi address of security information
5417 * LPSECURITY_DESCRIPTOR psd address of security descriptor
5418 * Variables :
5419 * Result : If the function succeeds, the return value is TRUE.
5420 * If the function fails, the return value is FALSE. To get extended
5421 * error information, call GetLastError.
5422 * Remark :
5423 * Status : UNTESTED STUB
5424 *
5425 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5426 *****************************************************************************/
5427
5428BOOL WIN32API SetUserObjectSecurity(HANDLE hObject,
5429 SECURITY_INFORMATION * psi,
5430 LPSECURITY_DESCRIPTOR psd)
5431{
5432 dprintf(("USER32:SetUserObjectSecuroty (%08xh,%08xh,%08x) not implemented.\n",
5433 hObject,
5434 psi,
5435 psd));
5436
5437 return (FALSE);
5438}
5439
5440
5441/*****************************************************************************
5442 * Name : int WIN32API SetWindowRgn
5443 * Purpose : The SetWindowRgn function sets the window region of a window. The
5444 * window region determines the area within the window where the
5445 * operating system permits drawing. The operating system does not
5446 * display any portion of a window that lies outside of the window region
5447 * Parameters: HWND hWnd handle to window whose window region is to be set
5448 * HRGN hRgn handle to region
5449 * BOOL bRedraw window redraw flag
5450 * Variables :
5451 * Result : If the function succeeds, the return value is non-zero.
5452 * If the function fails, the return value is zero.
5453 * Remark :
5454 * Status : UNTESTED STUB
5455 *
5456 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5457 *****************************************************************************/
5458
5459int WIN32API SetWindowRgn(HWND hWnd,
5460 HRGN hRgn,
5461 BOOL bRedraw)
5462{
5463 dprintf(("USER32:SetWindowRgn (%08xh,%08xh,%u) not implemented.\n",
5464 hWnd,
5465 hRgn,
5466 bRedraw));
5467
5468 return (0);
5469}
5470
5471
5472/*****************************************************************************
5473 * Name : BOOL WIN32API SetWindowsHookW
5474 * Purpose : The SetWindowsHook function is not implemented in the Win32 API.
5475 * Win32-based applications should use the SetWindowsHookEx function.
5476 * Parameters:
5477 * Variables :
5478 * Result :
5479 * Remark : ARGH ! MICROSOFT !
5480 * Status : UNTESTED STUB
5481 *
5482 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5483 *****************************************************************************/
5484
5485HHOOK WIN32API SetWindowsHookW(int nFilterType, HOOKPROC pfnFilterProc)
5486
5487{
5488 return (FALSE);
5489}
5490
5491
5492/*****************************************************************************
5493 * Name : BOOL WIN32API ShowWindowAsync
5494 * Purpose : The ShowWindowAsync function sets the show state of a window
5495 * created by a different thread.
5496 * Parameters: HWND hwnd handle of window
5497 * int nCmdShow show state of window
5498 * Variables :
5499 * Result : If the window was previously visible, the return value is TRUE.
5500 * If the window was previously hidden, the return value is FALSE.
5501 * Remark :
5502 * Status : UNTESTED STUB
5503 *
5504 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5505 *****************************************************************************/
5506
5507BOOL WIN32API ShowWindowAsync (HWND hWnd,
5508 int nCmdShow)
5509{
5510 dprintf(("USER32:ShowWindowAsync (%08xh,%08x) not implemented.\n",
5511 hWnd,
5512 nCmdShow));
5513
5514 return (FALSE);
5515}
5516
5517
5518/*****************************************************************************
5519 * Name : BOOL WIN32API SwitchDesktop
5520 * Purpose : The SwitchDesktop function makes a desktop visible and activates
5521 * it. This enables the desktop to receive input from the user. The
5522 * calling process must have DESKTOP_SWITCHDESKTOP access to the
5523 * desktop for the SwitchDesktop function to succeed.
5524 * Parameters:
5525 * Variables :
5526 * Result : If the function succeeds, the return value is TRUE.
5527 * If the function fails, the return value is FALSE. To get extended
5528 * error information, call GetLastError.
5529 * Remark :
5530 * Status : UNTESTED STUB
5531 *
5532 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5533 *****************************************************************************/
5534
5535BOOL WIN32API SwitchDesktop(HDESK hDesktop)
5536{
5537 dprintf(("USER32:SwitchDesktop (%08x) not implemented.\n",
5538 hDesktop));
5539
5540 return (FALSE);
5541}
5542
5543
5544/*****************************************************************************
5545 * Name : WORD WIN32API TileWindows
5546 * Purpose : The TileWindows function tiles the specified windows, or the child
5547 * windows of the specified parent window.
5548 * Parameters: HWND hwndParent handle of parent window
5549 * WORD wFlags types of windows not to arrange
5550 * LPCRECT lpRect rectangle to arrange windows in
5551 * WORD cChildrenb number of windows to arrange
5552 * const HWND *ahwndChildren array of window handles
5553 * Variables :
5554 * Result : If the function succeeds, the return value is the number of
5555 * windows arranged.
5556 * If the function fails, the return value is zero.
5557 * Remark :
5558 * Status : UNTESTED STUB
5559 *
5560 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5561 *****************************************************************************/
5562
5563WORD WIN32API TileWindows(HWND hwndParent,
5564 UINT wFlags,
5565 const LPRECT lpRect,
5566 UINT cChildrenb,
5567 const HWND *ahwndChildren)
5568{
5569 dprintf(("USER32:TileWindows (%08xh,%08xh,%08xh,%08xh,%08x) not implemented.\n",
5570 hwndParent,
5571 wFlags,
5572 lpRect,
5573 cChildrenb,
5574 ahwndChildren));
5575
5576 return (0);
5577}
5578
5579
5580/*****************************************************************************
5581 * Name : int WIN32API ToAscii
5582 * Purpose : The ToAscii function translates the specified virtual-key code
5583 * and keyboard state to the corresponding Windows character or characters.
5584 * Parameters: UINT uVirtKey virtual-key code
5585 * UINT uScanCode scan code
5586 * PBYTE lpbKeyState address of key-state array
5587 * LPWORD lpwTransKey buffer for translated key
5588 * UINT fuState active-menu flag
5589 * Variables :
5590 * Result : 0 The specified virtual key has no translation for the current
5591 * state of the keyboard.
5592 * 1 One Windows character was copied to the buffer.
5593 * 2 Two characters were copied to the buffer. This usually happens
5594 * when a dead-key character (accent or diacritic) stored in the
5595 * keyboard layout cannot be composed with the specified virtual
5596 * key to form a single character.
5597 * Remark :
5598 * Status : UNTESTED STUB
5599 *
5600 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5601 *****************************************************************************/
5602
5603int WIN32API ToAscii(UINT uVirtKey,
5604 UINT uScanCode,
5605 PBYTE lpbKeyState,
5606 LPWORD lpwTransKey,
5607 UINT fuState)
5608{
5609 dprintf(("USER32:ToAscii (%u,%u,%08xh,%08xh,%u) not implemented.\n",
5610 uVirtKey,
5611 uScanCode,
5612 lpbKeyState,
5613 lpwTransKey,
5614 fuState));
5615
5616 return (0);
5617}
5618
5619
5620/*****************************************************************************
5621 * Name : int WIN32API ToAsciiEx
5622 * Purpose : The ToAscii function translates the specified virtual-key code
5623 * and keyboard state to the corresponding Windows character or characters.
5624 * Parameters: UINT uVirtKey virtual-key code
5625 * UINT uScanCode scan code
5626 * PBYTE lpbKeyState address of key-state array
5627 * LPWORD lpwTransKey buffer for translated key
5628 * UINT fuState active-menu flag
5629 * HLK hlk keyboard layout handle
5630 * Variables :
5631 * Result : 0 The specified virtual key has no translation for the current
5632 * state of the keyboard.
5633 * 1 One Windows character was copied to the buffer.
5634 * 2 Two characters were copied to the buffer. This usually happens
5635 * when a dead-key character (accent or diacritic) stored in the
5636 * keyboard layout cannot be composed with the specified virtual
5637 * key to form a single character.
5638 * Remark :
5639 * Status : UNTESTED STUB
5640 *
5641 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5642 *****************************************************************************/
5643
5644int WIN32API ToAsciiEx(UINT uVirtKey,
5645 UINT uScanCode,
5646 PBYTE lpbKeyState,
5647 LPWORD lpwTransKey,
5648 UINT fuState,
5649 HKL hkl)
5650{
5651 dprintf(("USER32:ToAsciiEx (%u,%u,%08xh,%08xh,%u,%08x) not implemented.\n",
5652 uVirtKey,
5653 uScanCode,
5654 lpbKeyState,
5655 lpwTransKey,
5656 fuState,
5657 hkl));
5658
5659 return (0);
5660}
5661
5662
5663/*****************************************************************************
5664 * Name : int WIN32API ToUnicode
5665 * Purpose : The ToUnicode function translates the specified virtual-key code
5666 * and keyboard state to the corresponding Unicode character or characters.
5667 * Parameters: UINT wVirtKey virtual-key code
5668 * UINT wScanCode scan code
5669 * PBYTE lpKeyState address of key-state array
5670 * LPWSTR pwszBuff buffer for translated key
5671 * int cchBuff size of translated key buffer
5672 * UINT wFlags set of function-conditioning flags
5673 * Variables :
5674 * Result : - 1 The specified virtual key is a dead-key character (accent or
5675 * diacritic). This value is returned regardless of the keyboard
5676 * layout, even if several characters have been typed and are
5677 * stored in the keyboard state. If possible, even with Unicode
5678 * keyboard layouts, the function has written a spacing version of
5679 * the dead-key character to the buffer specified by pwszBuffer.
5680 * For example, the function writes the character SPACING ACUTE
5681 * (0x00B4), rather than the character NON_SPACING ACUTE (0x0301).
5682 * 0 The specified virtual key has no translation for the current
5683 * state of the keyboard. Nothing was written to the buffer
5684 * specified by pwszBuffer.
5685 * 1 One character was written to the buffer specified by pwszBuffer.
5686 * 2 or more Two or more characters were written to the buffer specified by
5687 * pwszBuff. The most common cause for this is that a dead-key
5688 * character (accent or diacritic) stored in the keyboard layout
5689 * could not be combined with the specified virtual key to form a
5690 * single character.
5691 * Remark :
5692 * Status : UNTESTED STUB
5693 *
5694 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5695 *****************************************************************************/
5696
5697int WIN32API ToUnicode(UINT uVirtKey,
5698 UINT uScanCode,
5699 PBYTE lpKeyState,
5700 LPWSTR pwszBuff,
5701 int cchBuff,
5702 UINT wFlags)
5703{
5704 dprintf(("USER32:ToUnicode (%u,%u,%08xh,%08xh,%u,%08x) not implemented.\n",
5705 uVirtKey,
5706 uScanCode,
5707 lpKeyState,
5708 pwszBuff,
5709 cchBuff,
5710 wFlags));
5711
5712 return (0);
5713}
5714
5715
5716/*****************************************************************************
5717 * Name : BOOL WIN32API UnloadKeyboardLayout
5718 * Purpose : The UnloadKeyboardLayout function removes a keyboard layout.
5719 * Parameters: HKL hkl handle of keyboard layout
5720 * Variables :
5721 * Result : If the function succeeds, the return value is the handle of the
5722 * keyboard layout; otherwise, it is NULL. To get extended error
5723 * information, use the GetLastError function.
5724 * Remark :
5725 * Status : UNTESTED STUB
5726 *
5727 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5728 *****************************************************************************/
5729
5730BOOL WIN32API UnloadKeyboardLayout (HKL hkl)
5731{
5732 dprintf(("USER32:UnloadKeyboardLayout (%08x) not implemented.\n",
5733 hkl));
5734
5735 return (0);
5736}
5737
5738
5739/*****************************************************************************
5740 * Name : SHORT WIN32API VkKeyScanExW
5741 * Purpose : The VkKeyScanEx function translates a character to the
5742 * corresponding virtual-key code and shift state. The function
5743 * translates the character using the input language and physical
5744 * keyboard layout identified by the given keyboard layout handle.
5745 * Parameters: UINT uChar character to translate
5746 * HKL hkl keyboard layout handle
5747 * Variables :
5748 * Result : see docs
5749 * Remark :
5750 * Status : UNTESTED STUB
5751 *
5752 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5753 *****************************************************************************/
5754
5755WORD WIN32API VkKeyScanExW(WCHAR uChar,
5756 HKL hkl)
5757{
5758 dprintf(("USER32:VkKeyScanExW (%u,%08x) not implemented.\n",
5759 uChar,
5760 hkl));
5761
5762 return (uChar);
5763}
5764
5765
5766/*****************************************************************************
5767 * Name : SHORT WIN32API VkKeyScanExA
5768 * Purpose : The VkKeyScanEx function translates a character to the
5769 * corresponding virtual-key code and shift state. The function
5770 * translates the character using the input language and physical
5771 * keyboard layout identified by the given keyboard layout handle.
5772 * Parameters: UINT uChar character to translate
5773 * HKL hkl keyboard layout handle
5774 * Variables :
5775 * Result : see docs
5776 * Remark :
5777 * Status : UNTESTED STUB
5778 *
5779 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5780 *****************************************************************************/
5781
5782WORD WIN32API VkKeyScanExA(CHAR uChar,
5783 HKL hkl)
5784{
5785 dprintf(("USER32:VkKeyScanExA (%u,%08x) not implemented.\n",
5786 uChar,
5787 hkl));
5788
5789 return (uChar);
5790}
5791
5792
5793/*****************************************************************************
5794 * Name : VOID WIN32API keybd_event
5795 * Purpose : The keybd_event function synthesizes a keystroke. The system
5796 * can use such a synthesized keystroke to generate a WM_KEYUP or
5797 * WM_KEYDOWN message. The keyboard driver's interrupt handler calls
5798 * the keybd_event function.
5799 * Parameters: BYTE bVk virtual-key code
5800
5801 * BYTE bScan hardware scan code
5802 * DWORD dwFlags flags specifying various function options
5803 * DWORD dwExtraInfo additional data associated with keystroke
5804 * Variables :
5805 * Result :
5806 * Remark :
5807 * Status : UNTESTED STUB
5808 *
5809 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5810 *****************************************************************************/
5811
5812VOID WIN32API keybd_event (BYTE bVk,
5813 BYTE bScan,
5814 DWORD dwFlags,
5815 DWORD dwExtraInfo)
5816{
5817 dprintf(("USER32:keybd_event (%u,%u,%08xh,%08x) not implemented.\n",
5818 bVk,
5819 bScan,
5820 dwFlags,
5821 dwExtraInfo));
5822}
5823
5824
5825/*****************************************************************************
5826 * Name : VOID WIN32API mouse_event
5827 * Purpose : The mouse_event function synthesizes mouse motion and button clicks.
5828 * Parameters: DWORD dwFlags flags specifying various motion/click variants
5829 * DWORD dx horizontal mouse position or position change
5830 * DWORD dy vertical mouse position or position change
5831 * DWORD cButtons unused, reserved for future use, set to zero
5832 * DWORD dwExtraInfo 32 bits of application-defined information
5833 * Variables :
5834 * Result :
5835 * Remark :
5836 * Status : UNTESTED STUB
5837 *
5838 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5839 *****************************************************************************/
5840
5841VOID WIN32API mouse_event(DWORD dwFlags,
5842 DWORD dx,
5843 DWORD dy,
5844 DWORD cButtons,
5845 DWORD dwExtraInfo)
5846{
5847 dprintf(("USER32:mouse_event (%08xh,%u,%u,%u,%08x) not implemented.\n",
5848 dwFlags,
5849 dx,
5850 dy,
5851 cButtons,
5852 dwExtraInfo));
5853}
5854
5855
5856/*****************************************************************************
5857 * Name : BOOL WIN32API SetShellWindow
5858 * Purpose : Unknown
5859 * Parameters: Unknown
5860 * Variables :
5861 * Result :
5862 * Remark :
5863 * Status : UNTESTED UNKNOWN STUB
5864 *
5865 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
5866 *****************************************************************************/
5867
5868BOOL WIN32API SetShellWindow(DWORD x1)
5869{
5870 dprintf(("USER32: SetShellWindow(%08x) not implemented.\n",
5871 x1));
5872
5873 return (FALSE); /* default */
5874}
5875
5876
5877/*****************************************************************************
5878 * Name : BOOL WIN32API PlaySoundEvent
5879 * Purpose : Unknown
5880 * Parameters: Unknown
5881 * Variables :
5882 * Result :
5883 * Remark :
5884 * Status : UNTESTED UNKNOWN STUB
5885 *
5886 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
5887 *****************************************************************************/
5888
5889BOOL WIN32API PlaySoundEvent(DWORD x1)
5890{
5891 dprintf(("USER32: PlaySoundEvent(%08x) not implemented.\n",
5892 x1));
5893
5894 return (FALSE); /* default */
5895}
5896
5897
5898/*****************************************************************************
5899 * Name : BOOL WIN32API TileChildWindows
5900 * Purpose : Unknown
5901 * Parameters: Unknown
5902 * Variables :
5903 * Result :
5904 * Remark :
5905 * Status : UNTESTED UNKNOWN STUB
5906 *
5907 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
5908 *****************************************************************************/
5909
5910BOOL WIN32API TileChildWindows(DWORD x1,
5911 DWORD x2)
5912{
5913 dprintf(("USER32: TileChildWindows(%08xh,%08xh) not implemented.\n",
5914 x1,
5915 x2));
5916
5917 return (FALSE); /* default */
5918}
5919
5920
5921/*****************************************************************************
5922 * Name : BOOL WIN32API SetSysColorsTemp
5923 * Purpose : Unknown
5924 * Parameters: Unknown
5925 * Variables :
5926 * Result :
5927 * Remark :
5928 * Status : UNTESTED UNKNOWN STUB
5929 *
5930 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
5931 *****************************************************************************/
5932
5933BOOL WIN32API SetSysColorsTemp(void)
5934{
5935 dprintf(("USER32: SetSysColorsTemp() not implemented.\n"));
5936
5937 return (FALSE); /* default */
5938}
5939
5940
5941/*****************************************************************************
5942 * Name : BOOL WIN32API RegisterNetworkCapabilities
5943 * Purpose : Unknown
5944 * Parameters: Unknown
5945 * Variables :
5946 * Result :
5947 * Remark :
5948 * Status : UNTESTED UNKNOWN STUB
5949 *
5950 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
5951 *****************************************************************************/
5952
5953BOOL WIN32API RegisterNetworkCapabilities(DWORD x1,
5954 DWORD x2)
5955{
5956 dprintf(("USER32: RegisterNetworkCapabilities(%08xh,%08xh) not implemented.\n",
5957 x1,
5958 x2));
5959
5960 return (FALSE); /* default */
5961}
5962
5963
5964/*****************************************************************************
5965 * Name : BOOL WIN32API EndTask
5966 * Purpose : Unknown
5967 * Parameters: Unknown
5968 * Variables :
5969 * Result :
5970 * Remark :
5971 * Status : UNTESTED UNKNOWN STUB
5972 *
5973 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
5974 *****************************************************************************/
5975
5976BOOL WIN32API EndTask(DWORD x1,
5977 DWORD x2,
5978 DWORD x3)
5979{
5980 dprintf(("USER32: EndTask(%08xh,%08xh,%08xh) not implemented.\n",
5981 x1,
5982 x2,
5983 x3));
5984
5985 return (FALSE); /* default */
5986}
5987
5988
5989/*****************************************************************************
5990 * Name : BOOL WIN32API SwitchToThisWindow
5991 * Purpose : Unknown
5992 * Parameters: Unknown
5993 * Variables :
5994 * Result :
5995 * Remark :
5996 * Status : UNTESTED UNKNOWN STUB
5997 *
5998 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
5999 *****************************************************************************/
6000
6001BOOL WIN32API SwitchToThisWindow(HWND hwnd,
6002 BOOL x2)
6003{
6004 dprintf(("USER32: SwitchToThisWindow(%08xh,%08xh) not implemented.\n",
6005 hwnd,
6006 x2));
6007
6008 return (FALSE); /* default */
6009}
6010
6011
6012/*****************************************************************************
6013 * Name : BOOL WIN32API GetNextQueueWindow
6014 * Purpose : Unknown
6015 * Parameters: Unknown
6016 * Variables :
6017 * Result :
6018 * Remark :
6019 * Status : UNTESTED UNKNOWN STUB
6020 *
6021 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6022 *****************************************************************************/
6023
6024BOOL WIN32API GetNextQueueWindow(DWORD x1,
6025 DWORD x2)
6026{
6027 dprintf(("USER32: GetNextQueueWindow(%08xh,%08xh) not implemented.\n",
6028 x1,
6029 x2));
6030
6031 return (FALSE); /* default */
6032}
6033
6034
6035/*****************************************************************************
6036 * Name : BOOL WIN32API YieldTask
6037 * Purpose : Unknown
6038 * Parameters: Unknown
6039 * Variables :
6040 * Result :
6041 * Remark :
6042 * Status : UNTESTED UNKNOWN STUB
6043 *
6044 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6045 *****************************************************************************/
6046
6047BOOL WIN32API YieldTask(void)
6048{
6049 dprintf(("USER32: YieldTask() not implemented.\n"));
6050
6051 return (FALSE); /* default */
6052}
6053
6054
6055/*****************************************************************************
6056 * Name : BOOL WIN32API WinOldAppHackoMatic
6057 * Purpose : Unknown
6058 * Parameters: Unknown
6059 * Variables :
6060 * Result :
6061 * Remark :
6062 * Status : UNTESTED UNKNOWN STUB
6063 *
6064 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6065 *****************************************************************************/
6066
6067BOOL WIN32API WinOldAppHackoMatic(DWORD x1)
6068{
6069 dprintf(("USER32: WinOldAppHackoMatic(%08x) not implemented.\n",
6070 x1));
6071
6072 return (FALSE); /* default */
6073}
6074
6075
6076/*****************************************************************************
6077 * Name : BOOL WIN32API DragObject
6078 * Purpose : Unknown
6079 * Parameters: Unknown
6080 * Variables :
6081 * Result :
6082 * Remark :
6083 * Status : UNTESTED UNKNOWN STUB
6084 *
6085 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6086 *****************************************************************************/
6087
6088DWORD WIN32API DragObject(HWND x1,HWND x2,UINT x3,DWORD x4,HCURSOR x5)
6089{
6090 dprintf(("USER32: DragObject(%08x,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
6091 x1,
6092 x2,
6093 x3,
6094 x4,
6095 x5));
6096
6097 return (FALSE); /* default */
6098}
6099
6100
6101/*****************************************************************************
6102 * Name : BOOL WIN32API CascadeChildWindows
6103 * Purpose : Unknown
6104 * Parameters: Unknown
6105 * Variables :
6106 * Result :
6107 * Remark :
6108 * Status : UNTESTED UNKNOWN STUB
6109 *
6110 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6111 *****************************************************************************/
6112
6113BOOL WIN32API CascadeChildWindows(DWORD x1,
6114 DWORD x2)
6115{
6116 dprintf(("USER32: CascadeChildWindows(%08xh,%08xh) not implemented.\n",
6117 x1,
6118 x2));
6119
6120 return (FALSE); /* default */
6121}
6122
6123
6124/*****************************************************************************
6125 * Name : BOOL WIN32API RegisterSystemThread
6126 * Purpose : Unknown
6127 * Parameters: Unknown
6128 * Variables :
6129 * Result :
6130 * Remark :
6131 * Status : UNTESTED UNKNOWN STUB
6132 *
6133 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6134 *****************************************************************************/
6135
6136BOOL WIN32API RegisterSystemThread(DWORD x1,
6137 DWORD x2)
6138{
6139 dprintf(("USER32: RegisterSystemThread(%08xh,%08xh) not implemented.\n",
6140 x1,
6141 x2));
6142
6143 return (FALSE); /* default */
6144}
6145
6146
6147/*****************************************************************************
6148 * Name : BOOL WIN32API IsHungThread
6149 * Purpose : Unknown
6150 * Parameters: Unknown
6151 * Variables :
6152 * Result :
6153 * Remark :
6154 * Status : UNTESTED UNKNOWN STUB
6155 *
6156 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6157 *****************************************************************************/
6158
6159BOOL WIN32API IsHungThread(DWORD x1)
6160{
6161 dprintf(("USER32: IsHungThread(%08xh) not implemented.\n",
6162 x1));
6163
6164 return (FALSE); /* default */
6165}
6166
6167
6168/*****************************************************************************
6169 * Name : BOOL WIN32API SysErrorBox
6170 * Purpose : Unknown
6171 * Parameters: Unknown
6172 * Variables :
6173 * Result :
6174 * Remark : HARDERR like ?
6175 * Status : UNTESTED UNKNOWN STUB
6176 *
6177 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6178 *****************************************************************************/
6179
6180BOOL WIN32API SysErrorBox(DWORD x1,
6181 DWORD x2,
6182 DWORD x3)
6183{
6184 dprintf(("USER32: SysErrorBox(%08xh,%08xh,%08xh) not implemented.\n",
6185 x1,
6186 x2,
6187 x3));
6188
6189 return (FALSE); /* default */
6190}
6191
6192
6193/*****************************************************************************
6194 * Name : BOOL WIN32API UserSignalProc
6195 * Purpose : Unknown
6196 * Parameters: Unknown
6197 * Variables :
6198 * Result :
6199 * Remark :
6200 * Status : UNTESTED UNKNOWN STUB
6201 *
6202 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6203 *****************************************************************************/
6204
6205BOOL WIN32API UserSignalProc(DWORD x1,
6206 DWORD x2,
6207 DWORD x3,
6208 DWORD x4)
6209{
6210 dprintf(("USER32: SysErrorBox(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
6211 x1,
6212 x2,
6213 x3,
6214 x4));
6215
6216 return (FALSE); /* default */
6217}
6218
6219
6220/*****************************************************************************
6221 * Name : BOOL WIN32API GetShellWindow
6222 * Purpose : Unknown
6223 * Parameters: Unknown
6224 * Variables :
6225 * Result :
6226 * Remark :
6227 * Status : UNTESTED UNKNOWN STUB
6228 *
6229 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6230 *****************************************************************************/
6231
6232HWND WIN32API GetShellWindow(void)
6233{
6234 dprintf(("USER32: GetShellWindow() not implemented.\n"));
6235
6236 return (0); /* default */
6237}
6238
6239
6240
6241/***********************************************************************
6242 * RegisterTasklist32 [USER32.436]
6243 */
6244DWORD WIN32API RegisterTasklist (DWORD x)
6245{
6246 dprintf(("USER32: RegisterTasklist(%08xh) not implemented.\n",
6247 x));
6248
6249 return TRUE;
6250}
6251
6252
6253/***********************************************************************
6254 * DrawCaptionTemp32A [USER32.599]
6255 *
6256 * PARAMS
6257 *
6258 * RETURNS
6259 * Success:
6260 * Failure:
6261 */
6262
6263BOOL WIN32API DrawCaptionTempA(HWND hwnd,
6264 HDC hdc,
6265 const RECT *rect,
6266 HFONT hFont,
6267 HICON hIcon,
6268 LPCSTR str,
6269 UINT uFlags)
6270{
6271 RECT rc = *rect;
6272
6273 dprintf(("USER32: DrawCaptionTempA(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh)\n",
6274 hwnd,
6275 hdc,
6276 rect,
6277 hFont,
6278 hIcon,
6279 str,
6280 uFlags));
6281
6282 /* drawing background */
6283 if (uFlags & DC_INBUTTON)
6284 {
6285 O32_FillRect (hdc,
6286 &rc,
6287 GetSysColorBrush (COLOR_3DFACE));
6288
6289 if (uFlags & DC_ACTIVE)
6290 {
6291 HBRUSH hbr = O32_SelectObject (hdc,
6292 GetSysColorBrush (COLOR_ACTIVECAPTION));
6293 O32_PatBlt (hdc,
6294 rc.left,
6295 rc.top,
6296 rc.right - rc.left,
6297 rc.bottom - rc.top,
6298 0xFA0089);
6299
6300 O32_SelectObject (hdc,
6301 hbr);
6302 }
6303 }
6304 else
6305 {
6306 O32_FillRect (hdc,
6307 &rc,
6308 GetSysColorBrush ((uFlags & DC_ACTIVE) ?
6309 COLOR_ACTIVECAPTION : COLOR_INACTIVECAPTION));
6310 }
6311
6312
6313 /* drawing icon */
6314 if ((uFlags & DC_ICON) && !(uFlags & DC_SMALLCAP))
6315 {
6316 POINT pt;
6317
6318 pt.x = rc.left + 2;
6319 pt.y = (rc.bottom + rc.top - O32_GetSystemMetrics(SM_CYSMICON)) / 2;
6320
6321 if (hIcon)
6322 {
6323 DrawIconEx (hdc,
6324 pt.x,
6325 pt.y,
6326 hIcon,
6327 O32_GetSystemMetrics(SM_CXSMICON),
6328 O32_GetSystemMetrics(SM_CYSMICON),
6329 0,
6330 0,
6331 DI_NORMAL);
6332 }
6333 else
6334 {
6335 /* @@@PH 1999/06/08 not ported yet, just don't draw any icon
6336 WND *wndPtr = WIN_FindWndPtr(hwnd);
6337 HICON hAppIcon = 0;
6338
6339 if (wndPtr->class->hIconSm)
6340 hAppIcon = wndPtr->class->hIconSm;
6341 else
6342 if (wndPtr->class->hIcon)
6343 hAppIcon = wndPtr->class->hIcon;
6344
6345 DrawIconEx (hdc,
6346 pt.x,
6347 pt.y,
6348 hAppIcon,
6349 GetSystemMetrics(SM_CXSMICON),
6350 GetSystemMetrics(SM_CYSMICON),
6351 0,
6352 0,
6353 DI_NORMAL);
6354
6355 WIN_ReleaseWndPtr(wndPtr);
6356 */
6357 }
6358
6359 rc.left += (rc.bottom - rc.top);
6360 }
6361
6362 /* drawing text */
6363 if (uFlags & DC_TEXT)
6364 {
6365 HFONT hOldFont;
6366
6367 if (uFlags & DC_INBUTTON)
6368 O32_SetTextColor (hdc,
6369 O32_GetSysColor (COLOR_BTNTEXT));
6370 else
6371 if (uFlags & DC_ACTIVE)
6372 O32_SetTextColor (hdc,
6373 O32_GetSysColor (COLOR_CAPTIONTEXT));
6374 else
6375 O32_SetTextColor (hdc,
6376 O32_GetSysColor (COLOR_INACTIVECAPTIONTEXT));
6377
6378 O32_SetBkMode (hdc,
6379 TRANSPARENT);
6380
6381 if (hFont)
6382 hOldFont = O32_SelectObject (hdc,
6383 hFont);
6384 else
6385 {
6386 NONCLIENTMETRICSA nclm;
6387 HFONT hNewFont;
6388
6389 nclm.cbSize = sizeof(NONCLIENTMETRICSA);
6390 O32_SystemParametersInfo (SPI_GETNONCLIENTMETRICS,
6391 0,
6392 &nclm,
6393 0);
6394 hNewFont = O32_CreateFontIndirect ((uFlags & DC_SMALLCAP) ?
6395 &nclm.lfSmCaptionFont : &nclm.lfCaptionFont);
6396 hOldFont = O32_SelectObject (hdc,
6397 hNewFont);
6398 }
6399
6400 if (str)
6401 O32_DrawText (hdc,
6402 str,
6403 -1,
6404 &rc,
6405 DT_SINGLELINE | DT_VCENTER | DT_NOPREFIX | DT_LEFT);
6406 else
6407 {
6408 CHAR szText[128];
6409 INT nLen;
6410
6411 nLen = O32_GetWindowText (hwnd,
6412 szText,
6413 128);
6414
6415 O32_DrawText (hdc,
6416 szText,
6417 nLen,
6418 &rc,
6419 DT_SINGLELINE | DT_VCENTER | DT_NOPREFIX | DT_LEFT);
6420 }
6421
6422 if (hFont)
6423 O32_SelectObject (hdc,
6424 hOldFont);
6425 else
6426 O32_DeleteObject (O32_SelectObject (hdc,
6427 hOldFont));
6428 }
6429
6430 /* drawing focus ??? */
6431 if (uFlags & 0x2000)
6432 {
6433 dprintf(("USER32: DrawCaptionTempA undocumented flag (0x2000)!\n"));
6434 }
6435
6436 return 0;
6437}
6438
6439
6440/***********************************************************************
6441 * DrawCaptionTemp32W [USER32.602]
6442 *
6443 * PARAMS
6444 *
6445 * RETURNS
6446 * Success:
6447 * Failure:
6448 */
6449
6450BOOL WIN32API DrawCaptionTempW (HWND hwnd,
6451 HDC hdc,
6452 const RECT *rect,
6453 HFONT hFont,
6454 HICON hIcon,
6455 LPCWSTR str,
6456 UINT uFlags)
6457{
6458 LPSTR strAscii = UnicodeToAsciiString((LPWSTR)str);
6459
6460 BOOL res = DrawCaptionTempA (hwnd,
6461 hdc,
6462 rect,
6463 hFont,
6464 hIcon,
6465 strAscii,
6466 uFlags);
6467
6468 FreeAsciiString(strAscii);
6469
6470 return res;
6471}
6472
Note: See TracBrowser for help on using the repository browser.