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

Last change on this file since 85 was 85, checked in by phaller, 26 years ago

Add: added GetDlgItemTextW() API

File size: 243.5 KB
Line 
1/* $Id: user32.cpp,v 1.6 1999-06-09 20:53:30 phaller Exp $ */
2
3/*
4 * Win32 misc user32 API functions for OS/2
5 *
6 * Copyright 1998 Sander van Leeuwen
7 * Copyright 1998 Patrick Haller
8 * Copyright 1998 Peter Fitzsimmons
9 * Copyright 1999 Christoph Bratschi
10 *
11 *
12 * Project Odin Software License can be found in LICENSE.TXT
13 *
14 */
15/*****************************************************************************
16 * Name : USER32.CPP
17 * Purpose : This module maps all Win32 functions contained in USER32.DLL
18 * to their OS/2-specific counterparts as far as possible.
19 *****************************************************************************/
20
21#include <os2win.h>
22#include "misc.h"
23
24#include "user32.h"
25#include "wndproc.h"
26#include "wndsubproc.h"
27#include "wndclass.h"
28#include "icon.h"
29#include "usrcall.h"
30#include "syscolor.h"
31
32#include <wchar.h>
33#include <stdlib.h>
34#include <string.h>
35
36//undocumented stuff
37// WIN32API CalcChildScroll
38// WIN32API CascadeChildWindows
39// WIN32API ClientThreadConnect
40// WIN32API DragObject
41// WIN32API DrawFrame
42// WIN32API EditWndProc
43// WIN32API EndTask
44// WIN32API GetInputDesktop
45// WIN32API GetNextQueueWindow
46// WIN32API GetShellWindow
47// WIN32API InitSharedTable
48// WIN32API InitTask
49// WIN32API IsHungThread
50// WIN32API LockWindowStation
51// WIN32API ModifyAccess
52// WIN32API PlaySoundEvent
53// WIN32API RegisterLogonProcess
54// WIN32API RegisterNetworkCapabilities
55// WIN32API RegisterSystemThread
56// WIN32API SetDeskWallpaper
57// WIN32API SetDesktopBitmap
58// WIN32API SetInternalWindowPos
59// WIN32API SetLogonNotifyWindow
60// WIN32API SetShellWindow
61// WIN32API SetSysColorsTemp
62// WIN32API SetWindowFullScreenState
63// WIN32API SwitchToThisWindow
64// WIN32API SysErrorBox
65// WIN32API TileChildWindows
66// WIN32API UnlockWindowStation
67// WIN32API UserClientDllInitialize
68// WIN32API UserSignalProc
69// WIN32API WinOldAppHackoMatic
70// WIN32API WNDPROC_CALLBACK
71// WIN32API YieldTask
72
73
74
75
76//******************************************************************************
77//******************************************************************************
78HWND WIN32API GetActiveWindow()
79{
80 return(O32_GetActiveWindow());
81}
82//******************************************************************************
83//******************************************************************************
84int __cdecl wsprintfA(char *lpOut, LPCSTR lpFmt, ...)
85{
86 int rc;
87 va_list argptr;
88
89#ifdef DEBUG
90 WriteLog("USER32: wsprintfA\n");
91 WriteLog("USER32: %s\n", lpFmt);
92#endif
93 va_start(argptr, lpFmt);
94 rc = O32_wvsprintf(lpOut, (char *)lpFmt, argptr);
95 va_end(argptr);
96#ifdef DEBUG
97 WriteLog("USER32: %s\n", lpOut);
98#endif
99 return(rc);
100}
101//******************************************************************************
102//******************************************************************************
103int __cdecl wsprintfW(LPWSTR lpOut, LPCWSTR lpFmt, ...)
104{
105 int rc;
106 char *lpFmtA;
107 char szOut[512];
108 va_list argptr;
109
110 dprintf(("USER32: wsprintfW(%08xh,%08xh).\n",
111 lpOut,
112 lpFmt));
113
114 lpFmtA = UnicodeToAsciiString((LPWSTR)lpFmt);
115
116 /* @@@PH 98/07/13 transform "%s" to "%ls" does the unicode magic */
117 {
118 PSZ pszTemp;
119 PSZ pszTemp1;
120 ULONG ulStrings;
121 ULONG ulIndex; /* temporary string counter */
122
123 for (ulStrings = 0, /* determine number of placeholders */
124 pszTemp = lpFmtA;
125
126 (pszTemp != NULL) &&
127 (*pszTemp != 0);
128
129 ulStrings++)
130 {
131 pszTemp = strstr(pszTemp,
132 "%s");
133 if (pszTemp != NULL) /* skip 2 characters */
134 {
135 pszTemp++;
136 pszTemp++;
137 }
138 else
139 break; /* leave loop immediately */
140 }
141
142 if (ulStrings != 0) /* transformation required ? */
143 {
144 /* now reallocate lpFmt */
145 ulStrings += strlen(lpFmtA); /* calculate total string length */
146 pszTemp = lpFmtA; /* save string pointer */
147 pszTemp1 = lpFmtA; /* save string pointer */
148
149 /* @@@PH allocation has to be compatible to FreeAsciiString !!! */
150 lpFmtA = (char *)malloc(ulStrings + 1);
151 if (lpFmtA == NULL) /* check proper allocation */
152 return (0); /* raise error condition */
153
154 for (ulIndex = 0;
155 ulIndex <= ulStrings;
156 ulIndex++,
157 pszTemp++)
158 {
159 if ((pszTemp[0] == '%') &&
160 (pszTemp[1] == 's') )
161 {
162 /* replace %s by %ls */
163 lpFmtA[ulIndex++] = '%';
164 lpFmtA[ulIndex ] = 'l';
165 lpFmtA[ulIndex+1] = 's';
166 }
167 else
168 lpFmtA[ulIndex] = *pszTemp; /* just copy over the character */
169 }
170
171 lpFmtA[ulStrings] = 0; /* string termination */
172
173 FreeAsciiString(pszTemp1); /* the original string is obsolete */
174 }
175 }
176
177 dprintf(("USER32: wsprintfW (%s).\n",
178 lpFmt));
179
180 va_start(argptr,
181 lpFmt);
182
183 rc = O32_wvsprintf(szOut,
184 lpFmtA,
185 argptr);
186
187 AsciiToUnicode(szOut,
188 lpOut);
189
190 FreeAsciiString(lpFmtA);
191 return(rc);
192}
193//******************************************************************************
194//******************************************************************************
195int WIN32API MessageBoxA(HWND hwndOwner, LPCTSTR lpszText, LPCTSTR lpszTitle, UINT fuStyle)
196{
197 dprintf(("USER32: MessageBoxA %s %s\n", lpszText, lpszTitle));
198 return(O32_MessageBox(hwndOwner, lpszText, lpszTitle, fuStyle));
199}
200//******************************************************************************
201//******************************************************************************
202BOOL WIN32API MessageBeep( UINT arg1)
203{
204#ifdef DEBUG
205 WriteLog("USER32: MessageBeep\n");
206#endif
207 return O32_MessageBeep(arg1);
208}
209//******************************************************************************
210//******************************************************************************
211LONG WIN32API SendDlgItemMessageA( HWND arg1, int arg2, UINT arg3, WPARAM arg4, LPARAM arg5)
212{
213#ifdef DEBUG
214 WriteLog("USER32: SendDlgItemMessageA\n");
215#endif
216 return O32_SendDlgItemMessage(arg1, arg2, arg3, arg4, arg5);
217}
218//******************************************************************************
219//******************************************************************************
220VOID WIN32API PostQuitMessage( int arg1)
221{
222 dprintf(("USER32: PostQuitMessage\n"));
223 O32_PostQuitMessage(arg1);
224}
225//******************************************************************************
226// Not implemented by Open32 (31-5-99 Christoph Bratschi)
227//******************************************************************************
228BOOL WIN32API IsDlgButtonChecked( HWND arg1, UINT arg2)
229{
230#ifdef DEBUG
231 WriteLog("USER32: IsDlgButtonChecked\n");
232#endif
233// return O32_IsDlgButtonChecked(arg1, arg2);
234 return (BOOL)SendDlgItemMessageA(arg1,arg2,BM_GETCHECK,0,0);
235}
236//******************************************************************************
237//******************************************************************************
238int WIN32API GetWindowTextLengthA( HWND arg1)
239{
240 dprintf(("USER32: GetWindowTextLength\n"));
241 return O32_GetWindowTextLength(arg1);
242}
243//******************************************************************************
244//******************************************************************************
245int WIN32API GetWindowTextA( HWND arg1, LPSTR arg2, int arg3)
246{
247 dprintf(("USER32: GetWindowTextA\n"));
248 return O32_GetWindowText(arg1, arg2, arg3);
249}
250//******************************************************************************
251
252/*******************************************************************
253 * InternalGetWindowText (USER32.326)
254 */
255int WIN32API InternalGetWindowText(HWND hwnd,
256 LPWSTR lpString,
257 INT nMaxCount )
258{
259 dprintf(("USER32: InternalGetWindowText(%08xh,%08xh,%08xh) not properly implemented.\n",
260 hwnd,
261 lpString,
262 nMaxCount));
263
264 return GetWindowTextW(hwnd,lpString,nMaxCount);
265}
266
267
268//******************************************************************************
269BOOL WIN32API GetWindowRect( HWND arg1, PRECT arg2)
270{
271 BOOL rc;
272
273 rc = O32_GetWindowRect(arg1, arg2);
274 dprintf(("USER32: GetWindowRect %X returned %d\n", arg1, rc));
275 return(rc);
276}
277//******************************************************************************
278//******************************************************************************
279HWND WIN32API GetNextDlgTabItem( HWND arg1, HWND arg2, BOOL arg3)
280{
281 dprintf(("USER32: GetNextDlgTabItem\n"));
282 return O32_GetNextDlgTabItem(arg1, arg2, arg3);
283}
284//******************************************************************************
285//******************************************************************************
286BOOL WIN32API GetMessageA( LPMSG arg1, HWND arg2, UINT arg3, UINT arg4)
287{
288//// dprintf(("USER32: GetMessage\n"));
289 return O32_GetMessage(arg1, arg2, arg3, arg4);
290}
291//******************************************************************************
292//******************************************************************************
293HWND WIN32API GetFocus(void)
294{
295 dprintf(("USER32: GetFocus\n"));
296 return O32_GetFocus();
297}
298//******************************************************************************
299//******************************************************************************
300HWND WIN32API GetDlgItem(HWND arg1, int arg2)
301{
302 HWND rc;
303
304 rc = O32_GetDlgItem(arg1, arg2);
305 dprintf(("USER32: GetDlgItem %d returned %d\n", arg2, rc));
306 return(rc);
307}
308//******************************************************************************
309//******************************************************************************
310int WIN32API GetDlgCtrlID( HWND arg1)
311{
312 dprintf(("USER32: GetDlgCtrlID\n"));
313 return O32_GetDlgCtrlID(arg1);
314}
315//******************************************************************************
316//******************************************************************************
317HWND WIN32API GetDesktopWindow(void)
318{
319 dprintf(("USER32: GetDesktopWindow\n"));
320 return O32_GetDesktopWindow();
321}
322//******************************************************************************
323//******************************************************************************
324BOOL WIN32API EnumThreadWindows(DWORD dwThreadId, WNDENUMPROC lpfn, LPARAM lParam)
325{
326 BOOL rc;
327 EnumWindowCallback *callback = new EnumWindowCallback(lpfn, lParam);
328
329 dprintf(("USER32: EnumThreadWindows\n"));
330 rc = O32_EnumThreadWindows(dwThreadId, callback->GetOS2Callback(), (LPARAM)callback);
331 if(callback)
332 delete callback;
333 return(rc);
334}
335//******************************************************************************
336//******************************************************************************
337BOOL WIN32API EndDialog( HWND arg1, int arg2)
338{
339 BOOL rc;
340
341 dprintf(("USER32: EndDialog\n"));
342 rc = O32_EndDialog(arg1, arg2);
343 return(rc);
344}
345//******************************************************************************
346//******************************************************************************
347LONG WIN32API DispatchMessageA( const MSG * arg1)
348{
349//// dprintf(("USER32: DispatchMessage\n"));
350 return O32_DispatchMessage(arg1);
351}
352//******************************************************************************
353//******************************************************************************
354BOOL WIN32API OffsetRect( PRECT arg1, int arg2, int arg3)
355{
356#ifdef DEBUG
357//// WriteLog("USER32: OffsetRect\n");
358#endif
359 return O32_OffsetRect(arg1, arg2, arg3);
360}
361//******************************************************************************
362//******************************************************************************
363BOOL WIN32API CopyRect( PRECT arg1, const RECT * arg2)
364{
365// ddprintf(("USER32: CopyRect\n"));
366 return O32_CopyRect(arg1, arg2);
367}
368//******************************************************************************
369// Not implemented by Open32 (5-31-99 Christoph Bratschi)
370//******************************************************************************
371BOOL WIN32API CheckDlgButton( HWND arg1, int arg2, UINT arg3)
372{
373#ifdef DEBUG
374 WriteLog("USER32: CheckDlgButton\n");
375#endif
376// return O32_CheckDlgButton(arg1, arg2, arg3);
377 return (BOOL)SendDlgItemMessageA(arg1,arg2,BM_SETCHECK,arg3,0);
378}
379//******************************************************************************
380//******************************************************************************
381HWND WIN32API SetFocus( HWND arg1)
382{
383 dprintf(("USER32: SetFocus\n"));
384 return O32_SetFocus(arg1);
385}
386//******************************************************************************
387//******************************************************************************
388BOOL WIN32API TranslateMessage( const MSG * arg1)
389{
390#ifdef DEBUG
391//// WriteLog("USER32: TranslateMessage\n");
392#endif
393 return O32_TranslateMessage(arg1);
394}
395//******************************************************************************
396//******************************************************************************
397BOOL WIN32API SetWindowPos( HWND arg1, HWND arg2, int arg3, int arg4, int arg5, int arg6, UINT arg7)
398{
399#ifdef DEBUG
400 WriteLog("USER32: SetWindowPos\n");
401#endif
402 return O32_SetWindowPos(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
403}
404//******************************************************************************
405//******************************************************************************
406BOOL WIN32API ShowWindow(HWND arg1, int arg2)
407{
408#ifdef DEBUG
409 WriteLog("USER32: ShowWindow %X %d\n", arg1, arg2);
410#endif
411 return O32_ShowWindow(arg1, arg2);
412}
413//******************************************************************************
414//******************************************************************************
415BOOL WIN32API SetWindowTextA(HWND arg1, LPCSTR arg2)
416{
417#ifdef DEBUG
418 WriteLog("USER32: SetWindowText %s\n", arg2);
419#endif
420 return O32_SetWindowText(arg1, arg2);
421}
422//******************************************************************************
423//******************************************************************************
424BOOL WIN32API SetForegroundWindow(HWND arg1)
425{
426#ifdef DEBUG
427 WriteLog("USER32: SetForegroundWindow\n");
428#endif
429 return O32_SetForegroundWindow(arg1);
430}
431//******************************************************************************
432//******************************************************************************
433int WIN32API ReleaseDC( HWND arg1, HDC arg2)
434{
435#ifdef DEBUG
436 WriteLog("USER32: ReleaseDC\n");
437#endif
438 return O32_ReleaseDC(arg1, arg2);
439}
440//******************************************************************************
441//******************************************************************************
442BOOL WIN32API InvalidateRect(HWND arg1, const RECT *arg2, BOOL arg3)
443{
444#ifdef DEBUG
445 if(arg2)
446 WriteLog("USER32: InvalidateRect for window %X (%d,%d)(%d,%d) %d\n", arg1, arg2->left, arg2->top, arg2->right, arg2->bottom, arg3);
447 else WriteLog("USER32: InvalidateRect for window %X NULL, %d\n", arg1, arg3);
448#endif
449 return O32_InvalidateRect(arg1, arg2, arg3);
450}
451//******************************************************************************
452//******************************************************************************
453BOOL WIN32API GetUpdateRect( HWND arg1, PRECT arg2, BOOL arg3)
454{
455#ifdef DEBUG
456 WriteLog("USER32: GetUpdateRect\n");
457#endif
458 return O32_GetUpdateRect(arg1, arg2, arg3);
459}
460//******************************************************************************
461//******************************************************************************
462HDC WIN32API GetDC( HWND arg1)
463{
464 HDC hdc;
465
466 hdc = O32_GetDC(arg1);
467#ifdef DEBUG
468 WriteLog("USER32: GetDC of %X returns %X\n", arg1, hdc);
469#endif
470 return(hdc);
471}
472//******************************************************************************
473//******************************************************************************
474HDC WIN32API GetDCEx(HWND arg1, HRGN arg2, DWORD arg3)
475{
476#ifdef DEBUG
477 WriteLog("USER32: GetDCEx\n");
478#endif
479 return O32_GetDCEx(arg1, arg2, arg3);
480}
481//******************************************************************************
482//******************************************************************************
483BOOL WIN32API GetClientRect( HWND arg1, PRECT arg2)
484{
485#ifdef DEBUG
486 WriteLog("USER32: GetClientRect of %X\n", arg1);
487#endif
488
489 return O32_GetClientRect(arg1, arg2);
490}
491//******************************************************************************
492//******************************************************************************
493HWND WIN32API FindWindowA(LPCSTR arg1, LPCSTR arg2)
494{
495#ifdef DEBUG
496 WriteLog("USER32: FindWindow\n");
497#endif
498 return O32_FindWindow(arg1, arg2);
499}
500//******************************************************************************
501//******************************************************************************
502HWND WIN32API FindWindowExA(HWND arg1, HWND arg2, LPCSTR arg3, LPCSTR arg4)
503{
504#ifdef DEBUG
505 WriteLog("USER32: FindWindowExA, not completely implemented\n");
506#endif
507 return O32_FindWindow(arg3, arg4);
508}
509//******************************************************************************
510//******************************************************************************
511BOOL WIN32API FlashWindow( HWND arg1, BOOL arg2)
512{
513#ifdef DEBUG
514 WriteLog("USER32: FlashWindow\n");
515#endif
516 return O32_FlashWindow(arg1, arg2);
517}
518//******************************************************************************
519//******************************************************************************
520BOOL WIN32API EndPaint( HWND arg1, const PAINTSTRUCT * arg2)
521{
522#ifdef DEBUG
523 WriteLog("USER32: EndPaint\n");
524#endif
525 return O32_EndPaint(arg1, arg2);
526}
527//******************************************************************************
528//******************************************************************************
529BOOL WIN32API MoveWindow(HWND arg1, int arg2, int arg3, int arg4, int arg5, BOOL arg6)
530{
531 BOOL rc;
532
533 rc = O32_MoveWindow(arg1, arg2, arg3, arg4, arg5, arg6);
534 dprintf(("USER32: MoveWindow %X to (%d,%d) size (%d,%d), repaint = %d returned %d\n", arg1, arg2, arg3, arg4, arg5, arg6, rc));
535 return(rc);
536}
537//******************************************************************************
538//******************************************************************************
539HWND WIN32API CreateWindowExA(DWORD dwExStyle,
540 LPCSTR arg2,
541 LPCSTR arg3,
542 DWORD dwStyle,
543 int x,
544 int y,
545 int nWidth,
546 int nHeight,
547 HWND arg9,
548 HMENU arg10,
549 HINSTANCE arg11,
550 PVOID arg12)
551{
552 HWND hwnd;
553 Win32WindowProc *window = NULL;
554
555 /* @@@PH 98/06/12 CreateWindow crashes somewhere in Open32 */
556 if(arg3 == NULL)
557 arg3 = (LPCSTR)"CRASH, CRASH";
558
559//SvL: This break generic.exe & notepad.exe (probably many others too)
560//These parameters can be CW_USEDEFAULT, which is 0x80000000
561#if 0
562 if (nWidth < 0) nWidth = 0;
563 if (x < 0) x = 0;
564 if (nHeight< 0) nHeight = 0;
565 if (y < 0) y = 0;
566#endif
567
568//SvL: Breaks applications
569#if 0
570 /* @@@PH 98/06/21 redraw problems disappear when WS_SYNCPAINT is on */
571#ifndef WS_VISIBLE
572 #define WS_VISIBLE 0x80000000L
573#endif
574
575#ifndef WS_SYNCPAINT
576 #define WS_SYNCPAINT 0x02000000L
577#endif
578
579#ifndef WS_CLIPSYBLINGS
580 #define WS_CLIPSYBLINGS 0x10000000L
581#endif
582
583 dwStyle |= WS_SYNCPAINT;
584
585 /* @@@PH 98/06/21 experimental fix for WinHlp32 */
586 // SOL.EXE crashes here, but WINHLP32 does not display the
587 // navigation buttons otherwise.
588 dwStyle |= WS_VISIBLE;
589#endif
590
591#ifdef DEBUG
592 WriteLog("USER32: CreateWindow: dwExStyle = %X\n", dwExStyle);
593 if((int)arg2 >> 16 != 0)
594 WriteLog("USER32: CreateWindow: classname = %s\n", arg2);
595 else WriteLog("USER32: CreateWindow: classname = %X\n", arg2);
596 WriteLog("USER32: CreateWindow: windowname= %s\n", arg3);
597 WriteLog("USER32: CreateWindow: dwStyle = %X\n", dwStyle);
598 WriteLog("USER32: CreateWindow: x = %d\n", x);
599 WriteLog("USER32: CreateWindow: y = %d\n", y);
600 WriteLog("USER32: CreateWindow: nWidth = %d\n", nWidth);
601 WriteLog("USER32: CreateWindow: nHeight = %d\n", nHeight);
602 WriteLog("USER32: CreateWindow: parent = %X\n", arg9);
603 WriteLog("USER32: CreateWindow: hwmenu = %X\n", arg10);
604 WriteLog("USER32: CreateWindow: hinstance = %X\n", arg11);
605 WriteLog("USER32: CreateWindow: param = %X\n", arg12);
606 #endif
607
608 if((int) arg2 >> 16 != 0 && strcmp(arg2, "COMBOBOX") == 0)
609 {
610 dprintf(("COMBOBOX creation"));
611 //TODO: #%@#%$ Open32 doesn't support this
612 dwStyle &= ~(CBS_OWNERDRAWFIXED | CBS_OWNERDRAWVARIABLE);
613
614 /* @@@PH 98/06/12 drop down combos are problematic too */
615 /* so we translate the styles to OS/2 style */
616 dwStyle |= CBS_DROPDOWN | CBS_DROPDOWNLIST;
617 }
618
619 //Classname might be name of system class, in which case we don't
620 //need to use our own callback
621// if(Win32WindowClass::FindClass((LPSTR)arg2) != NULL) {
622 window = new Win32WindowProc(arg11, arg2);
623// }
624
625 hwnd = O32_CreateWindowEx(dwExStyle,
626 arg2,
627 arg3,
628 dwStyle,
629 x,
630 y,
631 nWidth,
632 nHeight,
633 arg9,
634 arg10,
635 arg11,
636 arg12);
637
638 //SvL: 16-11-'97: window can be already destroyed if hwnd == 0
639 if(hwnd == 0 && window != 0 && Win32WindowProc::FindWindowProc(window)) {
640 delete(window);
641 window = 0;
642 }
643 if(window) {
644 window->SetWindowHandle(hwnd);
645 }
646 dprintf(("USER32: ************CreateWindowExA %s (%d,%d,%d,%d), hwnd = %X\n", arg2, x, y, nWidth, nHeight, hwnd));
647 return(hwnd);
648}
649//******************************************************************************
650//******************************************************************************
651LRESULT WIN32API SendMessageA(HWND arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
652{
653 LRESULT rc;
654
655#ifdef DEBUG
656 WriteLog("USER32: SendMessage....\n");
657#endif
658 rc = O32_SendMessage(arg1, arg2, arg3, arg4);
659#ifdef DEBUG
660 WriteLog("USER32: *****SendMessage %X %X %X %X returned %d\n", arg1, arg2, arg3, arg4, rc);
661#endif
662 return(rc);
663}
664//******************************************************************************
665//******************************************************************************
666HWND WIN32API SetActiveWindow( HWND arg1)
667{
668#ifdef DEBUG
669 WriteLog("USER32: SetActiveWindow\n");
670#endif
671 return O32_SetActiveWindow(arg1);
672}
673//******************************************************************************
674//******************************************************************************
675HDC WIN32API BeginPaint(HWND arg1, PPAINTSTRUCT arg2)
676{
677 dprintf(("USER32: BeginPaint %X\n", arg2));
678 return O32_BeginPaint(arg1, arg2);
679}
680//******************************************************************************
681//******************************************************************************
682BOOL WIN32API IsDialogMessageA( HWND arg1, LPMSG arg2)
683{
684#ifdef DEBUG
685//// WriteLog("USER32: IsDialogMessage\n");
686#endif
687 return O32_IsDialogMessage(arg1, arg2);
688}
689//******************************************************************************
690//******************************************************************************
691int WIN32API DrawTextA(HDC arg1, LPCSTR arg2, int arg3, PRECT arg4, UINT arg5)
692{
693#ifdef DEBUG
694 WriteLog("USER32: DrawTextA %s", arg2);
695#endif
696 return O32_DrawText(arg1, arg2, arg3, arg4, arg5);
697}
698//******************************************************************************
699//******************************************************************************
700int WIN32API DrawTextExA(HDC arg1, LPCSTR arg2, int arg3, PRECT arg4, UINT arg5, LPDRAWTEXTPARAMS lpDTParams)
701{
702#ifdef DEBUG
703 WriteLog("USER32: DrawTextExA (not completely implemented) %s", arg2);
704#endif
705 return O32_DrawText(arg1, arg2, arg3, arg4, arg5);
706}
707//******************************************************************************
708//******************************************************************************
709int WIN32API GetSystemMetrics(int arg1)
710{
711 int rc;
712
713 switch(arg1) {
714 case SM_CXICONSPACING: //TODO: size of grid cell for large icons
715 rc = O32_GetSystemMetrics(SM_CXICON);
716 break;
717 case SM_CYICONSPACING:
718 rc = O32_GetSystemMetrics(SM_CYICON);
719 break;
720 case SM_PENWINDOWS:
721 rc = FALSE;
722 break;
723 case SM_DBCSENABLED:
724 rc = FALSE;
725 break;
726 case SM_CXEDGE: //size of 3D window edge (not supported)
727 rc = 1;
728 break;
729 case SM_CYEDGE:
730 rc = 1;
731 break;
732 case SM_CXMINSPACING: //can be SM_CXMINIMIZED or larger
733 rc = O32_GetSystemMetrics(SM_CXMINIMIZED);
734 break;
735 case SM_CYMINSPACING:
736 rc = GetSystemMetrics(SM_CYMINIMIZED);
737 break;
738 case SM_CXSMICON: //recommended size of small icons (TODO: adjust to screen res.)
739 rc = 16;
740 break;
741 case SM_CYSMICON:
742 rc = 16;
743 break;
744 case SM_CYSMCAPTION: //size in pixels of a small caption (TODO: ????)
745 rc = 8;
746 break;
747 case SM_CXSMSIZE: //size of small caption buttons (pixels) (TODO: implement properly)
748 rc = 16;
749 break;
750 case SM_CYSMSIZE:
751 rc = 16;
752 break;
753 case SM_CXMENUSIZE: //TODO: size of menu bar buttons (such as MDI window close)
754 rc = 16;
755 break;
756 case SM_CYMENUSIZE:
757 rc = 16;
758 break;
759 case SM_ARRANGE:
760 rc = ARW_BOTTOMLEFT | ARW_LEFT;
761 break;
762 case SM_CXMINIMIZED:
763 break;
764 case SM_CYMINIMIZED:
765 break;
766 case SM_CXMAXTRACK: //max window size
767 case SM_CXMAXIMIZED: //max toplevel window size
768 rc = O32_GetSystemMetrics(SM_CXSCREEN);
769 break;
770 case SM_CYMAXTRACK:
771 case SM_CYMAXIMIZED:
772 rc = O32_GetSystemMetrics(SM_CYSCREEN);
773 break;
774 case SM_NETWORK:
775 rc = 0x01; //TODO: default = yes
776 break;
777 case SM_CLEANBOOT:
778 rc = 0; //normal boot
779 break;
780 case SM_CXDRAG: //nr of pixels before drag becomes a real one
781 rc = 2;
782 break;
783 case SM_CYDRAG:
784 rc = 2;
785 break;
786 case SM_SHOWSOUNDS: //show instead of play sound
787 rc = FALSE;
788 break;
789 case SM_CXMENUCHECK:
790 rc = 4; //TODO
791 break;
792 case SM_CYMENUCHECK:
793 rc = O32_GetSystemMetrics(SM_CYMENU);
794 break;
795 case SM_SLOWMACHINE:
796 rc = FALSE; //even a slow machine is fast with OS/2 :)
797 break;
798 case SM_MIDEASTENABLED:
799 rc = FALSE;
800 break;
801 case SM_CMETRICS:
802 rc = O32_GetSystemMetrics(44); //Open32 changed this one
803 break;
804 default:
805 rc = O32_GetSystemMetrics(arg1);
806 break;
807 }
808#ifdef DEBUG
809 WriteLog("USER32: GetSystemMetrics %d returned %d\n", arg1, rc);
810#endif
811 return(rc);
812}
813//******************************************************************************
814//******************************************************************************
815UINT WIN32API SetTimer( HWND arg1, UINT arg2, UINT arg3, TIMERPROC arg4)
816{
817#ifdef DEBUG
818 WriteLog("USER32: SetTimer INCORRECT CALLING CONVENTION FOR HANDLER!!!!!\n");
819#endif
820 //SvL: Write callback handler class for this one
821 return O32_SetTimer(arg1, arg2, arg3, (TIMERPROC_O32)arg4);
822}
823//******************************************************************************
824//******************************************************************************
825BOOL WIN32API KillTimer(HWND arg1, UINT arg2)
826{
827#ifdef DEBUG
828 WriteLog("USER32: KillTimer\n");
829#endif
830 return O32_KillTimer(arg1, arg2);
831}
832//******************************************************************************
833//******************************************************************************
834BOOL WIN32API DestroyWindow(HWND arg1)
835{
836#ifdef DEBUG
837 WriteLog("USER32: DestroyWindow\n");
838#endif
839 return O32_DestroyWindow(arg1);
840}
841//******************************************************************************
842//******************************************************************************
843BOOL WIN32API PostMessageA( HWND arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
844{
845#ifdef DEBUG
846 WriteLog("USER32: PostMessageA %X %X %X %X\n", arg1, arg2, arg3, arg4);
847#endif
848 return O32_PostMessage(arg1, arg2, arg3, arg4);
849}
850//******************************************************************************
851//******************************************************************************
852BOOL WIN32API InflateRect( PRECT arg1, int arg2, int arg3)
853{
854#ifdef DEBUG
855 WriteLog("USER32: InflateRect\n");
856#endif
857 return O32_InflateRect(arg1, arg2, arg3);
858}
859//******************************************************************************
860//TODO:How can we emulate this one in OS/2???
861//******************************************************************************
862DWORD WIN32API WaitForInputIdle(HANDLE hProcess, DWORD dwTimeOut)
863{
864#ifdef DEBUG
865 WriteLog("USER32: WaitForInputIdle (Not Implemented) %d\n", dwTimeOut);
866#endif
867
868 if(dwTimeOut == INFINITE) return(0);
869
870// DosSleep(dwTimeOut/16);
871 return(0);
872}
873//******************************************************************************
874//******************************************************************************
875UINT WIN32API GetDlgItemTextA(HWND arg1, int arg2, LPSTR arg3, UINT arg4)
876{
877 UINT rc;
878
879 rc = O32_GetDlgItemText(arg1, arg2, arg3, arg4);
880#ifdef DEBUG
881 if(rc)
882 WriteLog("USER32: GetDlgItemTextA returned %s\n", arg3);
883 else WriteLog("USER32: GetDlgItemTextA returned 0 (%d)\n", GetLastError());
884#endif
885 return(rc);
886}
887//******************************************************************************
888//******************************************************************************
889BOOL WIN32API PeekMessageA(LPMSG arg1, HWND arg2, UINT arg3, UINT arg4, UINT arg5)
890{
891#ifdef DEBUG
892// WriteLog("USER32: PeekMessage\n");
893#endif
894 return O32_PeekMessage(arg1, arg2, arg3, arg4, arg5);
895}
896//******************************************************************************
897//******************************************************************************
898int WIN32API ShowCursor( BOOL arg1)
899{
900#ifdef DEBUG
901 WriteLog("USER32: ShowCursor\n");
902#endif
903 return O32_ShowCursor(arg1);
904}
905//******************************************************************************
906//BUGBUG: UpdateWindow sends a WM_ERASEBKGRND when it shouldn't!
907// So we just do it manually
908//******************************************************************************
909BOOL WIN32API UpdateWindow(HWND hwnd)
910{
911 RECT rect;
912
913#ifdef DEBUG
914 WriteLog("USER32: UpdateWindow\n");
915#endif
916 if(O32_GetUpdateRect(hwnd, &rect, FALSE) != FALSE) {//update region empty?
917 WndCallback(hwnd, WM_PAINT, 0, 0);
918// O32_PostMessage(hwnd, WM_PAINT, 0, 0);
919 }
920#ifdef DEBUG
921 else WriteLog("USER32: Update region empty!\n");
922#endif
923 return(TRUE);
924}
925//******************************************************************************
926//******************************************************************************
927BOOL WIN32API AdjustWindowRect( PRECT arg1, DWORD arg2, BOOL arg3)
928{
929#ifdef DEBUG
930 WriteLog("USER32: AdjustWindowRect\n");
931#endif
932 return O32_AdjustWindowRect(arg1, arg2, arg3);
933}
934//******************************************************************************
935//******************************************************************************
936BOOL WIN32API AdjustWindowRectEx( PRECT arg1, DWORD arg2, BOOL arg3, DWORD arg4)
937{
938#ifdef DEBUG
939 WriteLog("USER32: AdjustWindowRectEx\n");
940#endif
941 return O32_AdjustWindowRectEx(arg1, arg2, arg3, arg4);
942}
943//******************************************************************************
944//******************************************************************************
945BOOL WIN32API ClientToScreen( HWND arg1, PPOINT arg2)
946{
947#ifdef DEBUG
948//// WriteLog("USER32: ClientToScreen\n");
949#endif
950 return O32_ClientToScreen(arg1, arg2);
951}
952//******************************************************************************
953//******************************************************************************
954BOOL WIN32API SetRect( PRECT arg1, int arg2, int arg3, int arg4, int arg5)
955{
956#ifdef DEBUG
957 WriteLog("USER32: SetRect\n");
958#endif
959 return O32_SetRect(arg1, arg2, arg3, arg4, arg5);
960}
961//******************************************************************************
962//******************************************************************************
963LONG WIN32API GetWindowLongA(HWND hwnd, int nIndex)
964{
965 LONG rc;
966
967#ifdef DEBUG
968 WriteLog("USER32: GetWindowLong %X %d\n", hwnd, nIndex);
969#endif
970 if(nIndex == GWL_WNDPROC || nIndex == DWL_DLGPROC) {
971 Win32WindowProc *window = Win32WindowProc::FindProc(hwnd);
972 if(window && !(nIndex == DWL_DLGPROC && window->IsWindow() == TRUE)) {
973 return (LONG)window->GetWin32Callback();
974 }
975 }
976 rc = O32_GetWindowLong(hwnd, nIndex);
977#ifdef DEBUG
978 WriteLog("USER32: GetWindowLong returned %X\n", rc);
979#endif
980 return(rc);
981}
982//******************************************************************************
983//******************************************************************************
984BOOL WIN32API SetDlgItemInt( HWND arg1, int arg2, UINT arg3, BOOL arg4)
985{
986#ifdef DEBUG
987 WriteLog("USER32: SetDlgItemInt\n");
988#endif
989 return O32_SetDlgItemInt(arg1, arg2, arg3, arg4);
990}
991//******************************************************************************
992//******************************************************************************
993BOOL WIN32API SetDlgItemTextA( HWND arg1, int arg2, LPCSTR arg3)
994{
995#ifdef DEBUG
996 WriteLog("USER32: SetDlgItemText to %s\n", arg3);
997#endif
998 return O32_SetDlgItemText(arg1, arg2, arg3);
999}
1000//******************************************************************************
1001//******************************************************************************
1002BOOL WIN32API WinHelpA( HWND arg1, LPCSTR arg2, UINT arg3, DWORD arg4)
1003{
1004#ifdef DEBUG
1005 WriteLog("USER32: WinHelp not implemented %s\n", arg2);
1006#endif
1007// return O32_WinHelp(arg1, arg2, arg3, arg4);
1008 return(TRUE);
1009}
1010//******************************************************************************
1011//******************************************************************************
1012BOOL WIN32API IsIconic( HWND arg1)
1013{
1014#ifdef DEBUG
1015 WriteLog("USER32: IsIconic\n");
1016#endif
1017 return O32_IsIconic(arg1);
1018}
1019//******************************************************************************
1020//******************************************************************************
1021int WIN32API TranslateAcceleratorA(HWND arg1, HACCEL arg2, LPMSG arg3)
1022{
1023#ifdef DEBUG
1024//// WriteLog("USER32: TranslateAccelerator\n");
1025#endif
1026 return O32_TranslateAccelerator(arg1, arg2, arg3);
1027}
1028//******************************************************************************
1029//******************************************************************************
1030HWND WIN32API GetWindow(HWND arg1, UINT arg2)
1031{
1032 HWND rc;
1033
1034 rc = O32_GetWindow(arg1, arg2);
1035#ifdef DEBUG
1036 WriteLog("USER32: GetWindow %X %d returned %d\n", arg1, arg2, rc);
1037#endif
1038 return(rc);
1039}
1040//******************************************************************************
1041//******************************************************************************
1042HDC WIN32API GetWindowDC(HWND arg1)
1043{
1044#ifdef DEBUG
1045 WriteLog("USER32: GetWindowDC\n");
1046#endif
1047 return O32_GetWindowDC(arg1);
1048}
1049//******************************************************************************
1050//******************************************************************************
1051BOOL WIN32API SubtractRect( PRECT arg1, const RECT * arg2, const RECT * arg3)
1052{
1053#ifdef DEBUG
1054 WriteLog("USER32: SubtractRect");
1055#endif
1056 return O32_SubtractRect(arg1, arg2, arg3);
1057}
1058//******************************************************************************
1059//SvL: 24-6-'97 - Added
1060//******************************************************************************
1061BOOL WIN32API ClipCursor(const RECT * arg1)
1062{
1063#ifdef DEBUG
1064 WriteLog("USER32: ClipCursor\n");
1065#endif
1066 return O32_ClipCursor(arg1);
1067}
1068//******************************************************************************
1069//SvL: 24-6-'97 - Added
1070//TODO: Not implemented
1071//******************************************************************************
1072WORD WIN32API GetAsyncKeyState(INT nVirtKey)
1073{
1074#ifdef DEBUG
1075//// WriteLog("USER32: GetAsyncKeyState Not implemented\n");
1076#endif
1077 return 0;
1078}
1079//******************************************************************************
1080//SvL: 24-6-'97 - Added
1081//******************************************************************************
1082HCURSOR WIN32API GetCursor(void)
1083{
1084#ifdef DEBUG
1085//// WriteLog("USER32: GetCursor\n");
1086#endif
1087 return O32_GetCursor();
1088}
1089//******************************************************************************
1090//SvL: 24-6-'97 - Added
1091//******************************************************************************
1092BOOL WIN32API GetCursorPos( PPOINT arg1)
1093{
1094#ifdef DEBUG
1095//// WriteLog("USER32: GetCursorPos\n");
1096#endif
1097 return O32_GetCursorPos(arg1);
1098}
1099//******************************************************************************
1100//SvL: 24-6-'97 - Added
1101//******************************************************************************
1102UINT WIN32API RegisterWindowMessageA(LPCSTR arg1)
1103{
1104 UINT rc;
1105
1106 rc = O32_RegisterWindowMessage(arg1);
1107#ifdef DEBUG
1108 WriteLog("USER32: RegisterWindowMessageA %s returned %X\n", arg1, rc);
1109#endif
1110 return(rc);
1111}
1112//******************************************************************************
1113//SvL: 24-6-'97 - Added
1114//******************************************************************************
1115WORD WIN32API VkKeyScanA( char arg1)
1116{
1117#ifdef DEBUG
1118 WriteLog("USER32: VkKeyScanA\n");
1119#endif
1120 return O32_VkKeyScan(arg1);
1121}
1122//******************************************************************************
1123//SvL: 24-6-'97 - Added
1124//******************************************************************************
1125SHORT WIN32API GetKeyState( int arg1)
1126{
1127#ifdef DEBUG
1128 WriteLog("USER32: GetKeyState %d\n", arg1);
1129#endif
1130 return O32_GetKeyState(arg1);
1131}
1132//******************************************************************************
1133//******************************************************************************
1134HCURSOR WIN32API SetCursor( HCURSOR arg1)
1135{
1136#ifdef DEBUG
1137 WriteLog("USER32: SetCursor\n");
1138#endif
1139 return O32_SetCursor(arg1);
1140}
1141//******************************************************************************
1142//******************************************************************************
1143BOOL WIN32API SetCursorPos( int arg1, int arg2)
1144{
1145#ifdef DEBUG
1146 WriteLog("USER32: SetCursorPos\n");
1147#endif
1148 return O32_SetCursorPos(arg1, arg2);
1149}
1150//******************************************************************************
1151//******************************************************************************
1152BOOL WIN32API EnableScrollBar( HWND arg1, INT arg2, UINT arg3)
1153{
1154#ifdef DEBUG
1155 WriteLog("USER32: EnableScrollBar\n");
1156#endif
1157 return O32_EnableScrollBar(arg1, arg2, arg3);
1158}
1159//******************************************************************************
1160//******************************************************************************
1161BOOL WIN32API EnableWindow( HWND arg1, BOOL arg2)
1162{
1163#ifdef DEBUG
1164 WriteLog("USER32: EnableWindow\n");
1165#endif
1166 return O32_EnableWindow(arg1, arg2);
1167}
1168//******************************************************************************
1169//******************************************************************************
1170HWND WIN32API SetCapture( HWND arg1)
1171{
1172#ifdef DEBUG
1173 WriteLog("USER32: SetCapture\n");
1174#endif
1175 return O32_SetCapture(arg1);
1176}
1177//******************************************************************************
1178//******************************************************************************
1179BOOL WIN32API ReleaseCapture(void)
1180{
1181#ifdef DEBUG
1182 WriteLog("USER32: ReleaseCapture\n");
1183#endif
1184 return O32_ReleaseCapture();
1185}
1186//******************************************************************************
1187//******************************************************************************
1188DWORD WIN32API MsgWaitForMultipleObjects( DWORD arg1, LPHANDLE arg2, BOOL arg3, DWORD arg4, DWORD arg5)
1189{
1190#ifdef DEBUG
1191 WriteLog("USER32: MsgWaitForMultipleObjects\n");
1192#endif
1193 return O32_MsgWaitForMultipleObjects(arg1, arg2, arg3, arg4, arg5);
1194}
1195//******************************************************************************
1196//******************************************************************************
1197HDWP WIN32API BeginDeferWindowPos( int arg1)
1198{
1199#ifdef DEBUG
1200 WriteLog("USER32: BeginDeferWindowPos\n");
1201#endif
1202 return O32_BeginDeferWindowPos(arg1);
1203}
1204//******************************************************************************
1205//******************************************************************************
1206BOOL WIN32API BringWindowToTop( HWND arg1)
1207{
1208#ifdef DEBUG
1209 WriteLog("USER32: BringWindowToTop\n");
1210#endif
1211 return O32_BringWindowToTop(arg1);
1212}
1213//******************************************************************************
1214//******************************************************************************
1215BOOL WIN32API CallMsgFilterA( LPMSG arg1, int arg2)
1216{
1217#ifdef DEBUG
1218 WriteLog("USER32: CallMsgFilterA\n");
1219#endif
1220 return O32_CallMsgFilter(arg1, arg2);
1221}
1222//******************************************************************************
1223//******************************************************************************
1224BOOL WIN32API CallMsgFilterW( LPMSG arg1, int arg2)
1225{
1226#ifdef DEBUG
1227 WriteLog("USER32: CallMsgFilterW\n");
1228#endif
1229 // NOTE: This will not work as is (needs UNICODE support)
1230 return O32_CallMsgFilter(arg1, arg2);
1231}
1232//******************************************************************************
1233//******************************************************************************
1234LRESULT WIN32API CallWindowProcA(WNDPROC wndprcPrev,
1235 HWND arg2,
1236 UINT arg3,
1237 WPARAM arg4,
1238 LPARAM arg5)
1239{
1240#ifdef DEBUG
1241//// WriteLog("USER32: CallWindowProcA %X hwnd=%X, msg = %X\n", wndprcPrev, arg2, arg3);
1242#endif
1243
1244 if(Win32WindowSubProc::FindSubProc((WNDPROC_O32)wndprcPrev) != NULL) {
1245 WNDPROC_O32 orgprc = (WNDPROC_O32)wndprcPrev; //is original Open32 system class callback (_System)
1246 return orgprc(arg2, arg3, arg4, arg5);
1247 }
1248 else return wndprcPrev(arg2, arg3, arg4, arg5); //win32 callback (__stdcall)
1249}
1250//******************************************************************************
1251//******************************************************************************
1252LRESULT WIN32API CallWindowProcW(WNDPROC arg1,
1253 HWND arg2,
1254 UINT arg3,
1255 WPARAM arg4,
1256 LPARAM arg5)
1257{
1258 dprintf(("USER32: CallWindowProcW(%08xh,%08xh,%08xh,%08xh,%08xh) not properly implemented.\n",
1259 arg1,
1260 arg2,
1261 arg3,
1262 arg4,
1263 arg5));
1264
1265 return CallWindowProcA(arg1,
1266 arg2,
1267 arg3,
1268 arg4,
1269 arg5);
1270}
1271//******************************************************************************
1272//******************************************************************************
1273BOOL WIN32API ChangeClipboardChain( HWND arg1, HWND arg2)
1274{
1275#ifdef DEBUG
1276 WriteLog("USER32: ChangeClipboardChain\n");
1277#endif
1278 return O32_ChangeClipboardChain(arg1, arg2);
1279}
1280//******************************************************************************
1281//******************************************************************************
1282UINT WIN32API ArrangeIconicWindows( HWND arg1)
1283{
1284#ifdef DEBUG
1285 WriteLog("USER32: ArrangeIconicWindows\n");
1286#endif
1287 return O32_ArrangeIconicWindows(arg1);
1288}
1289//******************************************************************************
1290// Not implemented by Open32 (5-31-99 Christoph Bratschi)
1291// Quick and dirty implementation
1292//******************************************************************************
1293BOOL WIN32API CheckRadioButton( HWND arg1, UINT arg2, UINT arg3, UINT arg4)
1294{
1295#ifdef DEBUG
1296 WriteLog("USER32: CheckRadioButton\n");
1297#endif
1298// return O32_CheckRadioButton(arg1, arg2, arg3, arg4);
1299 if (arg2 > arg3) return (FALSE);
1300 for (UINT x=arg2;x <= arg3;x++)
1301 {
1302 SendDlgItemMessageA(arg1,x,BM_SETCHECK,(x == arg4) ? BST_CHECKED : BST_UNCHECKED,0);
1303 }
1304 return (TRUE);
1305}
1306//******************************************************************************
1307//******************************************************************************
1308HWND WIN32API ChildWindowFromPoint( HWND arg1, POINT arg2)
1309{
1310#ifdef DEBUG
1311 WriteLog("USER32: ChildWindowFromPoint\n");
1312#endif
1313 return O32_ChildWindowFromPoint(arg1, arg2);
1314}
1315//******************************************************************************
1316//******************************************************************************
1317HWND WIN32API ChildWindowFromPointEx(HWND arg1, POINT arg2, UINT uFlags)
1318{
1319#ifdef DEBUG
1320 WriteLog("USER32: ChildWindowFromPointEx, not completely supported!\n");
1321#endif
1322 return O32_ChildWindowFromPoint(arg1, arg2);
1323}
1324//******************************************************************************
1325//******************************************************************************
1326BOOL WIN32API CloseClipboard(void)
1327{
1328#ifdef DEBUG
1329 WriteLog("USER32: CloseClipboard\n");
1330#endif
1331 return O32_CloseClipboard();
1332}
1333//******************************************************************************
1334//******************************************************************************
1335BOOL WIN32API CloseWindow( HWND arg1)
1336{
1337#ifdef DEBUG
1338 WriteLog("USER32: CloseWindow\n");
1339#endif
1340 return O32_CloseWindow(arg1);
1341}
1342//******************************************************************************
1343//******************************************************************************
1344HICON WIN32API CopyIcon( HICON arg1)
1345{
1346#ifdef DEBUG
1347 WriteLog("USER32: CopyIcon\n");
1348#endif
1349 return O32_CopyIcon(arg1);
1350}
1351//******************************************************************************
1352//******************************************************************************
1353int WIN32API CountClipboardFormats(void)
1354{
1355#ifdef DEBUG
1356 WriteLog("USER32: CountClipboardFormats\n");
1357#endif
1358 return O32_CountClipboardFormats();
1359}
1360//******************************************************************************
1361//******************************************************************************
1362HACCEL WIN32API CreateAcceleratorTableA( LPACCEL arg1, int arg2)
1363{
1364#ifdef DEBUG
1365 WriteLog("USER32: CreateAcceleratorTableA\n");
1366#endif
1367 return O32_CreateAcceleratorTable(arg1, arg2);
1368}
1369//******************************************************************************
1370//******************************************************************************
1371HACCEL WIN32API CreateAcceleratorTableW( LPACCEL arg1, int arg2)
1372{
1373#ifdef DEBUG
1374 WriteLog("USER32: CreateAcceleratorTableW\n");
1375#endif
1376 // NOTE: This will not work as is (needs UNICODE support)
1377 return O32_CreateAcceleratorTable(arg1, arg2);
1378}
1379//******************************************************************************
1380//******************************************************************************
1381BOOL WIN32API CreateCaret( HWND arg1, HBITMAP arg2, int arg3, int arg4)
1382{
1383#ifdef DEBUG
1384 WriteLog("USER32: CreateCaret\n");
1385#endif
1386 return O32_CreateCaret(arg1, arg2, arg3, arg4);
1387}
1388//******************************************************************************
1389//******************************************************************************
1390HCURSOR WIN32API CreateCursor( HINSTANCE arg1, int arg2, int arg3, int arg4, int arg5, const VOID * arg6, const VOID * arg7)
1391{
1392#ifdef DEBUG
1393 WriteLog("USER32: CreateCursor\n");
1394#endif
1395 return O32_CreateCursor(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
1396}
1397//******************************************************************************
1398//******************************************************************************
1399HICON WIN32API CreateIcon( HINSTANCE arg1, INT arg2, INT arg3, BYTE arg4, BYTE arg5, LPCVOID arg6, LPCVOID arg7)
1400{
1401#ifdef DEBUG
1402 WriteLog("USER32: CreateIcon\n");
1403#endif
1404 return O32_CreateIcon(arg1, arg2, arg3, arg4, arg5, (const BYTE *)arg6, (const BYTE *)arg7);
1405}
1406//******************************************************************************
1407//ASSERT dwVer == win31 (ok according to SDK docs)
1408//******************************************************************************
1409HICON WIN32API CreateIconFromResource(PBYTE presbits, UINT dwResSize,
1410 BOOL fIcon, DWORD dwVer)
1411{
1412 HICON hicon;
1413 DWORD OS2ResSize = 0;
1414 PBYTE OS2Icon = ConvertWin32Icon(presbits, dwResSize, &OS2ResSize);
1415
1416 hicon = O32_CreateIconFromResource(OS2Icon, OS2ResSize, fIcon, dwVer);
1417#ifdef DEBUG
1418 WriteLog("USER32: CreateIconFromResource returned %X (%X)\n", hicon, GetLastError());
1419#endif
1420 if(OS2Icon)
1421 FreeIcon(OS2Icon);
1422
1423 return(hicon);
1424}
1425//******************************************************************************
1426//******************************************************************************
1427HICON WIN32API CreateIconFromResourceEx(PBYTE presbits, UINT dwResSize,
1428 BOOL fIcon, DWORD dwVer,
1429 int cxDesired, int cyDesired,
1430 UINT Flags)
1431{
1432#ifdef DEBUG
1433 WriteLog("USER32: CreateIconFromResourceEx %X %d %d %X %d %d %X, not completely supported!\n", presbits, dwResSize, fIcon, dwVer, cxDesired, cyDesired, Flags);
1434#endif
1435 return CreateIconFromResource(presbits, dwResSize, fIcon, dwVer);
1436}
1437//******************************************************************************
1438//******************************************************************************
1439HICON WIN32API CreateIconIndirect(LPICONINFO arg1)
1440{
1441#ifdef DEBUG
1442 WriteLog("USER32: CreateIconIndirect\n");
1443#endif
1444 return O32_CreateIconIndirect(arg1);
1445}
1446//******************************************************************************
1447//******************************************************************************
1448HWND WIN32API CreateMDIWindowA(LPCSTR arg1, LPCSTR arg2, DWORD arg3,
1449 int arg4, int arg5, int arg6, int arg7,
1450 HWND arg8, HINSTANCE arg9, LPARAM arg10)
1451{
1452 HWND hwnd;
1453
1454#ifdef DEBUG
1455 WriteLog("USER32: CreateMDIWindowA\n");
1456#endif
1457 Win32WindowProc *window = new Win32WindowProc(arg9, arg1);
1458 hwnd = O32_CreateMDIWindow((LPSTR)arg1, (LPSTR)arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
1459 //SvL: 16-11-'97: window can be already destroyed if hwnd == 0
1460 if(hwnd == 0 && window != 0 && Win32WindowProc::FindWindowProc(window)) {
1461 delete(window);
1462 window = 0;
1463 }
1464
1465#ifdef DEBUG
1466 WriteLog("USER32: CreateMDIWindowA returned %X\n", hwnd);
1467#endif
1468 return hwnd;
1469}
1470//******************************************************************************
1471//******************************************************************************
1472HWND WIN32API CreateMDIWindowW(LPCWSTR arg1, LPCWSTR arg2, DWORD arg3, int arg4,
1473 int arg5, int arg6, int arg7, HWND arg8, HINSTANCE arg9,
1474 LPARAM arg10)
1475{
1476 HWND hwnd;
1477 char *astring1 = NULL, *astring2 = NULL;
1478 Win32WindowProc *window = NULL;
1479
1480 if((int)arg1 >> 16 != 0) {
1481 astring1 = UnicodeToAsciiString((LPWSTR)arg1);
1482 }
1483 else astring1 = (char *)arg2;
1484
1485 astring2 = UnicodeToAsciiString((LPWSTR)arg2);
1486
1487 //Classname might be name of system class, in which case we don't
1488 //need to use our own callback
1489// if(Win32WindowClass::FindClass((LPSTR)astring1) != NULL) {
1490 window = new Win32WindowProc(arg9, astring1);
1491// }
1492 hwnd = O32_CreateMDIWindow(astring1, astring2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
1493 //SvL: 16-11-'97: window can be already destroyed if hwnd == 0
1494 if(hwnd == 0 && window != 0 && Win32WindowProc::FindWindowProc(window)) {
1495 delete(window);
1496 window = 0;
1497 }
1498 if(window) {
1499 window->SetWindowHandle(hwnd);
1500 }
1501
1502 if(astring1) FreeAsciiString(astring1);
1503 FreeAsciiString(astring2);
1504#ifdef DEBUG
1505 WriteLog("USER32: CreateMDIWindowW hwnd = %X\n", hwnd);
1506#endif
1507 return(hwnd);
1508}
1509//******************************************************************************
1510//******************************************************************************
1511HWND WIN32API CreateWindowExW(DWORD arg1,
1512 LPCWSTR arg2,
1513 LPCWSTR arg3,
1514 DWORD dwStyle,
1515 int arg5,
1516 int arg6,
1517 int arg7,
1518 int arg8,
1519 HWND arg9,
1520 HMENU arg10,
1521 HINSTANCE arg11,
1522 PVOID arg12)
1523{
1524 HWND hwnd;
1525 char *astring1 = NULL,
1526 *astring2 = NULL;
1527 Win32WindowProc *window = NULL;
1528
1529 /* @@@PH 98/06/21 changed to call OS2CreateWindowExA */
1530 if((int)arg2 >> 16 != 0)
1531 astring1 = UnicodeToAsciiString((LPWSTR)arg2);
1532 else
1533 astring1 = (char *)arg2;
1534
1535 astring2 = UnicodeToAsciiString((LPWSTR)arg3);
1536
1537#ifdef DEBUG
1538 WriteLog("USER32: CreateWindowExW: dwExStyle = %X\n", arg1);
1539 if((int)arg2 >> 16 != 0)
1540 WriteLog("USER32: CreateWindow: classname = %s\n", astring1);
1541 else WriteLog("USER32: CreateWindow: classname = %X\n", arg2);
1542 WriteLog("USER32: CreateWindow: windowname= %s\n", astring2);
1543 WriteLog("USER32: CreateWindow: dwStyle = %X\n", dwStyle);
1544 WriteLog("USER32: CreateWindow: x = %d\n", arg5);
1545 WriteLog("USER32: CreateWindow: y = %d\n", arg6);
1546 WriteLog("USER32: CreateWindow: nWidth = %d\n", arg7);
1547 WriteLog("USER32: CreateWindow: nHeight = %d\n", arg8);
1548 WriteLog("USER32: CreateWindow: parent = %X\n", arg9);
1549 WriteLog("USER32: CreateWindow: hwmenu = %X\n", arg10);
1550 WriteLog("USER32: CreateWindow: hinstance = %X\n", arg11);
1551 WriteLog("USER32: CreateWindow: param = %X\n", arg12);
1552 #endif
1553
1554 hwnd = CreateWindowExA(arg1,
1555 astring1,
1556 astring2,
1557 dwStyle,
1558 arg5,
1559 arg6,
1560 arg7,
1561 arg8,
1562 arg9,
1563 arg10,
1564 arg11,
1565 arg12);
1566
1567 if(astring1)
1568 FreeAsciiString(astring1);
1569
1570 FreeAsciiString(astring2);
1571
1572#ifdef DEBUG
1573 WriteLog("USER32: ************CreateWindowExW hwnd = %X (%X)\n", hwnd, GetLastError());
1574#endif
1575 return(hwnd);
1576}
1577//******************************************************************************
1578//******************************************************************************
1579HDWP WIN32API DeferWindowPos( HDWP arg1, HWND arg2, HWND arg3, int arg4, int arg5, int arg6, int arg7, UINT arg8)
1580{
1581#ifdef DEBUG
1582 WriteLog("USER32: DeferWindowPos\n");
1583#endif
1584 return O32_DeferWindowPos(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
1585}
1586//******************************************************************************
1587//******************************************************************************
1588BOOL WIN32API DestroyAcceleratorTable( HACCEL arg1)
1589{
1590#ifdef DEBUG
1591 WriteLog("USER32: DestroyAcceleratorTable\n");
1592#endif
1593 return O32_DestroyAcceleratorTable(arg1);
1594}
1595//******************************************************************************
1596//******************************************************************************
1597BOOL WIN32API DestroyCaret(void)
1598{
1599#ifdef DEBUG
1600 WriteLog("USER32: DestroyCaret\n");
1601#endif
1602 return O32_DestroyCaret();
1603}
1604//******************************************************************************
1605//******************************************************************************
1606BOOL WIN32API DestroyCursor( HCURSOR arg1)
1607{
1608#ifdef DEBUG
1609 WriteLog("USER32: DestroyCursor\n");
1610#endif
1611 return O32_DestroyCursor(arg1);
1612}
1613//******************************************************************************
1614//******************************************************************************
1615BOOL WIN32API DestroyIcon( HICON arg1)
1616{
1617#ifdef DEBUG
1618 WriteLog("USER32: DestroyIcon\n");
1619#endif
1620 return O32_DestroyIcon(arg1);
1621}
1622//******************************************************************************
1623//******************************************************************************
1624LONG WIN32API DispatchMessageW( const MSG * arg1)
1625{
1626#ifdef DEBUG
1627 WriteLog("USER32: DispatchMessageW\n");
1628#endif
1629 // NOTE: This will not work as is (needs UNICODE support)
1630 return O32_DispatchMessage(arg1);
1631}
1632//******************************************************************************
1633//******************************************************************************
1634int WIN32API DlgDirListA( HWND arg1, LPSTR arg2, int arg3, int arg4, UINT arg5)
1635{
1636#ifdef DEBUG
1637 WriteLog("USER32: DlgDirListA\n");
1638#endif
1639 return O32_DlgDirList(arg1, arg2, arg3, arg4, arg5);
1640}
1641//******************************************************************************
1642//******************************************************************************
1643int WIN32API DlgDirListComboBoxA( HWND arg1, LPSTR arg2, int arg3, int arg4, UINT arg5)
1644{
1645#ifdef DEBUG
1646 WriteLog("USER32: DlgDirListComboBoxA\n");
1647#endif
1648 return O32_DlgDirListComboBox(arg1, arg2, arg3, arg4, arg5);
1649}
1650//******************************************************************************
1651//******************************************************************************
1652int WIN32API DlgDirListComboBoxW( HWND arg1, LPWSTR arg2, int arg3, int arg4, UINT arg5)
1653{
1654#ifdef DEBUG
1655 WriteLog("USER32: DlgDirListComboBoxW NOT WORKING\n");
1656#endif
1657 // NOTE: This will not work as is (needs UNICODE support)
1658 return 0;
1659// return O32_DlgDirListComboBox(arg1, arg2, arg3, arg4, arg5);
1660}
1661//******************************************************************************
1662//******************************************************************************
1663int WIN32API DlgDirListW( HWND arg1, LPWSTR arg2, int arg3, int arg4, UINT arg5)
1664{
1665#ifdef DEBUG
1666 WriteLog("USER32: DlgDirListW NOT WORKING\n");
1667#endif
1668 // NOTE: This will not work as is (needs UNICODE support)
1669 return 0;
1670// return O32_DlgDirList(arg1, arg2, arg3, arg4, arg5);
1671}
1672//******************************************************************************
1673//******************************************************************************
1674BOOL WIN32API DlgDirSelectComboBoxExA( HWND arg1, LPSTR arg2, int arg3, int arg4)
1675{
1676#ifdef DEBUG
1677 WriteLog("USER32: DlgDirSelectComboBoxExA\n");
1678#endif
1679 return O32_DlgDirSelectComboBoxEx(arg1, arg2, arg3, arg4);
1680}
1681//******************************************************************************
1682//******************************************************************************
1683BOOL WIN32API DlgDirSelectComboBoxExW( HWND arg1, LPWSTR arg2, int arg3, int arg4)
1684{
1685#ifdef DEBUG
1686 WriteLog("USER32: DlgDirSelectComboBoxExW NOT WORKING\n");
1687#endif
1688 // NOTE: This will not work as is (needs UNICODE support)
1689 return 0;
1690// return O32_DlgDirSelectComboBoxEx(arg1, arg2, arg3, arg4);
1691}
1692//******************************************************************************
1693//******************************************************************************
1694BOOL WIN32API DlgDirSelectExA( HWND arg1, LPSTR arg2, int arg3, int arg4)
1695{
1696#ifdef DEBUG
1697 WriteLog("USER32: DlgDirSelectExA\n");
1698#endif
1699 return O32_DlgDirSelectEx(arg1, arg2, arg3, arg4);
1700}
1701//******************************************************************************
1702//******************************************************************************
1703BOOL WIN32API DlgDirSelectExW( HWND arg1, LPWSTR arg2, int arg3, int arg4)
1704{
1705#ifdef DEBUG
1706 WriteLog("USER32: DlgDirSelectExW NOT WORKING\n");
1707#endif
1708 // NOTE: This will not work as is (needs UNICODE support)
1709 return 0;
1710// return O32_DlgDirSelectEx(arg1, arg2, arg3, arg4);
1711}
1712//******************************************************************************
1713//******************************************************************************
1714BOOL WIN32API DrawFocusRect( HDC arg1, const RECT * arg2)
1715{
1716#ifdef DEBUG
1717 WriteLog("USER32: DrawFocusRect\n");
1718#endif
1719 return O32_DrawFocusRect(arg1, arg2);
1720}
1721//******************************************************************************
1722//******************************************************************************
1723BOOL WIN32API DrawIcon( HDC arg1, int arg2, int arg3, HICON arg4)
1724{
1725#ifdef DEBUG
1726 WriteLog("USER32: DrawIcon\n");
1727#endif
1728 return O32_DrawIcon(arg1, arg2, arg3, arg4);
1729}
1730//******************************************************************************
1731//******************************************************************************
1732BOOL WIN32API DrawIconEx(HDC hdc, int xLeft, int xRight, HICON hIcon,
1733 int cxWidth, int cyWidth, UINT istepIfAniCur,
1734 HBRUSH hbrFlickerFreeDraw, UINT diFlags)
1735{
1736#ifdef DEBUG
1737 WriteLog("USER32: DrawIcon, partially implemented\n");
1738#endif
1739 return O32_DrawIcon(hdc, xLeft, xRight, hIcon);
1740}
1741//******************************************************************************
1742//******************************************************************************
1743BOOL WIN32API DrawMenuBar( HWND arg1)
1744{
1745#ifdef DEBUG
1746 WriteLog("USER32: DrawMenuBar\n");
1747#endif
1748 return O32_DrawMenuBar(arg1);
1749}
1750//******************************************************************************
1751//******************************************************************************
1752int WIN32API DrawTextW( HDC arg1, LPCWSTR arg2, int arg3, PRECT arg4, UINT arg5)
1753{
1754 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
1755 int rc;
1756
1757#ifdef DEBUG
1758 WriteLog("USER32: DrawTextW %s\n", astring);
1759#endif
1760 rc = O32_DrawText(arg1, astring, arg3, arg4, arg5);
1761 FreeAsciiString(astring);
1762 return(rc);
1763}
1764//******************************************************************************
1765//******************************************************************************
1766int WIN32API DrawTextExW(HDC arg1, LPCWSTR arg2, int arg3, PRECT arg4, UINT arg5, LPDRAWTEXTPARAMS lpDTParams)
1767{
1768 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
1769 int rc;
1770
1771#ifdef DEBUG
1772 WriteLog("USER32: DrawTextExW (not completely supported) %s\n", astring);
1773#endif
1774 rc = O32_DrawText(arg1, astring, arg3, arg4, arg5);
1775 FreeAsciiString(astring);
1776 return(rc);
1777}
1778//******************************************************************************
1779//******************************************************************************
1780BOOL WIN32API EmptyClipboard(void)
1781{
1782#ifdef DEBUG
1783 WriteLog("USER32: EmptyClipboard\n");
1784#endif
1785 return O32_EmptyClipboard();
1786}
1787//******************************************************************************
1788//******************************************************************************
1789BOOL WIN32API EndDeferWindowPos( HDWP arg1)
1790{
1791#ifdef DEBUG
1792 WriteLog("USER32: EndDeferWindowPos\n");
1793#endif
1794 return O32_EndDeferWindowPos(arg1);
1795}
1796//******************************************************************************
1797//******************************************************************************
1798BOOL WIN32API EnumChildWindows(HWND hwnd, WNDENUMPROC lpfn, LPARAM lParam)
1799{
1800 BOOL rc;
1801 EnumWindowCallback *callback = new EnumWindowCallback(lpfn, lParam);
1802
1803#ifdef DEBUG
1804 WriteLog("USER32: EnumChildWindows\n");
1805#endif
1806 rc = O32_EnumChildWindows(hwnd, callback->GetOS2Callback(), (LPARAM)callback);
1807 if(callback)
1808 delete callback;
1809 return(rc);
1810}
1811//******************************************************************************
1812//******************************************************************************
1813UINT WIN32API EnumClipboardFormats(UINT arg1)
1814{
1815#ifdef DEBUG
1816 WriteLog("USER32: EnumClipboardFormats\n");
1817#endif
1818 return O32_EnumClipboardFormats(arg1);
1819}
1820//******************************************************************************
1821//******************************************************************************
1822int WIN32API EnumPropsA(HWND arg1, PROPENUMPROCA arg2)
1823{
1824#ifdef DEBUG
1825 WriteLog("USER32: EnumPropsA DOES NOT WORK\n");
1826#endif
1827 //calling convention problems
1828 return 0;
1829// return O32_EnumProps(arg1, (PROPENUMPROC_O32)arg2);
1830}
1831//******************************************************************************
1832//******************************************************************************
1833int WIN32API EnumPropsExA( HWND arg1, PROPENUMPROCEXA arg2, LPARAM arg3)
1834{
1835#ifdef DEBUG
1836 WriteLog("USER32: EnumPropsExA DOES NOT WORK\n");
1837#endif
1838 //calling convention problems
1839 return 0;
1840// return O32_EnumPropsEx(arg1, arg2, (PROPENUMPROCEX_O32)arg3);
1841}
1842//******************************************************************************
1843//******************************************************************************
1844int WIN32API EnumPropsExW( HWND arg1, PROPENUMPROCEXW arg2, LPARAM arg3)
1845{
1846#ifdef DEBUG
1847 WriteLog("USER32: EnumPropsExW\n");
1848#endif
1849 // NOTE: This will not work as is (needs UNICODE support)
1850 //calling convention problems
1851 return 0;
1852// return O32_EnumPropsEx(arg1, arg2, arg3);
1853}
1854//******************************************************************************
1855//******************************************************************************
1856int WIN32API EnumPropsW( HWND arg1, PROPENUMPROCW arg2)
1857{
1858#ifdef DEBUG
1859 WriteLog("USER32: EnumPropsW\n");
1860#endif
1861 // NOTE: This will not work as is (needs UNICODE support)
1862 //calling convention problems
1863 return 0;
1864// return O32_EnumProps(arg1, arg2);
1865}
1866//******************************************************************************
1867//******************************************************************************
1868BOOL WIN32API EnumWindows(WNDENUMPROC lpfn, LPARAM lParam)
1869{
1870 BOOL rc;
1871 EnumWindowCallback *callback = new EnumWindowCallback(lpfn, lParam);
1872
1873#ifdef DEBUG
1874 WriteLog("USER32: EnumWindows\n");
1875#endif
1876 rc = O32_EnumWindows(callback->GetOS2Callback(), (LPARAM)callback);
1877 if(callback)
1878 delete callback;
1879 return(rc);
1880}
1881//******************************************************************************
1882//******************************************************************************
1883BOOL WIN32API EqualRect( const RECT * arg1, const RECT * arg2)
1884{
1885#ifdef DEBUG
1886 WriteLog("USER32: EqualRect\n");
1887#endif
1888 return O32_EqualRect(arg1, arg2);
1889}
1890//******************************************************************************
1891//******************************************************************************
1892BOOL WIN32API ExcludeUpdateRgn( HDC arg1, HWND arg2)
1893{
1894#ifdef DEBUG
1895 WriteLog("USER32: ExcludeUpdateRgn\n");
1896#endif
1897 return O32_ExcludeUpdateRgn(arg1, arg2);
1898}
1899//******************************************************************************
1900//******************************************************************************
1901BOOL WIN32API ExitWindowsEx( UINT arg1, DWORD arg2)
1902{
1903#ifdef DEBUG
1904 WriteLog("USER32: ExitWindowsEx\n");
1905#endif
1906 return O32_ExitWindowsEx(arg1, arg2);
1907}
1908//******************************************************************************
1909//******************************************************************************
1910int WIN32API FillRect(HDC arg1, const RECT * arg2, HBRUSH arg3)
1911{
1912#ifdef DEBUG
1913 WriteLog("USER32: FillRect (%d,%d)(%d,%d) brush %X\n", arg2->left, arg2->top, arg2->right, arg2->bottom, arg3);
1914#endif
1915 return O32_FillRect(arg1, arg2, arg3);
1916}
1917//******************************************************************************
1918//******************************************************************************
1919HWND WIN32API FindWindowW( LPCWSTR arg1, LPCWSTR arg2)
1920{
1921 char *astring1 = UnicodeToAsciiString((LPWSTR)arg1);
1922 char *astring2 = UnicodeToAsciiString((LPWSTR)arg2);
1923 HWND rc;
1924
1925#ifdef DEBUG
1926 WriteLog("USER32: FindWindowW\n");
1927#endif
1928 rc = O32_FindWindow(astring1, astring2);
1929 FreeAsciiString(astring1);
1930 FreeAsciiString(astring2);
1931 return rc;
1932}
1933//******************************************************************************
1934//******************************************************************************
1935int WIN32API FrameRect( HDC arg1, const RECT * arg2, HBRUSH arg3)
1936{
1937#ifdef DEBUG
1938 WriteLog("USER32: FrameRect\n");
1939#endif
1940 return O32_FrameRect(arg1, arg2, arg3);
1941}
1942//******************************************************************************
1943//******************************************************************************
1944HWND WIN32API GetCapture(void)
1945{
1946#ifdef DEBUG
1947 WriteLog("USER32: GetCapture\n");
1948#endif
1949 return O32_GetCapture();
1950}
1951//******************************************************************************
1952//******************************************************************************
1953UINT WIN32API GetCaretBlinkTime(void)
1954{
1955#ifdef DEBUG
1956 WriteLog("USER32: GetCaretBlinkTime\n");
1957#endif
1958 return O32_GetCaretBlinkTime();
1959}
1960//******************************************************************************
1961//******************************************************************************
1962BOOL WIN32API GetCaretPos( PPOINT arg1)
1963{
1964#ifdef DEBUG
1965 WriteLog("USER32: GetCaretPos\n");
1966#endif
1967 return O32_GetCaretPos(arg1);
1968}
1969//******************************************************************************
1970//******************************************************************************
1971BOOL WIN32API GetClipCursor( PRECT arg1)
1972{
1973#ifdef DEBUG
1974 WriteLog("USER32: GetClipCursor\n");
1975#endif
1976 return O32_GetClipCursor(arg1);
1977}
1978//******************************************************************************
1979//******************************************************************************
1980HANDLE WIN32API GetClipboardData( UINT arg1)
1981{
1982#ifdef DEBUG
1983 WriteLog("USER32: GetClipboardData\n");
1984#endif
1985 return O32_GetClipboardData(arg1);
1986}
1987//******************************************************************************
1988//******************************************************************************
1989int WIN32API GetClipboardFormatNameA( UINT arg1, LPSTR arg2, int arg3)
1990{
1991#ifdef DEBUG
1992 WriteLog("USER32: GetClipboardFormatNameA %s\n", arg2);
1993#endif
1994 return O32_GetClipboardFormatName(arg1, arg2, arg3);
1995}
1996//******************************************************************************
1997//******************************************************************************
1998int WIN32API GetClipboardFormatNameW(UINT arg1, LPWSTR arg2, int arg3)
1999{
2000 int rc;
2001 char *astring = UnicodeToAsciiString(arg2);
2002
2003#ifdef DEBUG
2004 WriteLog("USER32: GetClipboardFormatNameW %s\n", astring);
2005#endif
2006 rc = O32_GetClipboardFormatName(arg1, astring, arg3);
2007 FreeAsciiString(astring);
2008 return(rc);
2009}
2010//******************************************************************************
2011//******************************************************************************
2012HWND WIN32API GetClipboardOwner(void)
2013{
2014#ifdef DEBUG
2015 WriteLog("USER32: GetClipboardOwner\n");
2016#endif
2017 return O32_GetClipboardOwner();
2018}
2019//******************************************************************************
2020//******************************************************************************
2021HWND WIN32API GetClipboardViewer(void)
2022{
2023#ifdef DEBUG
2024 WriteLog("USER32: GetClipboardViewer\n");
2025#endif
2026 return O32_GetClipboardViewer();
2027}
2028//******************************************************************************
2029//******************************************************************************
2030DWORD WIN32API GetDialogBaseUnits(void)
2031{
2032#ifdef DEBUG
2033 WriteLog("USER32: GetDialogBaseUnits\n");
2034#endif
2035 return O32_GetDialogBaseUnits();
2036}
2037//******************************************************************************
2038//******************************************************************************
2039UINT WIN32API GetDlgItemInt( HWND arg1, int arg2, PBOOL arg3, BOOL arg4)
2040{
2041#ifdef DEBUG
2042 WriteLog("USER32: GetDlgItemInt\n");
2043#endif
2044 return O32_GetDlgItemInt(arg1, arg2, arg3, arg4);
2045}
2046
2047
2048/*****************************************************************************
2049 * Name : UINT WIN32API GetDlgItemTextW
2050 * Purpose : Determine the text of a window control
2051 * Parameters: HWND arg1
2052 * int arg2
2053 * LPWSTR arg3
2054 * UINT arg4
2055 * Variables :
2056 * Result :
2057 * Remark :
2058 * Status : UNTESTED UNKNOWN STUB
2059 *
2060 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2061 *****************************************************************************/
2062
2063UINT WIN32API GetDlgItemTextW(HWND arg1,
2064 int arg2,
2065 LPWSTR arg3,
2066 UINT arg4)
2067{
2068 LPSTR lpBuffer; /* temporary buffer for the ascii result */
2069 UINT uiResult; /* return value of the ascii variant */
2070
2071 dprintf(("USER32: GetDlgItemTextW(%08xh,%08xh,%08xh,%08xh)\n",
2072 arg1,
2073 arg2,
2074 arg3,
2075 arg4));
2076
2077
2078 lpBuffer = (LPSTR)malloc(arg4); /* allocate temporary buffer */
2079 uiResult = GetDlgItemTextA(arg1, /* call ascii variant */
2080 arg2,
2081 lpBuffer,
2082 arg4);
2083
2084 AsciiToUnicodeN(lpBuffer, /* now convert result to unicode */
2085 arg3,
2086 arg4);
2087
2088 free(lpBuffer); /* free the temporary buffer */
2089
2090 return (uiResult); /* OK, that's it */
2091}
2092
2093
2094//******************************************************************************
2095//******************************************************************************
2096UINT WIN32API GetDoubleClickTime(void)
2097{
2098#ifdef DEBUG
2099 WriteLog("USER32: GetDoubleClickTime\n");
2100#endif
2101 return O32_GetDoubleClickTime();
2102}
2103//******************************************************************************
2104//******************************************************************************
2105HWND WIN32API GetForegroundWindow(void)
2106{
2107#ifdef DEBUG
2108 WriteLog("USER32: GetForegroundWindow\n");
2109#endif
2110 return O32_GetForegroundWindow();
2111}
2112//******************************************************************************
2113//******************************************************************************
2114BOOL WIN32API GetIconInfo( HICON arg1, LPICONINFO arg2)
2115{
2116#ifdef DEBUG
2117 WriteLog("USER32: GetIconInfo\n");
2118#endif
2119 return O32_GetIconInfo(arg1, arg2);
2120}
2121//******************************************************************************
2122//******************************************************************************
2123int WIN32API GetKeyNameTextA( LPARAM arg1, LPSTR arg2, int arg3)
2124{
2125#ifdef DEBUG
2126 WriteLog("USER32: GetKeyNameTextA\n");
2127#endif
2128 return O32_GetKeyNameText(arg1, arg2, arg3);
2129}
2130//******************************************************************************
2131//******************************************************************************
2132int WIN32API GetKeyNameTextW( LPARAM arg1, LPWSTR arg2, int arg3)
2133{
2134#ifdef DEBUG
2135 WriteLog("USER32: GetKeyNameTextW DOES NOT WORK\n");
2136#endif
2137 // NOTE: This will not work as is (needs UNICODE support)
2138 return 0;
2139// return O32_GetKeyNameText(arg1, arg2, arg3);
2140}
2141//******************************************************************************
2142//******************************************************************************
2143int WIN32API GetKeyboardType( int arg1)
2144{
2145#ifdef DEBUG
2146 WriteLog("USER32: GetKeyboardType\n");
2147#endif
2148 return O32_GetKeyboardType(arg1);
2149}
2150//******************************************************************************
2151//******************************************************************************
2152HWND WIN32API GetLastActivePopup( HWND arg1)
2153{
2154#ifdef DEBUG
2155 WriteLog("USER32: GetLastActivePopup\n");
2156#endif
2157 return O32_GetLastActivePopup(arg1);
2158}
2159//******************************************************************************
2160//******************************************************************************
2161LONG WIN32API GetMessageExtraInfo(void)
2162{
2163 dprintf(("USER32: GetMessageExtraInfo\n"));
2164 return O32_GetMessageExtraInfo();
2165}
2166//******************************************************************************
2167//******************************************************************************
2168DWORD WIN32API GetMessagePos(void)
2169{
2170 dprintf(("USER32: GetMessagePos\n"));
2171 return O32_GetMessagePos();
2172}
2173//******************************************************************************
2174//******************************************************************************
2175LONG WIN32API GetMessageTime(void)
2176{
2177 dprintf(("USER32: GetMessageTime\n"));
2178 return O32_GetMessageTime();
2179}
2180//******************************************************************************
2181//******************************************************************************
2182BOOL WIN32API GetMessageW(LPMSG arg1, HWND arg2, UINT arg3, UINT arg4)
2183{
2184 BOOL rc;
2185
2186 // NOTE: This will not work as is (needs UNICODE support)
2187 rc = O32_GetMessage(arg1, arg2, arg3, arg4);
2188 dprintf(("USER32: GetMessageW %X returned %d\n", arg2, rc));
2189 return(rc);
2190}
2191//******************************************************************************
2192//******************************************************************************
2193HWND WIN32API GetNextDlgGroupItem( HWND arg1, HWND arg2, BOOL arg3)
2194{
2195#ifdef DEBUG
2196 WriteLog("USER32: GetNextDlgGroupItem\n");
2197#endif
2198 return O32_GetNextDlgGroupItem(arg1, arg2, arg3);
2199}
2200//******************************************************************************
2201//******************************************************************************
2202HWND WIN32API GetOpenClipboardWindow(void)
2203{
2204#ifdef DEBUG
2205 WriteLog("USER32: GetOpenClipboardWindow\n");
2206#endif
2207 return O32_GetOpenClipboardWindow();
2208}
2209//******************************************************************************
2210//******************************************************************************
2211HWND WIN32API GetParent( HWND arg1)
2212{
2213#ifdef DEBUG
2214//// WriteLog("USER32: GetParent\n");
2215#endif
2216 return O32_GetParent(arg1);
2217}
2218//******************************************************************************
2219//******************************************************************************
2220int WIN32API GetPriorityClipboardFormat( PUINT arg1, int arg2)
2221{
2222#ifdef DEBUG
2223 WriteLog("USER32: GetPriorityClipboardFormat\n");
2224#endif
2225 return O32_GetPriorityClipboardFormat(arg1, arg2);
2226}
2227//******************************************************************************
2228//******************************************************************************
2229HANDLE WIN32API GetPropA( HWND arg1, LPCSTR arg2)
2230{
2231#ifdef DEBUG
2232 if((int)arg2 >> 16 != 0)
2233 WriteLog("USER32: GetPropA %s\n", arg2);
2234 else WriteLog("USER32: GetPropA %X\n", arg2);
2235#endif
2236 return O32_GetProp(arg1, arg2);
2237}
2238//******************************************************************************
2239//******************************************************************************
2240HANDLE WIN32API GetPropW(HWND arg1, LPCWSTR arg2)
2241{
2242 BOOL handle;
2243 char *astring;
2244
2245 if((int)arg2 >> 16 != 0)
2246 astring = UnicodeToAsciiString((LPWSTR)arg2);
2247 else astring = (char *)arg2;
2248#ifdef DEBUG
2249 if((int)arg2 >> 16 != 0)
2250 WriteLog("USER32: GetPropW %s\n", astring);
2251 else WriteLog("USER32: GetPropW %X\n", astring);
2252#endif
2253 handle = GetPropA(arg1, (LPCSTR)astring);
2254 if((int)arg2 >> 16 != 0)
2255 FreeAsciiString(astring);
2256
2257 return(handle);
2258}
2259//******************************************************************************
2260//******************************************************************************
2261DWORD WIN32API GetQueueStatus( UINT arg1)
2262{
2263#ifdef DEBUG
2264 WriteLog("USER32: GetQueueStatus\n");
2265#endif
2266 return O32_GetQueueStatus(arg1);
2267}
2268//******************************************************************************
2269//******************************************************************************
2270int WIN32API GetScrollPos(HWND hwnd, int fnBar)
2271{
2272 int pos;
2273
2274 pos = O32_GetScrollPos(hwnd, fnBar);
2275#ifdef DEBUG
2276 WriteLog("USER32: GetScrollPos of %X type %d returned %d\n", hwnd, fnBar, pos);
2277#endif
2278 return(pos);
2279}
2280//******************************************************************************
2281//******************************************************************************
2282BOOL WIN32API GetScrollRange( HWND arg1, int arg2, int * arg3, int * arg4)
2283{
2284#ifdef DEBUG
2285 WriteLog("USER32: GetScrollRange\n");
2286#endif
2287 return O32_GetScrollRange(arg1, arg2, arg3, arg4);
2288}
2289//******************************************************************************
2290//******************************************************************************
2291DWORD WIN32API GetTabbedTextExtentA( HDC arg1, LPCSTR arg2, int arg3, int arg4, int * arg5)
2292{
2293#ifdef DEBUG
2294 WriteLog("USER32: GetTabbedTextExtentA\n");
2295#endif
2296 return O32_GetTabbedTextExtent(arg1, arg2, arg3, arg4, arg5);
2297}
2298//******************************************************************************
2299//******************************************************************************
2300DWORD WIN32API GetTabbedTextExtentW( HDC arg1, LPCWSTR arg2, int arg3, int arg4, int * arg5)
2301{
2302 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
2303 DWORD rc;
2304
2305#ifdef DEBUG
2306 WriteLog("USER32: GetTabbedTextExtentW\n");
2307#endif
2308 rc = O32_GetTabbedTextExtent(arg1, astring, arg3, arg4, arg5);
2309 FreeAsciiString(astring);
2310 return rc;
2311}
2312//******************************************************************************
2313//******************************************************************************
2314HWND WIN32API GetTopWindow( HWND arg1)
2315{
2316#ifdef DEBUG
2317//// WriteLog("USER32: GetTopWindow\n");
2318#endif
2319 return O32_GetTopWindow(arg1);
2320}
2321//******************************************************************************
2322//******************************************************************************
2323int WIN32API GetUpdateRgn( HWND arg1, HRGN arg2, BOOL arg3)
2324{
2325#ifdef DEBUG
2326 WriteLog("USER32: GetUpdateRgn\n");
2327#endif
2328 return O32_GetUpdateRgn(arg1, arg2, arg3);
2329}
2330//******************************************************************************
2331//******************************************************************************
2332LONG WIN32API GetWindowLongW( HWND arg1, int arg2)
2333{
2334#ifdef DEBUG
2335 WriteLog("USER32: GetWindowLongW\n");
2336#endif
2337 return GetWindowLongA(arg1, arg2); //class procedures..
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//******************************************************************************
2411WORD WIN32API GetWindowWord( HWND arg1, int arg2)
2412{
2413#ifdef DEBUG
2414 WriteLog("USER32: GetWindowWord\n");
2415#endif
2416 return O32_GetWindowWord(arg1, arg2);
2417}
2418//******************************************************************************
2419//******************************************************************************
2420BOOL WIN32API HideCaret( HWND arg1)
2421{
2422#ifdef DEBUG
2423 WriteLog("USER32: HideCaret\n");
2424#endif
2425 return O32_HideCaret(arg1);
2426}
2427//******************************************************************************
2428//******************************************************************************
2429BOOL WIN32API InSendMessage(void)
2430{
2431#ifdef DEBUG
2432 WriteLog("USER32: InSendMessage\n");
2433#endif
2434 return O32_InSendMessage();
2435}
2436//******************************************************************************
2437//******************************************************************************
2438BOOL WIN32API IntersectRect( PRECT arg1, const RECT * arg2, const RECT * arg3)
2439{
2440#ifdef DEBUG
2441//// WriteLog("USER32: IntersectRect\n");
2442#endif
2443 return O32_IntersectRect(arg1, arg2, arg3);
2444}
2445//******************************************************************************
2446//******************************************************************************
2447BOOL WIN32API InvalidateRgn( HWND arg1, HRGN arg2, BOOL arg3)
2448{
2449#ifdef DEBUG
2450 WriteLog("USER32: InvalidateRgn\n");
2451#endif
2452 return O32_InvalidateRgn(arg1, arg2, arg3);
2453}
2454//******************************************************************************
2455//******************************************************************************
2456BOOL WIN32API InvertRect( HDC arg1, const RECT * arg2)
2457{
2458#ifdef DEBUG
2459 WriteLog("USER32: InvertRect\n");
2460#endif
2461 return O32_InvertRect(arg1, arg2);
2462}
2463//******************************************************************************
2464//******************************************************************************
2465BOOL WIN32API IsChild( HWND arg1, HWND arg2)
2466{
2467#ifdef DEBUG
2468 WriteLog("USER32: IsChild\n");
2469#endif
2470 return O32_IsChild(arg1, arg2);
2471}
2472//******************************************************************************
2473//******************************************************************************
2474BOOL WIN32API IsClipboardFormatAvailable( UINT arg1)
2475{
2476#ifdef DEBUG
2477 WriteLog("USER32: IsClipboardFormatAvailable\n");
2478#endif
2479 return O32_IsClipboardFormatAvailable(arg1);
2480}
2481//******************************************************************************
2482//******************************************************************************
2483BOOL WIN32API IsDialogMessageW( HWND arg1, LPMSG arg2)
2484{
2485#ifdef DEBUG
2486 WriteLog("USER32: IsDialogMessageW\n");
2487#endif
2488 // NOTE: This will not work as is (needs UNICODE support)
2489 return O32_IsDialogMessage(arg1, arg2);
2490}
2491//******************************************************************************
2492//******************************************************************************
2493BOOL WIN32API IsRectEmpty( const RECT * arg1)
2494{
2495#ifdef DEBUG
2496 WriteLog("USER32: IsRectEmpty\n");
2497#endif
2498 return O32_IsRectEmpty(arg1);
2499}
2500//******************************************************************************
2501//******************************************************************************
2502BOOL WIN32API IsWindow( HWND arg1)
2503{
2504#ifdef DEBUG
2505 WriteLog("USER32: IsWindow\n");
2506#endif
2507 return O32_IsWindow(arg1);
2508}
2509//******************************************************************************
2510//******************************************************************************
2511BOOL WIN32API IsWindowEnabled( HWND arg1)
2512{
2513#ifdef DEBUG
2514 WriteLog("USER32: IsWindowEnabled\n");
2515#endif
2516 return O32_IsWindowEnabled(arg1);
2517}
2518//******************************************************************************
2519//******************************************************************************
2520BOOL WIN32API IsWindowVisible( HWND arg1)
2521{
2522#ifdef DEBUG
2523 WriteLog("USER32: IsWindowVisible\n");
2524#endif
2525 return O32_IsWindowVisible(arg1);
2526}
2527//******************************************************************************
2528//******************************************************************************
2529BOOL WIN32API IsZoomed( HWND arg1)
2530{
2531#ifdef DEBUG
2532 WriteLog("USER32: IsZoomed\n");
2533#endif
2534 return O32_IsZoomed(arg1);
2535}
2536//******************************************************************************
2537//******************************************************************************
2538BOOL WIN32API LockWindowUpdate( HWND arg1)
2539{
2540#ifdef DEBUG
2541 WriteLog("USER32: LockWindowUpdate\n");
2542#endif
2543 return O32_LockWindowUpdate(arg1);
2544}
2545//******************************************************************************
2546//******************************************************************************
2547BOOL WIN32API MapDialogRect( HWND arg1, PRECT arg2)
2548{
2549#ifdef DEBUG
2550 WriteLog("USER32: MapDialogRect\n");
2551#endif
2552 return O32_MapDialogRect(arg1, arg2);
2553}
2554//******************************************************************************
2555//******************************************************************************
2556UINT WIN32API MapVirtualKeyA( UINT arg1, UINT arg2)
2557{
2558#ifdef DEBUG
2559 WriteLog("USER32: MapVirtualKeyA\n");
2560#endif
2561 return O32_MapVirtualKey(arg1, arg2);
2562}
2563//******************************************************************************
2564//******************************************************************************
2565UINT WIN32API MapVirtualKeyW( UINT arg1, UINT arg2)
2566{
2567#ifdef DEBUG
2568 WriteLog("USER32: MapVirtualKeyW\n");
2569#endif
2570 // NOTE: This will not work as is (needs UNICODE support)
2571 return O32_MapVirtualKey(arg1, arg2);
2572}
2573//******************************************************************************
2574//******************************************************************************
2575int WIN32API MapWindowPoints( HWND arg1, HWND arg2, LPPOINT arg3, UINT arg4)
2576{
2577#ifdef DEBUG
2578 WriteLog("USER32: MapWindowPoints\n");
2579#endif
2580 return O32_MapWindowPoints(arg1, arg2, arg3, arg4);
2581}
2582//******************************************************************************
2583//******************************************************************************
2584int WIN32API MessageBoxW(HWND arg1, LPCWSTR arg2, LPCWSTR arg3, UINT arg4)
2585{
2586 char *astring1, *astring2;
2587 int rc;
2588
2589 astring1 = UnicodeToAsciiString((LPWSTR)arg2);
2590 astring2 = UnicodeToAsciiString((LPWSTR)arg3);
2591#ifdef DEBUG
2592 WriteLog("USER32: MessageBoxW %s %s\n", astring1, astring2);
2593#endif
2594 rc = O32_MessageBox(arg1, astring1, astring2, arg4);
2595 FreeAsciiString(astring1);
2596 FreeAsciiString(astring2);
2597 return(rc);
2598}
2599//******************************************************************************
2600//******************************************************************************
2601BOOL WIN32API OpenClipboard( HWND arg1)
2602{
2603#ifdef DEBUG
2604 WriteLog("USER32: OpenClipboard\n");
2605#endif
2606 return O32_OpenClipboard(arg1);
2607}
2608//******************************************************************************
2609//******************************************************************************
2610BOOL WIN32API PeekMessageW( LPMSG arg1, HWND arg2, UINT arg3, UINT arg4, UINT arg5)
2611{
2612#ifdef DEBUG
2613 WriteLog("USER32: PeekMessageW\n");
2614#endif
2615 // NOTE: This will not work as is (needs UNICODE support)
2616 return O32_PeekMessage(arg1, arg2, arg3, arg4, arg5);
2617}
2618//******************************************************************************
2619//******************************************************************************
2620// NOTE: Open32 function doesn't have the 'W'.
2621BOOL WIN32API PostMessageW( HWND arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
2622{
2623#ifdef DEBUG
2624 WriteLog("USER32: PostMessageW\n");
2625#endif
2626 // NOTE: This will not work as is (needs UNICODE support)
2627 return O32_PostMessage(arg1, arg2, arg3, arg4);
2628}
2629//******************************************************************************
2630//******************************************************************************
2631BOOL WIN32API PostThreadMessageA( DWORD arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
2632{
2633#ifdef DEBUG
2634 WriteLog("USER32: PostThreadMessageA\n");
2635#endif
2636 return O32_PostThreadMessage(arg1, arg2, arg3, arg4);
2637}
2638//******************************************************************************
2639//******************************************************************************
2640BOOL WIN32API PostThreadMessageW( DWORD arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
2641{
2642#ifdef DEBUG
2643 WriteLog("USER32: PostThreadMessageW\n");
2644#endif
2645 // NOTE: This will not work as is (needs UNICODE support)
2646 return O32_PostThreadMessage(arg1, arg2, arg3, arg4);
2647}
2648//******************************************************************************
2649//******************************************************************************
2650BOOL WIN32API PtInRect( const RECT * arg1, POINT arg2)
2651{
2652#ifdef DEBUG
2653 WriteLog("USER32: PtInRect\n");
2654#endif
2655 return O32_PtInRect(arg1, arg2);
2656}
2657//******************************************************************************
2658//******************************************************************************
2659BOOL WIN32API RedrawWindow( HWND arg1, const RECT * arg2, HRGN arg3, UINT arg4)
2660{
2661 BOOL rc;
2662
2663 rc = O32_RedrawWindow(arg1, arg2, arg3, arg4);
2664#ifdef DEBUG
2665 WriteLog("USER32: RedrawWindow %X , %X, %X, %X returned %d\n", arg1, arg2, arg3, arg4, rc);
2666#endif
2667 InvalidateRect(arg1, arg2, TRUE);
2668 UpdateWindow(arg1);
2669 SendMessageA(arg1, WM_PAINT, 0, 0);
2670 return(rc);
2671}
2672//******************************************************************************
2673//******************************************************************************
2674UINT WIN32API RegisterClipboardFormatA( LPCSTR arg1)
2675{
2676#ifdef DEBUG
2677 WriteLog("USER32: RegisterClipboardFormatA\n");
2678#endif
2679 return O32_RegisterClipboardFormat(arg1);
2680}
2681//******************************************************************************
2682//******************************************************************************
2683UINT WIN32API RegisterClipboardFormatW(LPCWSTR arg1)
2684{
2685 UINT rc;
2686 char *astring = UnicodeToAsciiString((LPWSTR)arg1);
2687
2688#ifdef DEBUG
2689 WriteLog("USER32: RegisterClipboardFormatW %s\n", astring);
2690#endif
2691 rc = O32_RegisterClipboardFormat(astring);
2692 FreeAsciiString(astring);
2693#ifdef DEBUG
2694 WriteLog("USER32: RegisterClipboardFormatW returned %d\n", rc);
2695#endif
2696 return(rc);
2697}
2698//******************************************************************************
2699//******************************************************************************
2700UINT WIN32API RegisterWindowMessageW( LPCWSTR arg1)
2701{
2702 char *astring = UnicodeToAsciiString((LPWSTR)arg1);
2703 UINT rc;
2704
2705#ifdef DEBUG
2706 WriteLog("USER32: RegisterWindowMessageW\n");
2707#endif
2708 rc = O32_RegisterWindowMessage(astring);
2709 FreeAsciiString(astring);
2710 return rc;
2711}
2712//******************************************************************************
2713//******************************************************************************
2714HANDLE WIN32API RemovePropA( HWND arg1, LPCSTR arg2)
2715{
2716#ifdef DEBUG
2717 WriteLog("USER32: RemovePropA\n");
2718#endif
2719 return O32_RemoveProp(arg1, arg2);
2720}
2721//******************************************************************************
2722//******************************************************************************
2723HANDLE WIN32API RemovePropW( HWND arg1, LPCWSTR arg2)
2724{
2725 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
2726 HANDLE rc;
2727
2728#ifdef DEBUG
2729 WriteLog("USER32: RemovePropW\n");
2730#endif
2731 rc = O32_RemoveProp(arg1, astring);
2732 FreeAsciiString(astring);
2733 return rc;
2734}
2735//******************************************************************************
2736//******************************************************************************
2737BOOL WIN32API ReplyMessage( LRESULT arg1)
2738{
2739#ifdef DEBUG
2740 WriteLog("USER32: ReplyMessage\n");
2741#endif
2742 return O32_ReplyMessage(arg1);
2743}
2744//******************************************************************************
2745//******************************************************************************
2746BOOL WIN32API ScreenToClient( HWND arg1, LPPOINT arg2)
2747{
2748#ifdef DEBUG
2749 WriteLog("USER32: ScreenToClient\n");
2750#endif
2751 return O32_ScreenToClient(arg1, arg2);
2752}
2753//******************************************************************************
2754//******************************************************************************
2755BOOL WIN32API ScrollDC( HDC arg1, int arg2, int arg3, const RECT * arg4, const RECT * arg5, HRGN arg6, PRECT arg7)
2756{
2757#ifdef DEBUG
2758 WriteLog("USER32: ScrollDC\n");
2759#endif
2760 return O32_ScrollDC(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
2761}
2762//******************************************************************************
2763//******************************************************************************
2764BOOL WIN32API ScrollWindow( HWND arg1, int arg2, int arg3, const RECT * arg4, const RECT * arg5)
2765{
2766#ifdef DEBUG
2767 WriteLog("USER32: ScrollWindow\n");
2768#endif
2769 return O32_ScrollWindow(arg1, arg2, arg3, arg4, arg5);
2770}
2771//******************************************************************************
2772//******************************************************************************
2773BOOL WIN32API ScrollWindowEx( HWND arg1, int arg2, int arg3, const RECT * arg4, const RECT * arg5, HRGN arg6, PRECT arg7, UINT arg8)
2774{
2775#ifdef DEBUG
2776 WriteLog("USER32: ScrollWindowEx\n");
2777#endif
2778 return O32_ScrollWindowEx(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
2779}
2780//******************************************************************************
2781//******************************************************************************
2782LONG WIN32API SendDlgItemMessageW( HWND arg1, int arg2, UINT arg3, WPARAM arg4, LPARAM arg5)
2783{
2784#ifdef DEBUG
2785 WriteLog("USER32: SendDlgItemMessageW\n");
2786#endif
2787 return O32_SendDlgItemMessage(arg1, arg2, arg3, arg4, arg5);
2788}
2789//******************************************************************************
2790//******************************************************************************
2791LRESULT WIN32API SendMessageW( HWND arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
2792{
2793LRESULT rc;
2794
2795#ifdef DEBUG
2796 WriteLog("USER32: SendMessageW....\n");
2797#endif
2798 rc = O32_SendMessage(arg1, arg2, arg3, arg4);
2799#ifdef DEBUG
2800 WriteLog("USER32: SendMessageW %X %X %X %X returned %d\n", arg1, arg2, arg3, arg4, rc);
2801#endif
2802 return(rc);
2803}
2804//******************************************************************************
2805//******************************************************************************
2806BOOL WIN32API SetCaretBlinkTime( UINT arg1)
2807{
2808#ifdef DEBUG
2809 WriteLog("USER32: SetCaretBlinkTime\n");
2810#endif
2811 return O32_SetCaretBlinkTime(arg1);
2812}
2813//******************************************************************************
2814//******************************************************************************
2815BOOL WIN32API SetCaretPos( int arg1, int arg2)
2816{
2817 dprintf(("USER32: SetCaretPos\n"));
2818 return O32_SetCaretPos(arg1, arg2);
2819}
2820//******************************************************************************
2821//******************************************************************************
2822HANDLE WIN32API SetClipboardData( UINT arg1, HANDLE arg2)
2823{
2824 dprintf(("USER32: SetClipboardData\n"));
2825 return O32_SetClipboardData(arg1, arg2);
2826}
2827//******************************************************************************
2828//******************************************************************************
2829HWND WIN32API SetClipboardViewer( HWND arg1)
2830{
2831 dprintf(("USER32: SetClipboardViewer\n"));
2832 return O32_SetClipboardViewer(arg1);
2833}
2834//******************************************************************************
2835//******************************************************************************
2836BOOL WIN32API SetDlgItemTextW( HWND arg1, int arg2, LPCWSTR arg3)
2837{
2838char *astring = UnicodeToAsciiString((LPWSTR)arg3);
2839BOOL rc;
2840
2841#ifdef DEBUG
2842 WriteLog("USER32: SetDlgItemTextW\n");
2843#endif
2844 // NOTE: This will not work as is (needs UNICODE support)
2845 rc = O32_SetDlgItemText(arg1, arg2, astring);
2846 FreeAsciiString(astring);
2847 return rc;
2848}
2849//******************************************************************************
2850//******************************************************************************
2851BOOL WIN32API SetDoubleClickTime( UINT arg1)
2852{
2853#ifdef DEBUG
2854 WriteLog("USER32: SetDoubleClickTime\n");
2855#endif
2856 return O32_SetDoubleClickTime(arg1);
2857}
2858//******************************************************************************
2859//******************************************************************************
2860HWND WIN32API SetParent( HWND arg1, HWND arg2)
2861{
2862#ifdef DEBUG
2863 WriteLog("USER32: SetParent\n");
2864#endif
2865 return O32_SetParent(arg1, arg2);
2866}
2867//******************************************************************************
2868//******************************************************************************
2869BOOL WIN32API SetPropA( HWND arg1, LPCSTR arg2, HANDLE arg3)
2870{
2871#ifdef DEBUG
2872 if((int)arg2 >> 16 != 0)
2873 WriteLog("USER32: SetPropA %S\n", arg2);
2874 else WriteLog("USER32: SetPropA %X\n", arg2);
2875#endif
2876 return O32_SetProp(arg1, arg2, arg3);
2877}
2878//******************************************************************************
2879//******************************************************************************
2880BOOL WIN32API SetPropW(HWND arg1, LPCWSTR arg2, HANDLE arg3)
2881{
2882 BOOL rc;
2883 char *astring;
2884
2885 if((int)arg2 >> 16 != 0)
2886 astring = UnicodeToAsciiString((LPWSTR)arg2);
2887 else astring = (char *)arg2;
2888
2889#ifdef DEBUG
2890 if((int)arg2 >> 16 != 0)
2891 WriteLog("USER32: SetPropW %S\n", astring);
2892 else WriteLog("USER32: SetPropW %X\n", astring);
2893#endif
2894 rc = O32_SetProp(arg1, astring, arg3);
2895 if((int)astring >> 16 != 0)
2896 FreeAsciiString(astring);
2897 return(rc);
2898}
2899//******************************************************************************
2900//******************************************************************************
2901BOOL WIN32API SetRectEmpty( PRECT arg1)
2902{
2903#ifdef DEBUG
2904 WriteLog("USER32: SetRectEmpty\n");
2905#endif
2906 return O32_SetRectEmpty(arg1);
2907}
2908//******************************************************************************
2909//******************************************************************************
2910int WIN32API SetScrollPos( HWND arg1, int arg2, int arg3, BOOL arg4)
2911{
2912#ifdef DEBUG
2913 WriteLog("USER32: SetScrollPos\n");
2914#endif
2915 return O32_SetScrollPos(arg1, arg2, arg3, arg4);
2916}
2917//******************************************************************************
2918//******************************************************************************
2919BOOL WIN32API SetScrollRange( HWND arg1, int arg2, int arg3, int arg4, BOOL arg5)
2920{
2921#ifdef DEBUG
2922 WriteLog("USER32: SetScrollRange\n");
2923#endif
2924 return O32_SetScrollRange(arg1, arg2, arg3, arg4, arg5);
2925}
2926//******************************************************************************
2927//******************************************************************************
2928LONG WIN32API SetWindowLongA(HWND hwnd, int nIndex, LONG arg3)
2929{
2930 LONG rc;
2931
2932 dprintf(("USER32: SetWindowLongA %X %d %X\n", hwnd, nIndex, arg3));
2933 if(nIndex == GWL_WNDPROC || nIndex == DWL_DLGPROC) {
2934 Win32WindowProc *wndproc = Win32WindowProc::FindProc(hwnd);
2935 if(wndproc == NULL) {//created with system class and app wants to change the handler
2936 dprintf(("USER32: SetWindowLong new WindowProc for system class\n"));
2937 wndproc = new Win32WindowProc((WNDPROC)arg3);
2938 wndproc->SetWindowHandle(hwnd);
2939 rc = O32_GetWindowLong(hwnd, nIndex);
2940 Win32WindowSubProc *subwndproc = new Win32WindowSubProc(hwnd, (WNDPROC_O32)rc);
2941 O32_SetWindowLong(hwnd, nIndex, (LONG)wndproc->GetOS2Callback());
2942 return((LONG)subwndproc->GetWin32Callback());
2943 }
2944 else {
2945 if(!(nIndex == DWL_DLGPROC && wndproc->IsWindow() == TRUE)) {
2946 rc = (LONG)wndproc->GetWin32Callback();
2947 dprintf(("USER32: SetWindowLong change WindowProc %X to %X\n", rc, arg3));
2948 wndproc->SetWin32Callback((WNDPROC)arg3);
2949 return(rc);
2950 }
2951 //else window that accesses it's normal window data
2952 }
2953 }
2954 return O32_SetWindowLong(hwnd, nIndex, arg3);
2955}
2956//******************************************************************************
2957//TODO: Is this always correct? (GWL_ID: window identifier??)
2958//******************************************************************************
2959LONG WIN32API SetWindowLongW(HWND arg1, int arg2, LONG arg3)
2960{
2961 dprintf(("USER32: SetWindowLongW %X %d %X\n", arg1, arg2, arg3));
2962 return SetWindowLongA(arg1, arg2, arg3);
2963}
2964//******************************************************************************
2965//******************************************************************************
2966BOOL WIN32API SetWindowPlacement( HWND arg1, const WINDOWPLACEMENT * arg2)
2967{
2968 dprintf(("USER32: SetWindowPlacement\n"));
2969 return O32_SetWindowPlacement(arg1, arg2);
2970}
2971//******************************************************************************
2972//******************************************************************************
2973BOOL WIN32API SetWindowTextW( HWND arg1, LPCWSTR arg2)
2974{
2975 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
2976 BOOL rc;
2977
2978 rc = SetWindowTextA(arg1, (LPCSTR)astring);
2979 dprintf(("USER32: SetWindowTextW %X %s returned %d\n", arg1, astring, rc));
2980 FreeAsciiString(astring);
2981 return(rc);
2982}
2983//******************************************************************************
2984//******************************************************************************
2985WORD WIN32API SetWindowWord( HWND arg1, int arg2, WORD arg3)
2986{
2987 dprintf(("USER32: SetWindowWord\n"));
2988 return O32_SetWindowWord(arg1, arg2, arg3);
2989}
2990//******************************************************************************
2991//******************************************************************************
2992BOOL WIN32API ShowCaret( HWND arg1)
2993{
2994 dprintf(("USER32: ShowCaret\n"));
2995 return O32_ShowCaret(arg1);
2996}
2997//******************************************************************************
2998//******************************************************************************
2999BOOL WIN32API ShowOwnedPopups( HWND arg1, BOOL arg2)
3000{
3001 dprintf(("USER32: ShowOwnedPopups\n"));
3002 return O32_ShowOwnedPopups(arg1, arg2);
3003}
3004//******************************************************************************
3005//******************************************************************************
3006BOOL WIN32API ShowScrollBar( HWND arg1, int arg2, BOOL arg3)
3007{
3008#ifdef DEBUG
3009 WriteLog("USER32: ShowScrollBar\n");
3010#endif
3011 return O32_ShowScrollBar(arg1, arg2, arg3);
3012}
3013//******************************************************************************
3014//******************************************************************************
3015BOOL WIN32API SwapMouseButton( BOOL arg1)
3016{
3017#ifdef DEBUG
3018 WriteLog("USER32: SwapMouseButton\n");
3019#endif
3020 return O32_SwapMouseButton(arg1);
3021}
3022//******************************************************************************
3023//******************************************************************************
3024BOOL WIN32API SystemParametersInfoA(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni)
3025{
3026 BOOL rc;
3027 NONCLIENTMETRICSA *cmetric = (NONCLIENTMETRICSA *)pvParam;
3028
3029 switch(uiAction) {
3030 case SPI_SCREENSAVERRUNNING:
3031 *(BOOL *)pvParam = FALSE;
3032 rc = TRUE;
3033 break;
3034 case SPI_GETDRAGFULLWINDOWS:
3035 *(BOOL *)pvParam = FALSE;
3036 rc = TRUE;
3037 break;
3038 case SPI_GETNONCLIENTMETRICS:
3039 memset(cmetric, 0, sizeof(NONCLIENTMETRICSA));
3040 cmetric->cbSize = sizeof(NONCLIENTMETRICSA);
3041 O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfCaptionFont),0);
3042 O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfMenuFont),0);
3043 O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfStatusFont),0);
3044 O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfMessageFont),0);
3045 cmetric->iBorderWidth = GetSystemMetrics(SM_CXBORDER);
3046 cmetric->iScrollWidth = GetSystemMetrics(SM_CXHSCROLL);
3047 cmetric->iScrollHeight = GetSystemMetrics(SM_CYHSCROLL);
3048 cmetric->iCaptionWidth = 32; //TODO
3049 cmetric->iCaptionHeight = 16; //TODO
3050 cmetric->iSmCaptionWidth = GetSystemMetrics(SM_CXSMSIZE);
3051 cmetric->iSmCaptionHeight = GetSystemMetrics(SM_CYSMSIZE);
3052 cmetric->iMenuWidth = 32; //TODO
3053 cmetric->iMenuHeight = GetSystemMetrics(SM_CYMENU);
3054 rc = TRUE;
3055 break;
3056 case 104: //TODO: Undocumented
3057 rc = 16;
3058 break;
3059 default:
3060 rc = O32_SystemParametersInfo(uiAction, uiParam, pvParam, fWinIni);
3061 break;
3062 }
3063#ifdef DEBUG
3064 WriteLog("USER32: SystemParametersInfoA %d, returned %d\n", uiAction, rc);
3065#endif
3066 return(rc);
3067}
3068//******************************************************************************
3069//TODO: Check for more options that have different structs for Unicode!!!!
3070//******************************************************************************
3071BOOL WIN32API SystemParametersInfoW(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni)
3072{
3073 BOOL rc;
3074 NONCLIENTMETRICSW *clientMetricsW = (NONCLIENTMETRICSW *)pvParam;
3075 NONCLIENTMETRICSA clientMetricsA = {0};
3076 PVOID pvParamA;
3077 UINT uiParamA;
3078
3079 switch(uiAction) {
3080 case SPI_SETNONCLIENTMETRICS:
3081 clientMetricsA.cbSize = sizeof(NONCLIENTMETRICSA);
3082 clientMetricsA.iBorderWidth = clientMetricsW->iBorderWidth;
3083 clientMetricsA.iScrollWidth = clientMetricsW->iScrollWidth;
3084 clientMetricsA.iScrollHeight = clientMetricsW->iScrollHeight;
3085 clientMetricsA.iCaptionWidth = clientMetricsW->iCaptionWidth;
3086 clientMetricsA.iCaptionHeight = clientMetricsW->iCaptionHeight;
3087 ConvertFontWA(&clientMetricsW->lfCaptionFont, &clientMetricsA.lfCaptionFont);
3088 clientMetricsA.iSmCaptionWidth = clientMetricsW->iSmCaptionWidth;
3089 clientMetricsA.iSmCaptionHeight = clientMetricsW->iSmCaptionHeight;
3090 ConvertFontWA(&clientMetricsW->lfSmCaptionFont, &clientMetricsA.lfSmCaptionFont);
3091 clientMetricsA.iMenuWidth = clientMetricsW->iMenuWidth;
3092 clientMetricsA.iMenuHeight = clientMetricsW->iMenuHeight;
3093 ConvertFontWA(&clientMetricsW->lfMenuFont, &clientMetricsA.lfMenuFont);
3094 ConvertFontWA(&clientMetricsW->lfStatusFont, &clientMetricsA.lfStatusFont);
3095 ConvertFontWA(&clientMetricsW->lfMessageFont, &clientMetricsA.lfMessageFont);
3096 //no break
3097 case SPI_GETNONCLIENTMETRICS:
3098 uiParamA = sizeof(NONCLIENTMETRICSA);
3099 pvParamA = &clientMetricsA;
3100 break;
3101 default:
3102 pvParamA = pvParam;
3103 uiParamA = uiParam;
3104 break;
3105 }
3106 rc = SystemParametersInfoA(uiAction, uiParamA, pvParamA, fWinIni);
3107
3108 switch(uiAction) {
3109 case SPI_GETNONCLIENTMETRICS:
3110 clientMetricsW->cbSize = sizeof(*clientMetricsW);
3111 clientMetricsW->iBorderWidth = clientMetricsA.iBorderWidth;
3112 clientMetricsW->iScrollWidth = clientMetricsA.iScrollWidth;
3113 clientMetricsW->iScrollHeight = clientMetricsA.iScrollHeight;
3114 clientMetricsW->iCaptionWidth = clientMetricsA.iCaptionWidth;
3115 clientMetricsW->iCaptionHeight = clientMetricsA.iCaptionHeight;
3116 ConvertFontAW(&clientMetricsA.lfCaptionFont, &clientMetricsW->lfCaptionFont);
3117
3118 clientMetricsW->iSmCaptionWidth = clientMetricsA.iSmCaptionWidth;
3119 clientMetricsW->iSmCaptionHeight = clientMetricsA.iSmCaptionHeight;
3120 ConvertFontAW(&clientMetricsA.lfSmCaptionFont, &clientMetricsW->lfSmCaptionFont);
3121
3122 clientMetricsW->iMenuWidth = clientMetricsA.iMenuWidth;
3123 clientMetricsW->iMenuHeight = clientMetricsA.iMenuHeight;
3124 ConvertFontAW(&clientMetricsA.lfMenuFont, &clientMetricsW->lfMenuFont);
3125 ConvertFontAW(&clientMetricsA.lfStatusFont, &clientMetricsW->lfStatusFont);
3126 ConvertFontAW(&clientMetricsA.lfMessageFont, &clientMetricsW->lfMessageFont);
3127 break;
3128 }
3129#ifdef DEBUG
3130 WriteLog("USER32: SystemParametersInfoW %d, returned %d\n", uiAction, rc);
3131#endif
3132 return(rc);
3133}
3134//******************************************************************************
3135//******************************************************************************
3136LONG WIN32API TabbedTextOutA( HDC arg1, int arg2, int arg3, LPCSTR arg4, int arg5, int arg6, int * arg7, int arg8)
3137{
3138#ifdef DEBUG
3139 WriteLog("USER32: TabbedTextOutA\n");
3140#endif
3141 return O32_TabbedTextOut(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
3142}
3143//******************************************************************************
3144//******************************************************************************
3145LONG WIN32API TabbedTextOutW( HDC arg1, int arg2, int arg3, LPCWSTR arg4, int arg5, int arg6, int * arg7, int arg8)
3146{
3147 char *astring = UnicodeToAsciiString((LPWSTR)arg4);
3148 LONG rc;
3149
3150#ifdef DEBUG
3151 WriteLog("USER32: TabbedTextOutW\n");
3152#endif
3153 rc = O32_TabbedTextOut(arg1, arg2, arg3, astring, arg5, arg6, arg7, arg8);
3154 FreeAsciiString(astring);
3155 return rc;
3156}
3157//******************************************************************************
3158//******************************************************************************
3159int WIN32API TranslateAccelerator( HWND arg1, HACCEL arg2, LPMSG arg3)
3160{
3161#ifdef DEBUG
3162 WriteLog("USER32: TranslateAccelerator\n");
3163#endif
3164 return O32_TranslateAccelerator(arg1, arg2, arg3);
3165}
3166//******************************************************************************
3167//******************************************************************************
3168int WIN32API TranslateAcceleratorW( HWND arg1, HACCEL arg2, LPMSG arg3)
3169{
3170#ifdef DEBUG
3171 WriteLog("USER32: TranslateAcceleratorW\n");
3172#endif
3173 // NOTE: This will not work as is (needs UNICODE support)
3174 return O32_TranslateAccelerator(arg1, arg2, arg3);
3175}
3176//******************************************************************************
3177//******************************************************************************
3178BOOL WIN32API TranslateMDISysAccel( HWND arg1, LPMSG arg2)
3179{
3180#ifdef DEBUG
3181//// WriteLog("USER32: TranslateMDISysAccel\n");
3182#endif
3183 return O32_TranslateMDISysAccel(arg1, arg2);
3184}
3185//******************************************************************************
3186//******************************************************************************
3187BOOL WIN32API UnionRect( PRECT arg1, const RECT * arg2, const RECT * arg3)
3188{
3189#ifdef DEBUG
3190 WriteLog("USER32: UnionRect\n");
3191#endif
3192 return O32_UnionRect(arg1, arg2, arg3);
3193}
3194//******************************************************************************
3195//******************************************************************************
3196BOOL WIN32API ValidateRect( HWND arg1, const RECT * arg2)
3197{
3198#ifdef DEBUG
3199 WriteLog("USER32: ValidateRect\n");
3200#endif
3201 return O32_ValidateRect(arg1, arg2);
3202}
3203//******************************************************************************
3204//******************************************************************************
3205BOOL WIN32API ValidateRgn( HWND arg1, HRGN arg2)
3206{
3207#ifdef DEBUG
3208 WriteLog("USER32: ValidateRgn\n");
3209#endif
3210 return O32_ValidateRgn(arg1, arg2);
3211}
3212//******************************************************************************
3213//******************************************************************************
3214WORD WIN32API VkKeyScanW( WCHAR arg1)
3215{
3216#ifdef DEBUG
3217 WriteLog("USER32: VkKeyScanW\n");
3218#endif
3219 // NOTE: This will not work as is (needs UNICODE support)
3220 return O32_VkKeyScan((char)arg1);
3221}
3222//******************************************************************************
3223//******************************************************************************
3224BOOL WIN32API WaitMessage(void)
3225{
3226#ifdef DEBUG
3227 WriteLog("USER32: WaitMessage\n");
3228#endif
3229 return O32_WaitMessage();
3230}
3231//******************************************************************************
3232//******************************************************************************
3233BOOL WIN32API WinHelpW( HWND arg1, LPCWSTR arg2, UINT arg3, DWORD arg4)
3234{
3235 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
3236 BOOL rc;
3237
3238#ifdef DEBUG
3239 WriteLog("USER32: WinHelpW\n");
3240#endif
3241 rc = WinHelpA(arg1, astring, arg3, arg4);
3242 FreeAsciiString(astring);
3243 return rc;
3244}
3245//******************************************************************************
3246//******************************************************************************
3247HWND WIN32API WindowFromDC( HDC arg1)
3248{
3249#ifdef DEBUG
3250 WriteLog("USER32: WindowFromDC\n");
3251#endif
3252 return O32_WindowFromDC(arg1);
3253}
3254//******************************************************************************
3255//******************************************************************************
3256HWND WIN32API WindowFromPoint( POINT arg1)
3257{
3258#ifdef DEBUG
3259 WriteLog("USER32: WindowFromPoint\n");
3260#endif
3261 return O32_WindowFromPoint(arg1);
3262}
3263//******************************************************************************
3264//******************************************************************************
3265int WIN32API wvsprintfA( LPSTR arg1, LPCSTR arg2, va_list arg3)
3266{
3267#ifdef DEBUG
3268 WriteLog("USER32: wvsprintfA\n");
3269#endif
3270 return O32_wvsprintf(arg1, arg2, (LPCVOID *)arg3);
3271}
3272//******************************************************************************
3273//******************************************************************************
3274int WIN32API wvsprintfW(LPWSTR lpOut, LPCWSTR lpFmt, va_list argptr)
3275{
3276 int rc;
3277 char szOut[256];
3278 char *lpFmtA;
3279
3280 lpFmtA = UnicodeToAsciiString((LPWSTR)lpFmt);
3281#ifdef DEBUG
3282 WriteLog("USER32: wvsprintfW, DOES NOT HANDLE UNICODE STRINGS!\n");
3283 WriteLog("USER32: %s\n", lpFmt);
3284#endif
3285 rc = O32_wvsprintf(szOut, lpFmtA, (LPCVOID)argptr);
3286
3287 AsciiToUnicode(szOut, lpOut);
3288#ifdef DEBUG
3289 WriteLog("USER32: %s\n", lpOut);
3290#endif
3291 FreeAsciiString(lpFmtA);
3292 return(rc);
3293}
3294//******************************************************************************
3295//No need to support this
3296//******************************************************************************
3297BOOL WIN32API SetMessageQueue(int cMessagesMax)
3298{
3299#ifdef DEBUG
3300 WriteLog("USER32: SetMessageQueue\n");
3301#endif
3302 return(TRUE);
3303}
3304//******************************************************************************
3305//TODO: Not complete
3306//******************************************************************************
3307BOOL WIN32API GetScrollInfo(HWND hwnd, int fnBar, LPSCROLLINFO lpsi)
3308{
3309#ifdef DEBUG
3310 WriteLog("USER32: GetScrollInfo\n");
3311#endif
3312 if(lpsi == NULL)
3313 return(FALSE);
3314
3315 if(lpsi->fMask & SIF_POS)
3316 lpsi->nPos = GetScrollPos(hwnd, fnBar);
3317 if(lpsi->fMask & SIF_RANGE)
3318 GetScrollRange(hwnd, fnBar, &lpsi->nMin, &lpsi->nMax);
3319 if(lpsi->fMask & SIF_PAGE) {
3320#ifdef DEBUG
3321 WriteLog("USER32: GetScrollInfo, page info not implemented\n");
3322#endif
3323 lpsi->nPage = 25;
3324 }
3325 return(TRUE);
3326}
3327//******************************************************************************
3328//TODO: Not complete
3329//******************************************************************************
3330INT WIN32API SetScrollInfo(HWND hwnd, INT fnBar, const SCROLLINFO *lpsi, BOOL fRedraw)
3331{
3332 int smin, smax;
3333
3334#ifdef DEBUG
3335 WriteLog("USER32: SetScrollInfo\n");
3336#endif
3337 if(lpsi == NULL)
3338 return(FALSE);
3339
3340 if(lpsi->fMask & SIF_POS)
3341 SetScrollPos(hwnd, fnBar, lpsi->nPos, fRedraw);
3342 if(lpsi->fMask & SIF_RANGE)
3343 SetScrollRange(hwnd, fnBar, lpsi->nMin, lpsi->nMax, fRedraw);
3344 if(lpsi->fMask & SIF_PAGE) {
3345#ifdef DEBUG
3346 WriteLog("USER32: GetScrollInfo, page info not implemented\n");
3347#endif
3348 }
3349 if(lpsi->fMask & SIF_DISABLENOSCROLL) {
3350#ifdef DEBUG
3351 WriteLog("USER32: GetScrollInfo, disable scrollbar not yet implemented\n");
3352#endif
3353 }
3354 return(TRUE);
3355}
3356//******************************************************************************
3357//******************************************************************************
3358BOOL WIN32API GrayStringA(HDC hdc, HBRUSH hBrush, GRAYSTRINGPROC lpOutputFunc,
3359 LPARAM lpData, int nCount, int X, int Y, int nWidth,
3360 int nHeight)
3361{
3362 BOOL rc;
3363 COLORREF curclr;
3364
3365#ifdef DEBUG
3366 WriteLog("USER32: GrayStringA, not completely implemented\n");
3367#endif
3368 if(lpOutputFunc == NULL && lpData == NULL) {
3369#ifdef DEBUG
3370 WriteLog("USER32: lpOutputFunc == NULL && lpData == NULL\n");
3371#endif
3372 return(FALSE);
3373 }
3374 if(lpOutputFunc) {
3375 return(lpOutputFunc(hdc, lpData, nCount));
3376 }
3377 curclr = SetTextColor(hdc, GetSysColor(COLOR_GRAYTEXT));
3378 rc = TextOutA(hdc, X, Y, (char *)lpData, nCount);
3379 SetTextColor(hdc, curclr);
3380
3381 return(rc);
3382}
3383//******************************************************************************
3384//******************************************************************************
3385BOOL WIN32API GrayStringW(HDC hdc, HBRUSH hBrush, GRAYSTRINGPROC lpOutputFunc,
3386 LPARAM lpData, int nCount, int X, int Y, int nWidth,
3387 int nHeight)
3388{
3389 BOOL rc;
3390 char *astring;
3391 COLORREF curclr;
3392
3393#ifdef DEBUG
3394 WriteLog("USER32: GrayStringW, not completely implemented\n");
3395#endif
3396
3397 if(lpOutputFunc == NULL && lpData == NULL) {
3398#ifdef DEBUG
3399 WriteLog("USER32: lpOutputFunc == NULL && lpData == NULL\n");
3400#endif
3401 return(FALSE);
3402 }
3403 if(nCount == 0)
3404 nCount = UniStrlen((UniChar*)lpData);
3405
3406 if(lpOutputFunc) {
3407 return(lpOutputFunc(hdc, lpData, nCount));
3408 }
3409 astring = UnicodeToAsciiString((LPWSTR)lpData);
3410
3411 curclr = SetTextColor(hdc, GetSysColor(COLOR_GRAYTEXT));
3412 rc = TextOutA(hdc, X, Y, astring, nCount);
3413 SetTextColor(hdc, curclr);
3414
3415 FreeAsciiString(astring);
3416 return(rc);
3417}
3418//******************************************************************************
3419//TODO:
3420//******************************************************************************
3421int WIN32API CopyAcceleratorTableA(HACCEL hAccelSrc, LPACCEL lpAccelDest,
3422 int cAccelEntries)
3423{
3424#ifdef DEBUG
3425 WriteLog("USER32: CopyAcceleratorTableA, not implemented\n");
3426#endif
3427 return(0);
3428}
3429//******************************************************************************
3430//TODO:
3431//******************************************************************************
3432int WIN32API CopyAcceleratorTableW(HACCEL hAccelSrc, LPACCEL lpAccelDest,
3433 int cAccelEntries)
3434{
3435#ifdef DEBUG
3436 WriteLog("USER32: CopyAcceleratorTableW, not implemented\n");
3437#endif
3438 return(0);
3439}
3440//******************************************************************************
3441//Stolen from Wine (controls\uitools.c)
3442//******************************************************************************
3443BOOL DrawEdgeDiag(HDC hdc, RECT *rect, UINT edge, UINT flags)
3444{
3445 HPEN facePen, shadowPen, lightPen, blackPen, grayPen, nullPen;
3446 HPEN iPen, oPen, oldPen;
3447 HBRUSH oldBrush, faceBrush;
3448 int cl, cr, ct, cb;
3449 BOOL mainDiag;
3450 POINT tp;
3451 RECT r;
3452
3453 /* If both rasied and sunken is specified, they anihilate one another */
3454 if( !((flags & BF_MONO) || (flags & BF_FLAT)) ){
3455 if( (edge & BDR_RAISEDOUTER) && (edge & BDR_SUNKENOUTER) )
3456 return FALSE;
3457 if( (edge & BDR_RAISEDINNER) && (edge & BDR_SUNKENINNER) )
3458 return FALSE;
3459 }
3460
3461 /* Create/get the tools of the trade... */
3462 facePen = CreatePen(PS_SOLID, 0, GetSysColor(COLOR_BTNFACE));
3463 shadowPen = CreatePen(PS_SOLID, 0, GetSysColor(COLOR_BTNSHADOW));
3464 lightPen = CreatePen(PS_SOLID, 0, GetSysColor(COLOR_BTNHILIGHT));
3465 grayPen = CreatePen(PS_SOLID, 0, RGB(168, 152, 144));
3466 blackPen = GetStockObject(BLACK_PEN);
3467 nullPen = GetStockObject(NULL_PEN);
3468 faceBrush = GetSysColorBrush(COLOR_BTNFACE);
3469 oldPen = SelectObject(hdc, nullPen);
3470 oldBrush = SelectObject(hdc, faceBrush);
3471
3472 /* this is my working rectangle */
3473 r = *rect;
3474
3475 if(flags & BF_MONO){
3476 oPen = blackPen;
3477 iPen = nullPen;
3478 }else if(flags & BF_FLAT){
3479 oPen = shadowPen;
3480 iPen = facePen;
3481 }else {
3482 if(flags & BF_SOFT){
3483 if(flags & BF_BOTTOM){
3484 oPen = (edge & BDR_RAISEDOUTER) ? blackPen : lightPen;
3485 iPen = (edge & BDR_RAISEDINNER) ? shadowPen : grayPen;
3486 }
3487 else{
3488 oPen = (edge & BDR_RAISEDOUTER) ? lightPen : blackPen;
3489 iPen = (edge & BDR_RAISEDINNER) ? grayPen : shadowPen;
3490 }
3491 }
3492 else{
3493 if(flags & BF_BOTTOM){
3494 oPen = (edge & BDR_RAISEDOUTER) ? blackPen : lightPen;
3495 iPen = (edge & BDR_RAISEDINNER) ? shadowPen : grayPen;
3496 }
3497 else{
3498 oPen = (edge & BDR_RAISEDOUTER) ? grayPen : shadowPen;
3499 iPen = (edge & BDR_RAISEDINNER) ? lightPen : blackPen;
3500 }
3501 }
3502 }
3503
3504 if(flags & BF_BOTTOM){
3505 if(flags & BF_LEFT){
3506 cr = -1; cl = 0;
3507 ct = 0; cb = -1;
3508 mainDiag = TRUE;
3509 tp.x = r.left; tp.y = r.top;
3510 }
3511 else{ /* RIGHT */
3512 cr = -1; cl = 0;
3513 ct = 1; cb = 0;
3514 tp.x = r.left; tp.y = r.bottom-1;
3515 mainDiag = FALSE;
3516 }
3517 }
3518 else{ /* TOP */
3519 if(flags & BF_LEFT){
3520 cr = 0; cl = 1;
3521 ct = 0; cb = -1;
3522 mainDiag = FALSE;
3523 tp.x = r.right; tp.y = r.top;
3524 }
3525 else{ /* RIGHT */
3526 cr = 0; cl = 1;
3527 ct = 1; cb = 0;
3528 tp.x = r.right; tp.y = r.bottom-1;
3529 mainDiag = TRUE;
3530 }
3531 }
3532
3533 /* if it has external edge, draw it */
3534 if(edge & BDR_OUTER){
3535 SelectObject(hdc, oPen);
3536 MoveToEx(hdc, r.left, mainDiag ? r.bottom-1 : r.top, 0);
3537 LineTo(hdc, r.right, mainDiag ? r.top-1 : r.bottom);
3538 r.left += cl; r.right += cr; r.top += ct; r.bottom += cb;
3539 }
3540
3541 /* if it has internal edge, draw it */
3542 if(edge & BDR_INNER){
3543 SelectObject(hdc, iPen);
3544 MoveToEx(hdc, r.left, mainDiag ? r.bottom-1 : r.top, 0);
3545 LineTo(hdc, r.right, mainDiag ? r.top-1 : r.bottom);
3546 r.left += cl; r.right += cr; r.top += ct; r.bottom += cb;
3547 }
3548
3549 if((flags & BF_MIDDLE) && !(flags & BF_MONO)){
3550 POINT p[3];
3551 p[0].x = mainDiag ? r.right: r.left;
3552 p[0].y = r.top;
3553 p[1].x = mainDiag ? r.left : r.right;
3554 p[1].y = r.bottom;
3555 p[2].x = tp.x;
3556 p[2].y = tp.y;
3557 SelectObject(hdc, nullPen);
3558 SelectObject(hdc, faceBrush);
3559 Polygon(hdc, p, 3);
3560 }
3561
3562 if(flags & BF_ADJUST)
3563 *rect = r;
3564
3565 /* Restore the DC */
3566 SelectObject(hdc, oldPen);
3567 SelectObject(hdc, oldBrush);
3568
3569 /* Clean-up */
3570 DeleteObject(facePen);
3571 DeleteObject(shadowPen);
3572 DeleteObject(lightPen);
3573 DeleteObject(grayPen);
3574
3575 return TRUE;
3576}
3577//******************************************************************************
3578//Stolen from Wine (controls\uitools.c)
3579//******************************************************************************
3580BOOL WIN32API DrawEdge(HDC hdc, LPRECT rect, UINT edge, UINT flags)
3581{
3582 HBRUSH faceBrush, shadowBrush, lightBrush, blackBrush, grayBrush, nullBrush;
3583 HBRUSH iNBrush, iSBrush, iEBrush, iWBrush;
3584 HBRUSH oNBrush, oSBrush, oEBrush, oWBrush;
3585 HBRUSH oldBrush;
3586 POINT point[2];
3587 RECT r;
3588
3589#ifdef DEBUG
3590 WriteLog("USER32: DrawEdge %X %X, partially implemented\n", edge, flags);
3591 WriteLog("USER32: DrawEdge (%d,%d) (%d,%d)\n", rect->left, rect->top, rect->right, rect->bottom);
3592#endif
3593
3594 if(flags & BF_DIAGONAL) {
3595 return DrawEdgeDiag(hdc, rect, edge, flags);
3596 }
3597 /* If both rasied and sunken is specified, they anihilate one another */
3598 if( !((flags & BF_MONO) || (flags & BF_FLAT)) ){
3599 if( (edge & BDR_RAISEDOUTER) && (edge & BDR_SUNKENOUTER) )
3600 return FALSE;
3601 if( (edge & BDR_RAISEDINNER) && (edge & BDR_SUNKENINNER) )
3602 return FALSE;
3603 }
3604
3605 faceBrush = GetSysColorBrush(COLOR_BTNFACE);
3606 shadowBrush = GetSysColorBrush(COLOR_BTNSHADOW);
3607 lightBrush = GetSysColorBrush(COLOR_BTNHILIGHT);
3608 blackBrush = GetStockObject(BLACK_BRUSH);
3609 grayBrush = GetStockObject(LTGRAY_BRUSH);
3610 nullBrush = GetStockObject(NULL_BRUSH);
3611 oldBrush = SelectObject(hdc, nullBrush);
3612
3613 /* this is my working rectangle */
3614 r = *rect;
3615
3616 if(flags & BF_MONO){
3617 oNBrush = oSBrush = oEBrush = oWBrush = blackBrush;
3618 iNBrush = iSBrush = iEBrush = iWBrush = nullBrush;
3619 }else if(flags & BF_FLAT){
3620 oNBrush = oSBrush = oEBrush = oWBrush = shadowBrush;
3621 iNBrush = iSBrush = iEBrush = iWBrush = faceBrush;
3622 }else {
3623 if(flags & BF_SOFT){
3624 oNBrush = oWBrush = (edge & BDR_RAISEDOUTER) ? lightBrush : blackBrush;
3625 oSBrush = oEBrush = (edge & BDR_RAISEDOUTER) ? blackBrush : lightBrush;
3626 iNBrush = iWBrush = (edge & BDR_RAISEDINNER) ? grayBrush : shadowBrush;
3627 iSBrush = iEBrush = (edge & BDR_RAISEDINNER) ? shadowBrush : grayBrush;
3628 }
3629 else{
3630 oNBrush = oWBrush = (edge & BDR_RAISEDOUTER) ? grayBrush : shadowBrush;
3631 oSBrush = oEBrush = (edge & BDR_RAISEDOUTER) ? blackBrush : lightBrush;
3632 iNBrush = iWBrush = (edge & BDR_RAISEDINNER) ? lightBrush : blackBrush;
3633 iSBrush = iEBrush = (edge & BDR_RAISEDINNER) ? shadowBrush : grayBrush;
3634 }
3635 }
3636
3637 /* if it has external edge, draw it */
3638 if(edge & BDR_OUTER){
3639 if(flags & BF_RIGHT){
3640 SelectObject(hdc, oEBrush);
3641 PatBlt(hdc, r.right-1, r.top, 1, r.bottom - r.top, PATCOPY);
3642 r.right--;
3643 }
3644 if(flags & BF_BOTTOM){
3645 SelectObject(hdc, oSBrush);
3646 PatBlt(hdc, r.left, r.bottom-1, r.right-r.left, 1, PATCOPY);
3647 r.bottom--;
3648 }
3649 if(flags & BF_LEFT){
3650 SelectObject(hdc, oWBrush);
3651 PatBlt(hdc, r.left, r.top, 1, r.bottom - r.top, PATCOPY);
3652 r.left++;
3653 }
3654 if(flags & BF_TOP){
3655 SelectObject(hdc, oNBrush);
3656 PatBlt(hdc, r.left, r.top, r.right-r.left, 1, PATCOPY);
3657 r.top++;
3658 }
3659 }
3660
3661 /* if it has internal edge, draw it */
3662 if(edge & BDR_INNER){
3663 if(flags & BF_RIGHT){
3664 SelectObject(hdc, iEBrush);
3665 PatBlt(hdc, r.right-1, r.top, 1, r.bottom - r.top, PATCOPY);
3666 r.right--;
3667 }
3668 if(flags & BF_BOTTOM){
3669 SelectObject(hdc, iSBrush);
3670 PatBlt(hdc, r.left, r.bottom-1, r.right-r.left, 1, PATCOPY);
3671 r.bottom--;
3672 }
3673 if(flags & BF_LEFT){
3674 SelectObject(hdc, iWBrush);
3675 PatBlt(hdc, r.left, r.top, 1, r.bottom - r.top, PATCOPY);
3676 r.left++;
3677 }
3678 if(flags & BF_TOP){
3679 SelectObject(hdc, iNBrush);
3680 PatBlt(hdc, r.left, r.top, r.right-r.left, 1, PATCOPY);
3681 r.top++;
3682 }
3683 }
3684
3685 /* if we got to fill the middle, to it now */
3686 if((flags & BF_MIDDLE) && !(flags & BF_MONO))
3687 FillRect(hdc, &r, faceBrush);
3688
3689 /* adjust the rectangle if required */
3690 if(flags & BF_ADJUST)
3691 *rect = r;
3692
3693 /* Restore the DC */
3694 SelectObject(hdc, oldBrush);
3695
3696 return TRUE;
3697}
3698//******************************************************************************
3699//******************************************************************************
3700LRESULT WIN32API SendMessageTimeoutA(HWND hwnd, UINT Msg, WPARAM wParam,
3701 LPARAM lParam, UINT fuFlags, UINT uTimeOut,
3702 LPDWORD lpdwResult)
3703{
3704#ifdef DEBUG
3705 WriteLog("USER32: SendMessageTimeoutA, partially implemented\n");
3706#endif
3707 //ignore fuFlags & wTimeOut
3708 *lpdwResult = SendMessageA(hwnd, Msg, wParam, lParam);
3709 return(TRUE);
3710}
3711//******************************************************************************
3712//******************************************************************************
3713LRESULT WIN32API SendMessageTimeoutW(HWND hwnd, UINT Msg, WPARAM wParam,
3714 LPARAM lParam, UINT fuFlags, UINT uTimeOut,
3715 LPDWORD lpdwResult)
3716{
3717#ifdef DEBUG
3718 WriteLog("USER32: SendMessageTimeoutW, partially implemented\n");
3719#endif
3720 return(SendMessageTimeoutA(hwnd, Msg, wParam, lParam, fuFlags, uTimeOut, lpdwResult));
3721}
3722//******************************************************************************
3723//******************************************************************************
3724HANDLE WIN32API CopyImage(HANDLE hImage, UINT uType, int cxDesired, int cyDesired, UINT fuFlags)
3725{
3726#ifdef DEBUG
3727 WriteLog("USER32: CopyImage, not implemented\n");
3728#endif
3729 switch(uType) {
3730 case IMAGE_BITMAP:
3731 case IMAGE_CURSOR:
3732 case IMAGE_ICON:
3733 default:
3734#ifdef DEBUG
3735 WriteLog("USER32: CopyImage, unknown type\n");
3736#endif
3737 return(NULL);
3738 }
3739 return(NULL);
3740}
3741//******************************************************************************
3742//******************************************************************************
3743BOOL WIN32API GetKeyboardState(PBYTE lpKeyState)
3744{
3745#ifdef DEBUG
3746 WriteLog("USER32: GetKeyboardState, not properly implemented\n");
3747#endif
3748 memset(lpKeyState, 0, 256);
3749 return(TRUE);
3750}
3751//******************************************************************************
3752//******************************************************************************
3753BOOL WIN32API SetKeyboardState(PBYTE lpKeyState)
3754{
3755#ifdef DEBUG
3756 WriteLog("USER32: SetKeyboardState, not implemented\n");
3757#endif
3758 return(TRUE);
3759}
3760//******************************************************************************
3761//******************************************************************************
3762BOOL WIN32API DrawFrameControl(HDC hdc, LPRECT lprc, UINT uType, UINT uState)
3763{
3764#ifdef DEBUG
3765 WriteLog("USER32: DrawFrameControl, not implemented\n");
3766#endif
3767 return(TRUE);
3768}
3769//******************************************************************************
3770//******************************************************************************
3771BOOL WIN32API SendNotifyMessageA(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)
3772{
3773#ifdef DEBUG
3774 WriteLog("USER32: SendNotifyMessageA, not completely implemented\n");
3775#endif
3776 return(SendMessageA(hwnd, Msg, wParam, lParam));
3777}
3778//******************************************************************************
3779//******************************************************************************
3780BOOL WIN32API SendNotifyMessageW(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)
3781{
3782#ifdef DEBUG
3783 WriteLog("USER32: SendNotifyMessageW, not completely implemented\n");
3784#endif
3785 return(SendMessageA(hwnd, Msg, wParam, lParam));
3786}
3787//******************************************************************************
3788//2nd parameter not used according to SDK (yet?)
3789//******************************************************************************
3790VOID WIN32API SetLastErrorEx(DWORD dwErrCode, DWORD dwType)
3791{
3792#ifdef DEBUG
3793 WriteLog("USER32: SetLastErrorEx\n");
3794#endif
3795 SetLastError(dwErrCode);
3796}
3797//******************************************************************************
3798//******************************************************************************
3799LPARAM WIN32API SetMessageExtraInfo(LPARAM lParam)
3800{
3801#ifdef DEBUG
3802 WriteLog("USER32: SetMessageExtraInfo, not implemented\n");
3803#endif
3804 return(0);
3805}
3806//******************************************************************************
3807//******************************************************************************
3808BOOL WIN32API ActivateKeyboardLayout(HKL hkl, UINT fuFlags)
3809{
3810#ifdef DEBUG
3811 WriteLog("USER32: ActivateKeyboardLayout, not implemented\n");
3812#endif
3813 return(TRUE);
3814}
3815//******************************************************************************
3816//******************************************************************************
3817int WIN32API GetKeyboardLayoutList(int nBuff, HKL *lpList)
3818{
3819#ifdef DEBUG
3820 WriteLog("USER32: GetKeyboardLayoutList, not implemented\n");
3821#endif
3822 return(0);
3823}
3824//******************************************************************************
3825//******************************************************************************
3826HKL WIN32API GetKeyboardLayout(DWORD dwLayout)
3827{
3828#ifdef DEBUG
3829 WriteLog("USER32: GetKeyboardLayout, not implemented\n");
3830#endif
3831 return(0);
3832}
3833//******************************************************************************
3834//******************************************************************************
3835int WIN32API LookupIconIdFromDirectory(PBYTE presbits, BOOL fIcon)
3836{
3837#ifdef DEBUG
3838 WriteLog("USER32: LookupIconIdFromDirectory, not implemented\n");
3839#endif
3840 return(0);
3841}
3842//******************************************************************************
3843//******************************************************************************
3844int WIN32API LookupIconIdFromDirectoryEx(PBYTE presbits, BOOL fIcon,
3845 int cxDesired, int cyDesired,
3846 UINT Flags)
3847{
3848#ifdef DEBUG
3849 WriteLog("USER32: LookupIconIdFromDirectoryEx, not implemented\n");
3850#endif
3851 return(0);
3852}
3853//******************************************************************************
3854//DWORD idAttach; /* thread to attach */
3855//DWORD idAttachTo; /* thread to attach to */
3856//BOOL fAttach; /* attach or detach */
3857//******************************************************************************
3858BOOL WIN32API AttachThreadInput(DWORD idAttach, DWORD idAttachTo, BOOL fAttach)
3859{
3860#ifdef DEBUG
3861 WriteLog("USER32: AttachThreadInput, not implemented\n");
3862#endif
3863 return(TRUE);
3864}
3865//******************************************************************************
3866//******************************************************************************
3867BOOL WIN32API RegisterHotKey(HWND hwnd, int idHotKey, UINT fuModifiers, UINT uVirtKey)
3868{
3869#ifdef DEBUG
3870 WriteLog("USER32: RegisterHotKey, not implemented\n");
3871#endif
3872 return(TRUE);
3873}
3874//******************************************************************************
3875//******************************************************************************
3876BOOL WIN32API UnregisterHotKey(HWND hwnd, int idHotKey)
3877{
3878#ifdef DEBUG
3879 WriteLog("USER32: UnregisterHotKey, not implemented\n");
3880#endif
3881 return(TRUE);
3882}
3883//******************************************************************************
3884//******************************************************************************
3885BOOL WIN32API DrawStateA(HDC hdc, HBRUSH hbc, DRAWSTATEPROC lpOutputFunc,
3886 LPARAM lData, WPARAM wData, int x, int y, int cx,
3887 int cy, UINT fuFlags)
3888{
3889#ifdef DEBUG
3890 WriteLog("USER32: DrawStateA, not implemented\n");
3891#endif
3892 return(TRUE);
3893}
3894//******************************************************************************
3895//******************************************************************************
3896//******************************************************************************
3897//******************************************************************************
3898BOOL WIN32API SetWindowContextHelpId(HWND hwnd, DWORD dwContextHelpId)
3899{
3900#ifdef DEBUG
3901 WriteLog("USER32: SetWindowContextHelpId, not implemented\n");
3902#endif
3903 return(TRUE);
3904}
3905//******************************************************************************
3906//******************************************************************************
3907DWORD WIN32API GetWindowContextHelpId(HWND hwnd)
3908{
3909#ifdef DEBUG
3910 WriteLog("USER32: GetWindowContextHelpId, not implemented\n");
3911#endif
3912 return(0);
3913}
3914//******************************************************************************
3915//restores iconized window to previous size/position
3916//******************************************************************************
3917BOOL WIN32API OpenIcon(HWND hwnd)
3918{
3919#ifdef DEBUG
3920 WriteLog("USER32: OpenIcon\n");
3921#endif
3922 if(!IsIconic(hwnd))
3923 return FALSE;
3924 ShowWindow(hwnd, SW_SHOWNORMAL);
3925 return TRUE;
3926}
3927//******************************************************************************
3928//******************************************************************************
3929BOOL WIN32API IsWindowUnicode(HWND hwnd)
3930{
3931#ifdef DEBUG
3932 WriteLog("USER32: IsWindowUnicode, not implemented\n");
3933#endif
3934 return(FALSE);
3935}
3936//******************************************************************************
3937//******************************************************************************
3938BOOL WIN32API GetMonitorInfoA(HMONITOR,LPMONITORINFO)
3939{
3940#ifdef DEBUG
3941 WriteLog("USER32: GetMonitorInfoA not supported!!\n");
3942#endif
3943 return(FALSE);
3944}
3945//******************************************************************************
3946//******************************************************************************
3947BOOL WIN32API GetMonitorInfoW(HMONITOR,LPMONITORINFO)
3948{
3949#ifdef DEBUG
3950 WriteLog("USER32: GetMonitorInfoW not supported!!\n");
3951#endif
3952 return(FALSE);
3953}
3954//******************************************************************************
3955//******************************************************************************
3956HMONITOR WIN32API MonitorFromWindow(HWND hwnd, DWORD dwFlags)
3957{
3958#ifdef DEBUG
3959 WriteLog("USER32: MonitorFromWindow not correctly supported??\n");
3960#endif
3961 return(0);
3962}
3963//******************************************************************************
3964//******************************************************************************
3965HMONITOR WIN32API MonitorFromRect(LPRECT rect, DWORD dwFlags)
3966{
3967#ifdef DEBUG
3968 WriteLog("USER32: MonitorFromRect not correctly supported??\n");
3969#endif
3970 return(0);
3971}
3972//******************************************************************************
3973//******************************************************************************
3974HMONITOR WIN32API MonitorFromPoint(POINT point, DWORD dwflags)
3975{
3976#ifdef DEBUG
3977 WriteLog("USER32: MonitorFromPoint not correctly supported??\n");
3978#endif
3979 return(0);
3980}
3981//******************************************************************************
3982//******************************************************************************
3983BOOL WIN32API EnumDisplayMonitors(HDC,LPRECT,MONITORENUMPROC,LPARAM)
3984{
3985#ifdef DEBUG
3986 WriteLog("USER32: EnumDisplayMonitors not supported??\n");
3987#endif
3988 return(FALSE);
3989}
3990//******************************************************************************
3991//******************************************************************************
3992BOOL WIN32API EnumDisplaySettingsA(LPCSTR lpszDeviceName, DWORD iModeNum,
3993 LPDEVMODEA lpDevMode)
3994{
3995#ifdef DEBUG
3996 WriteLog("USER32: EnumDisplaySettingsA FAKED\n");
3997#endif
3998 switch(iModeNum) {
3999 case 0:
4000 lpDevMode->dmBitsPerPel = 16;
4001 lpDevMode->dmPelsWidth = 768;
4002 lpDevMode->dmPelsHeight = 1024;
4003 lpDevMode->dmDisplayFlags = 0;
4004 lpDevMode->dmDisplayFrequency = 70;
4005 break;
4006 case 1:
4007 lpDevMode->dmBitsPerPel = 16;
4008 lpDevMode->dmPelsWidth = 640;
4009 lpDevMode->dmPelsHeight = 480;
4010 lpDevMode->dmDisplayFlags = 0;
4011 lpDevMode->dmDisplayFrequency = 70;
4012 break;
4013 default:
4014 return(FALSE);
4015 }
4016 return(TRUE);
4017}
4018//******************************************************************************
4019//******************************************************************************
4020LONG WIN32API ChangeDisplaySettingsA(LPDEVMODEA lpDevMode, DWORD dwFlags)
4021{
4022#ifdef DEBUG
4023 if(lpDevMode) {
4024 WriteLog("USER32: ChangeDisplaySettingsA FAKED %X\n", dwFlags);
4025 WriteLog("USER32: ChangeDisplaySettingsA lpDevMode->dmBitsPerPel %d\n", lpDevMode->dmBitsPerPel);
4026 WriteLog("USER32: ChangeDisplaySettingsA lpDevMode->dmPelsWidth %d\n", lpDevMode->dmPelsWidth);
4027 WriteLog("USER32: ChangeDisplaySettingsA lpDevMode->dmPelsHeight %d\n", lpDevMode->dmPelsHeight);
4028 }
4029#endif
4030 return(DISP_CHANGE_SUCCESSFUL);
4031}
4032//******************************************************************************
4033//******************************************************************************
4034
4035
4036/*****************************************************************************
4037 * Name : BOOL WIN32API AnyPopup
4038 * Purpose : The AnyPopup function indicates whether an owned, visible,
4039 * top-level pop-up, or overlapped window exists on the screen. The
4040 * function searches the entire Windows screen, not just the calling
4041 * application's client area.
4042 * Parameters: VOID
4043 * Variables :
4044 * Result : If a pop-up window exists, the return value is TRUE even if the
4045 * pop-up window is completely covered by other windows. Otherwise,
4046 * it is FALSE.
4047 * Remark : AnyPopup is a Windows version 1.x function and is retained for
4048 * compatibility purposes. It is generally not useful.
4049 * Status : UNTESTED STUB
4050 *
4051 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4052 *****************************************************************************/
4053
4054BOOL WIN32API AnyPopup(VOID)
4055{
4056 dprintf(("USER32:AnyPopup() not implemented.\n"));
4057
4058 return (FALSE);
4059}
4060
4061
4062/*****************************************************************************
4063 * Name : long WIN32API BroadcastSystemMessage
4064 * Purpose : The BroadcastSystemMessage function sends a message to the given
4065 * recipients. The recipients can be applications, installable
4066 * drivers, Windows-based network drivers, system-level device
4067 * drivers, or any combination of these system components.
4068 * Parameters: DWORD dwFlags,
4069 LPDWORD lpdwRecipients,
4070 UINT uiMessage,
4071 WPARAM wParam,
4072 LPARAM lParam
4073 * Variables :
4074 * Result : If the function succeeds, the return value is a positive value.
4075 * If the function is unable to broadcast the message, the return value is -1.
4076 * If the dwFlags parameter is BSF_QUERY and at least one recipient returned FALSE to the corresponding message, the return value is zero.
4077 * Remark :
4078 * Status : UNTESTED STUB
4079 *
4080 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4081 *****************************************************************************/
4082
4083long WIN32API BroadcastSystemMessage(DWORD dwFlags,
4084 LPDWORD lpdwRecipients,
4085 UINT uiMessage,
4086 WPARAM wParam,
4087 LPARAM lParam)
4088{
4089 dprintf(("USER32:BroadcastSystemMessage(%08xh,%08xh,%08xh,%08xh,%08x) not implemented.\n",
4090 dwFlags,
4091 lpdwRecipients,
4092 uiMessage,
4093 wParam,
4094 lParam));
4095
4096 return (-1);
4097}
4098
4099
4100/*****************************************************************************
4101 * Name : WORD WIN32API CascadeWindows
4102 * Purpose : The CascadeWindows function cascades the specified windows or
4103 * the child windows of the specified parent window.
4104 * Parameters: HWND hwndParent handle of parent window
4105 * UINT wHow types of windows not to arrange
4106 * CONST RECT * lpRect rectangle to arrange windows in
4107 * UINT cKids number of windows to arrange
4108 * const HWND FAR * lpKids array of window handles
4109 * Variables :
4110 * Result : If the function succeeds, the return value is the number of windows arranged.
4111 * If the function fails, the return value is zero.
4112 * Remark :
4113 * Status : UNTESTED STUB
4114 *
4115 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4116 *****************************************************************************/
4117
4118WORD WIN32API CascadeWindows(HWND hwndParent,
4119 UINT wHow,
4120 CONST LPRECT lpRect,
4121 UINT cKids,
4122 const HWND *lpKids)
4123{
4124 dprintf(("USER32:CascadeWindows(%08xh,%u,%08xh,%u,%08x) not implemented.\n",
4125 hwndParent,
4126 wHow,
4127 lpRect,
4128 cKids,
4129 lpKids));
4130
4131 return (0);
4132}
4133
4134
4135/*****************************************************************************
4136 * Name : LONG WIN32API ChangeDisplaySettingsW
4137 * Purpose : The ChangeDisplaySettings function changes the display settings
4138 * to the specified graphics mode.
4139 * Parameters: LPDEVMODEW lpDevModeW
4140 * DWORD dwFlags
4141 * Variables :
4142 * Result : DISP_CHANGE_SUCCESSFUL The settings change was successful.
4143 * DISP_CHANGE_RESTART The computer must be restarted in order for the graphics mode to work.
4144 * DISP_CHANGE_BADFLAGS An invalid set of flags was passed in.
4145 * DISP_CHANGE_FAILED The display driver failed the specified graphics mode.
4146 * DISP_CHANGE_BADMODE The graphics mode is not supported.
4147 * DISP_CHANGE_NOTUPDATED Unable to write settings to the registry.
4148 * Remark :
4149 * Status : UNTESTED STUB
4150 *
4151 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4152 *****************************************************************************/
4153
4154LONG WIN32API ChangeDisplaySettingsW(LPDEVMODEW lpDevMode,
4155 DWORD dwFlags)
4156{
4157 dprintf(("USER32:ChangeDisplaySettingsW(%08xh,%08x) not implemented.\n",
4158 lpDevMode,
4159 dwFlags));
4160
4161 return (ChangeDisplaySettingsA((LPDEVMODEA)lpDevMode,
4162 dwFlags));
4163}
4164
4165/*****************************************************************************
4166 * Name : BOOL WIN32API CloseDesktop
4167 * Purpose : The CloseDesktop function closes an open handle of a desktop
4168 * object. A desktop is a secure object contained within a window
4169 * station object. A desktop has a logical display surface and
4170 * contains windows, menus and hooks.
4171 * Parameters: HDESK hDesktop
4172 * Variables :
4173 * Result : If the function succeeds, the return value is TRUE.
4174 * If the functions fails, the return value is FALSE. To get
4175 * extended error information, call GetLastError.
4176 * Remark :
4177 * Status : UNTESTED STUB
4178 *
4179 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4180 *****************************************************************************/
4181
4182BOOL WIN32API CloseDesktop(HDESK hDesktop)
4183{
4184 dprintf(("USER32:CloseDesktop(%08x) not implemented.\n",
4185 hDesktop));
4186
4187 return (FALSE);
4188}
4189
4190
4191/*****************************************************************************
4192 * Name : BOOL WIN32API CloseWindowStation
4193 * Purpose : The CloseWindowStation function closes an open window station handle.
4194 * Parameters: HWINSTA hWinSta
4195 * Variables :
4196 * Result :
4197 * Remark : If the function succeeds, the return value is TRUE.
4198 * If the functions fails, the return value is FALSE. To get
4199 * extended error information, call GetLastError.
4200 * Status : UNTESTED STUB
4201 *
4202 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4203 *****************************************************************************/
4204
4205BOOL WIN32API CloseWindowStation(HWINSTA hWinSta)
4206{
4207 dprintf(("USER32:CloseWindowStation(%08x) not implemented.\n",
4208 hWinSta));
4209
4210 return (FALSE);
4211}
4212
4213
4214/*****************************************************************************
4215 * Name : HDESK WIN32API CreateDesktopA
4216 * Purpose : The CreateDesktop function creates a new desktop on the window
4217 * station associated with the calling process.
4218 * Parameters: LPCTSTR lpszDesktop name of the new desktop
4219 * LPCTSTR lpszDevice name of display device to assign to the desktop
4220 * LPDEVMODE pDevMode reserved; must be NULL
4221 * DWORD dwFlags flags to control interaction with other applications
4222 * DWORD dwDesiredAccess specifies access of returned handle
4223 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the desktop
4224 * Variables :
4225 * Result : If the function succeeds, the return value is a handle of the
4226 * newly created desktop.
4227 * If the function fails, the return value is NULL. To get extended
4228 * error information, call GetLastError.
4229 * Remark :
4230 * Status : UNTESTED STUB
4231 *
4232 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4233 *****************************************************************************/
4234
4235HDESK WIN32API CreateDesktopA(LPCTSTR lpszDesktop,
4236 LPCTSTR lpszDevice,
4237 LPDEVMODEA pDevMode,
4238 DWORD dwFlags,
4239 DWORD dwDesiredAccess,
4240 LPSECURITY_ATTRIBUTES lpsa)
4241{
4242 dprintf(("USER32:CreateDesktopA(%s,%s,%08xh,%08xh,%08xh,%08x) not implemented.\n",
4243 lpszDesktop,
4244 lpszDevice,
4245 pDevMode,
4246 dwFlags,
4247 dwDesiredAccess,
4248 lpsa));
4249
4250 return (NULL);
4251}
4252
4253
4254/*****************************************************************************
4255 * Name : HDESK WIN32API CreateDesktopW
4256 * Purpose : The CreateDesktop function creates a new desktop on the window
4257 * station associated with the calling process.
4258 * Parameters: LPCTSTR lpszDesktop name of the new desktop
4259 * LPCTSTR lpszDevice name of display device to assign to the desktop
4260 * LPDEVMODE pDevMode reserved; must be NULL
4261 * DWORD dwFlags flags to control interaction with other applications
4262 * DWORD dwDesiredAccess specifies access of returned handle
4263 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the desktop
4264 * Variables :
4265 * Result : If the function succeeds, the return value is a handle of the
4266 * newly created desktop.
4267 * If the function fails, the return value is NULL. To get extended
4268 * error information, call GetLastError.
4269 * Remark :
4270 * Status : UNTESTED STUB
4271 *
4272 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4273 *****************************************************************************/
4274
4275HDESK WIN32API CreateDesktopW(LPCTSTR lpszDesktop,
4276 LPCTSTR lpszDevice,
4277 LPDEVMODEW pDevMode,
4278 DWORD dwFlags,
4279 DWORD dwDesiredAccess,
4280 LPSECURITY_ATTRIBUTES lpsa)
4281{
4282 dprintf(("USER32:CreateDesktopW(%s,%s,%08xh,%08xh,%08xh,%08x) not implemented.\n",
4283 lpszDesktop,
4284 lpszDevice,
4285 pDevMode,
4286 dwFlags,
4287 dwDesiredAccess,
4288 lpsa));
4289
4290 return (NULL);
4291}
4292
4293
4294/*****************************************************************************
4295 * Name : HWINSTA WIN32API CreateWindowStationA
4296 * Purpose : The CreateWindowStation function creates a window station object.
4297 * It returns a handle that can be used to access the window station.
4298 * A window station is a secure object that contains a set of global
4299 * atoms, a clipboard, and a set of desktop objects.
4300 * Parameters: LPTSTR lpwinsta name of the new window station
4301 * DWORD dwReserved reserved; must be NULL
4302 * DWORD dwDesiredAccess specifies access of returned handle
4303 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the window station
4304 * Variables :
4305 * Result : If the function succeeds, the return value is the handle to the
4306 * newly created window station.
4307 * If the function fails, the return value is NULL. To get extended
4308 * error information, call GetLastError.
4309 * Remark :
4310 * Status : UNTESTED STUB
4311 *
4312 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4313 *****************************************************************************/
4314
4315HWINSTA WIN32API CreateWindowStationA(LPTSTR lpWinSta,
4316 DWORD dwReserved,
4317 DWORD dwDesiredAccess,
4318 LPSECURITY_ATTRIBUTES lpsa)
4319{
4320 dprintf(("USER32:CreateWindowStationA(%s,%08xh,%08xh,%08x) not implemented.\n",
4321 lpWinSta,
4322 dwReserved,
4323 dwDesiredAccess,
4324 lpsa));
4325
4326 return (NULL);
4327}
4328
4329
4330/*****************************************************************************
4331 * Name : HWINSTA WIN32API CreateWindowStationW
4332 * Purpose : The CreateWindowStation function creates a window station object.
4333 * It returns a handle that can be used to access the window station.
4334 * A window station is a secure object that contains a set of global
4335 * atoms, a clipboard, and a set of desktop objects.
4336 * Parameters: LPTSTR lpwinsta name of the new window station
4337 * DWORD dwReserved reserved; must be NULL
4338 * DWORD dwDesiredAccess specifies access of returned handle
4339 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the window station
4340 * Variables :
4341 * Result : If the function succeeds, the return value is the handle to the
4342 * newly created window station.
4343 * If the function fails, the return value is NULL. To get extended
4344 * error information, call GetLastError.
4345 * Remark :
4346 * Status : UNTESTED STUB
4347 *
4348 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4349 *****************************************************************************/
4350
4351HWINSTA WIN32API CreateWindowStationW(LPWSTR lpWinSta,
4352 DWORD dwReserved,
4353 DWORD dwDesiredAccess,
4354 LPSECURITY_ATTRIBUTES lpsa)
4355{
4356 dprintf(("USER32:CreateWindowStationW(%s,%08xh,%08xh,%08x) not implemented.\n",
4357 lpWinSta,
4358 dwReserved,
4359 dwDesiredAccess,
4360 lpsa));
4361
4362 return (NULL);
4363}
4364
4365/*****************************************************************************
4366 * Name : BOOL WIN32API DragDetect
4367 * Purpose : The DragDetect function captures the mouse and tracks its movement
4368 * Parameters: HWND hwnd
4369 * POINT pt
4370 * Variables :
4371 * Result : If the user moved the mouse outside of the drag rectangle while
4372 * holding the left button down, the return value is TRUE.
4373 * If the user did not move the mouse outside of the drag rectangle
4374 * while holding the left button down, the return value is FALSE.
4375 * Remark :
4376 * Status : UNTESTED STUB
4377 *
4378 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4379 *****************************************************************************/
4380
4381BOOL WIN32API DragDetect(HWND hwnd,
4382 POINT pt)
4383{
4384 dprintf(("USER32:DragDetect(%08xh,...) not implemented.\n",
4385 hwnd));
4386
4387 return (FALSE);
4388}
4389
4390
4391/*****************************************************************************
4392 * Name : BOOL WIN32API DrawAnimatedRects
4393 * Purpose : The DrawAnimatedRects function draws a wire-frame rectangle
4394 * and animates it to indicate the opening of an icon or the
4395 * minimizing or maximizing of a window.
4396 * Parameters: HWND hwnd handle of clipping window
4397 * int idAni type of animation
4398 * CONST RECT * lprcFrom address of rectangle coordinates (minimized)
4399 * CONST RECT * lprcTo address of rectangle coordinates (restored)
4400 * Variables :
4401 * Result : If the function succeeds, the return value is TRUE.
4402 * If the function fails, the return value is FALSE.
4403 * Remark :
4404 * Status : UNTESTED STUB
4405 *
4406 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4407 *****************************************************************************/
4408
4409BOOL WIN32API DrawAnimatedRects(HWND hwnd,
4410 int idAni,
4411 CONST RECT *lprcFrom,
4412 CONST RECT *lprcTo)
4413{
4414 dprintf(("USER32:DrawAnimatedRects (%08xh,%u,%08xh,%08x) not implemented.\n",
4415 hwnd,
4416 idAni,
4417 lprcFrom,
4418 lprcTo));
4419
4420 return (TRUE);
4421}
4422
4423
4424/*****************************************************************************
4425 * Name : VOID WIN32API DrawCaption
4426 * Purpose : The DrawCaption function draws a window caption.
4427 * Parameters: HDC hdc handle of device context
4428 * LPRECT lprc address of bounding rectangle coordinates
4429 * HFONT hfont handle of font for caption
4430 * HICON hicon handle of icon in caption
4431 * LPSTR lpszText address of caption string
4432 * WORD wFlags drawing options
4433 * Variables :
4434 * Result :
4435 * Remark :
4436 * Status : UNTESTED STUB
4437 *
4438 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4439 *****************************************************************************/
4440
4441BOOL WIN32API DrawCaption (HWND hwnd,
4442 HDC hdc,
4443 const RECT *lprc,
4444 UINT wFlags)
4445{
4446 dprintf(("USER32:DrawCaption (%08xh,%08xh,%08xh,%08xh) not implemented.\n",
4447 hwnd,
4448 hdc,
4449 lprc,
4450 wFlags));
4451
4452 return FALSE;
4453}
4454
4455
4456/*****************************************************************************
4457 * Name :
4458 * Purpose :
4459 * Parameters:
4460 * Variables :
4461 * Result :
4462 * Remark :
4463 * Status : UNTESTED STUB
4464 *
4465 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4466 *****************************************************************************/
4467
4468BOOL WIN32API DrawStateW(HDC hdc,
4469 HBRUSH hBrush,
4470 DRAWSTATEPROC lpOutputFunc,
4471 LPARAM lParam,
4472 WPARAM wParam,
4473 int x,
4474 int y,
4475 int cx,
4476 int cy,
4477 UINT fuFlags)
4478{
4479 dprintf(("USER32:DrawStateW (%08xh,%08xh,%08xh,%08xh,%08xh,%d,%d,%d,%d,%08x) not implemented.\n",
4480 hdc,
4481 hBrush,
4482 lpOutputFunc,
4483 lParam,
4484 wParam,
4485 x,
4486 y,
4487 cx,
4488 cy,
4489 fuFlags));
4490
4491 return(DrawStateA(hdc,
4492 hBrush,
4493 lpOutputFunc,
4494 lParam,
4495 wParam,
4496 x,
4497 y,
4498 cx,
4499 cy,
4500 fuFlags));
4501}
4502
4503
4504/*****************************************************************************
4505 * Name : BOOL WIN32API EnumDesktopWindows
4506 * Purpose : The EnumDesktopWindows function enumerates all windows in a
4507 * desktop by passing the handle of each window, in turn, to an
4508 * application-defined callback function.
4509 * Parameters: HDESK hDesktop handle of desktop to enumerate
4510 * WNDENUMPROC lpfn points to application's callback function
4511 * LPARAM lParam 32-bit value to pass to the callback function
4512 * Variables :
4513 * Result : If the function succeeds, the return value is TRUE.
4514 * If the function fails, the return value is FALSE. To get
4515 * extended error information, call GetLastError.
4516 * Remark :
4517 * Status : UNTESTED STUB
4518 *
4519 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4520 *****************************************************************************/
4521
4522BOOL WIN32API EnumDesktopWindows(HDESK hDesktop,
4523 WNDENUMPROC lpfn,
4524 LPARAM lParam)
4525{
4526 dprintf(("USER32:EnumDesktopWindows (%08xh,%08xh,%08x) not implemented.\n",
4527 hDesktop,
4528 lpfn,
4529 lParam));
4530
4531 return (FALSE);
4532}
4533
4534
4535/*****************************************************************************
4536 * Name : BOOL WIN32API EnumDesktopsA
4537 * Purpose : The EnumDesktops function enumerates all desktops in the window
4538 * station assigned to the calling process. The function does so by
4539 * passing the name of each desktop, in turn, to an application-
4540 * defined callback function.
4541 * Parameters: HWINSTA hwinsta handle of window station to enumerate
4542 * DESKTOPENUMPROC lpEnumFunc points to application's callback function
4543 * LPARAM lParam 32-bit value to pass to the callback function
4544 * Variables :
4545 * Result : If the function succeeds, the return value is TRUE.
4546 * If the function fails, the return value is FALSE. To get extended
4547 * error information, call GetLastError.
4548 * Remark :
4549 * Status : UNTESTED STUB
4550 *
4551 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4552 *****************************************************************************/
4553
4554BOOL WIN32API EnumDesktopsA(HWINSTA hWinSta,
4555 DESKTOPENUMPROCA lpEnumFunc,
4556 LPARAM lParam)
4557{
4558 dprintf(("USER32:EnumDesktopsA (%08xh,%08xh,%08x) not implemented.\n",
4559 hWinSta,
4560 lpEnumFunc,
4561 lParam));
4562
4563 return (FALSE);
4564}
4565
4566
4567/*****************************************************************************
4568 * Name : BOOL WIN32API EnumDesktopsW
4569 * Purpose : The EnumDesktops function enumerates all desktops in the window
4570 * station assigned to the calling process. The function does so by
4571 * passing the name of each desktop, in turn, to an application-
4572 * defined callback function.
4573 * Parameters: HWINSTA hwinsta handle of window station to enumerate
4574 * DESKTOPENUMPROC lpEnumFunc points to application's callback function
4575 * LPARAM lParam 32-bit value to pass to the callback function
4576 * Variables :
4577 * Result : If the function succeeds, the return value is TRUE.
4578 * If the function fails, the return value is FALSE. To get extended
4579 * error information, call GetLastError.
4580 * Remark :
4581 * Status : UNTESTED STUB
4582 *
4583 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4584 *****************************************************************************/
4585
4586BOOL WIN32API EnumDesktopsW(HWINSTA hWinSta,
4587 DESKTOPENUMPROCW lpEnumFunc,
4588 LPARAM lParam)
4589{
4590 dprintf(("USER32:EnumDesktopsW (%08xh,%08xh,%08x) not implemented.\n",
4591 hWinSta,
4592 lpEnumFunc,
4593 lParam));
4594
4595 return (FALSE);
4596}
4597
4598
4599
4600/*****************************************************************************
4601 * Name : BOOL WIN32API EnumDisplaySettingsW
4602 * Purpose : The EnumDisplaySettings function obtains information about one
4603 * of a display device's graphics modes. You can obtain information
4604 * for all of a display device's graphics modes by making a series
4605 * of calls to this function.
4606 * Parameters: LPCTSTR lpszDeviceName specifies the display device
4607 * DWORD iModeNum specifies the graphics mode
4608 * LPDEVMODE lpDevMode points to structure to receive settings
4609 * Variables :
4610 * Result : If the function succeeds, the return value is TRUE.
4611 * If the function fails, the return value is FALSE.
4612 * Remark :
4613 * Status : UNTESTED STUB
4614 *
4615 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4616 *****************************************************************************/
4617
4618BOOL WIN32API EnumDisplaySettingsW(LPCSTR lpszDeviceName,
4619 DWORD iModeNum,
4620 LPDEVMODEW lpDevMode)
4621{
4622 dprintf(("USER32:EnumDisplaySettingsW (%s,%08xh,%08x) not implemented.\n",
4623 lpszDeviceName,
4624 iModeNum,
4625 lpDevMode));
4626
4627 return (EnumDisplaySettingsA(lpszDeviceName,
4628 iModeNum,
4629 (LPDEVMODEA)lpDevMode));
4630}
4631
4632
4633/*****************************************************************************
4634 * Name : BOOL WIN32API EnumWindowStationsA
4635 * Purpose : The EnumWindowStations function enumerates all windowstations
4636 * in the system by passing the name of each window station, in
4637 * turn, to an application-defined callback function.
4638 * Parameters:
4639 * Variables : WINSTAENUMPROC lpEnumFunc points to application's callback function
4640 * LPARAM lParam 32-bit value to pass to the callback function
4641 * Result : If the function succeeds, the return value is TRUE.
4642 * If the function fails the return value is FALSE. To get extended
4643 * error information, call GetLastError.
4644 * Remark :
4645 * Status : UNTESTED STUB
4646 *
4647 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4648 *****************************************************************************/
4649
4650BOOL WIN32API EnumWindowStationsA(WINSTAENUMPROCA lpEnumFunc,
4651 LPARAM lParam)
4652{
4653 dprintf(("USER32:EnumWindowStationsA (%08xh,%08x) not implemented.\n",
4654 lpEnumFunc,
4655 lParam));
4656
4657 return (FALSE);
4658}
4659
4660
4661/*****************************************************************************
4662 * Name : BOOL WIN32API EnumWindowStationsW
4663 * Purpose : The EnumWindowStations function enumerates all windowstations
4664 * in the system by passing the name of each window station, in
4665 * turn, to an application-defined callback function.
4666 * Parameters:
4667 * Variables : WINSTAENUMPROC lpEnumFunc points to application's callback function
4668 * LPARAM lParam 32-bit value to pass to the callback function
4669 * Result : If the function succeeds, the return value is TRUE.
4670 * If the function fails the return value is FALSE. To get extended
4671 * error information, call GetLastError.
4672 * Remark :
4673 * Status : UNTESTED STUB
4674 *
4675 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4676 *****************************************************************************/
4677
4678BOOL WIN32API EnumWindowStationsW(WINSTAENUMPROCW lpEnumFunc,
4679 LPARAM lParam)
4680{
4681 dprintf(("USER32:EnumWindowStationsW (%08xh,%08x) not implemented.\n",
4682 lpEnumFunc,
4683 lParam));
4684
4685 return (FALSE);
4686}
4687
4688
4689/*****************************************************************************
4690 * Name : HWND WIN32API FindWindowExW
4691 * Purpose : The FindWindowEx function retrieves the handle of a window whose
4692 * class name and window name match the specified strings. The
4693 * function searches child windows, beginning with the one following
4694 * the given child window.
4695 * Parameters: HWND hwndParent handle of parent window
4696 * HWND hwndChildAfter handle of a child window
4697 * LPCTSTR lpszClass address of class name
4698 * LPCTSTR lpszWindow address of window name
4699 * Variables :
4700 * Result : If the function succeeds, the return value is the handle of the
4701 * window that has the specified class and window names.
4702 * If the function fails, the return value is NULL. To get extended
4703 * error information, call GetLastError.
4704 * Remark :
4705 * Status : UNTESTED STUB
4706 *
4707 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4708 *****************************************************************************/
4709
4710HWND WIN32API FindWindowExW(HWND hwndParent,
4711 HWND hwndChildAfter,
4712 LPCWSTR lpszClass,
4713 LPCWSTR lpszWindow)
4714{
4715 dprintf(("USER32:FindWindowExW (%08xh,%08xh,%s,%s) not implemented.\n",
4716 hwndParent,
4717 hwndChildAfter,
4718 lpszClass,
4719 lpszWindow));
4720
4721 return (NULL);
4722}
4723
4724/*****************************************************************************
4725 * Name : BOOL WIN32API GetInputState
4726 * Purpose : The GetInputState function determines whether there are
4727 * mouse-button or keyboard messages in the calling thread's message queue.
4728 * Parameters:
4729 * Variables :
4730 * Result : If the queue contains one or more new mouse-button or keyboard
4731 * messages, the return value is TRUE.
4732 * If the function fails, the return value is FALSE.
4733 * Remark :
4734 * Status : UNTESTED STUB
4735 *
4736 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4737 *****************************************************************************/
4738
4739BOOL WIN32API GetInputState(VOID)
4740{
4741 dprintf(("USER32:GetInputState () not implemented.\n"));
4742
4743 return (FALSE);
4744}
4745
4746
4747/*****************************************************************************
4748 * Name : UINT WIN32API GetKBCodePage
4749 * Purpose : The GetKBCodePage function is provided for compatibility with
4750 * earlier versions of Windows. In the Win32 application programming
4751 * interface (API) it just calls the GetOEMCP function.
4752 * Parameters:
4753 * Variables :
4754 * Result : If the function succeeds, the return value is an OEM code-page
4755 * identifier, or it is the default identifier if the registry
4756 * value is not readable. For a list of OEM code-page identifiers,
4757 * see GetOEMCP.
4758 * Remark :
4759 * Status : UNTESTED
4760 *
4761 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4762 *****************************************************************************/
4763
4764UINT WIN32API GetKBCodePage(VOID)
4765{
4766 return (GetOEMCP());
4767}
4768
4769
4770/*****************************************************************************
4771 * Name : BOOL WIN32API GetKeyboardLayoutNameA
4772 * Purpose : The GetKeyboardLayoutName function retrieves the name of the
4773 * active keyboard layout.
4774 * Parameters: LPTSTR pwszKLID address of buffer for layout name
4775 * Variables :
4776 * Result : If the function succeeds, the return value is TRUE.
4777 * If the function fails, the return value is FALSE. To get extended
4778 * error information, call GetLastError.
4779 * Remark :
4780 * Status : UNTESTED STUB
4781 *
4782 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4783 *****************************************************************************/
4784
4785BOOL WIN32API GetKeyboardLayoutNameA(LPTSTR pwszKLID)
4786{
4787 dprintf(("USER32:GetKeyboardLayoutNameA (%08x) not implemented.",
4788 pwszKLID));
4789
4790 return(FALSE);
4791}
4792
4793
4794/*****************************************************************************
4795 * Name : BOOL WIN32API GetKeyboardLayoutNameW
4796 * Purpose : The GetKeyboardLayoutName function retrieves the name of the
4797 * active keyboard layout.
4798 * Parameters: LPTSTR pwszKLID address of buffer for layout name
4799 * Variables :
4800 * Result : If the function succeeds, the return value is TRUE.
4801 * If the function fails, the return value is FALSE. To get extended
4802 * error information, call GetLastError.
4803 * Remark :
4804 * Status : UNTESTED STUB
4805 *
4806 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4807 *****************************************************************************/
4808
4809BOOL WIN32API GetKeyboardLayoutNameW(LPWSTR pwszKLID)
4810{
4811 dprintf(("USER32:GetKeyboardLayoutNameW (%08x) not implemented.",
4812 pwszKLID));
4813
4814 return(FALSE);
4815}
4816
4817
4818
4819
4820/*****************************************************************************
4821 * Name : HWINSTA WIN32API GetProcessWindowStation
4822 * Purpose : The GetProcessWindowStation function returns a handle of the
4823 * window station associated with the calling process.
4824 * Parameters:
4825 * Variables :
4826 * Result : If the function succeeds, the return value is a handle of the
4827 * window station associated with the calling process.
4828 * If the function fails, the return value is NULL. This can occur
4829 * if the calling process is not an application written for Windows
4830 * NT. To get extended error information, call GetLastError.
4831 * Remark :
4832 * Status : UNTESTED STUB
4833 *
4834 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4835 *****************************************************************************/
4836
4837HWINSTA WIN32API GetProcessWindowStation(VOID)
4838{
4839 dprintf(("USER32:GetProcessWindowStation () not implemented.\n"));
4840
4841 return (NULL);
4842}
4843
4844
4845
4846/*****************************************************************************
4847 * Name : HDESK WIN32API GetThreadDesktop
4848 * Purpose : The GetThreadDesktop function returns a handle to the desktop
4849 * associated with a specified thread.
4850 * Parameters: DWORD dwThreadId thread identifier
4851 * Variables :
4852 * Result : If the function succeeds, the return value is the handle of the
4853 * desktop associated with the specified thread.
4854 * Remark :
4855 * Status : UNTESTED STUB
4856 *
4857 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4858 *****************************************************************************/
4859
4860HDESK WIN32API GetThreadDesktop(DWORD dwThreadId)
4861{
4862 dprintf(("USER32:GetThreadDesktop (%u) not implemented.\n",
4863 dwThreadId));
4864
4865 return (NULL);
4866}
4867
4868
4869/*****************************************************************************
4870 * Name : BOOL WIN32API GetUserObjectInformationA
4871 * Purpose : The GetUserObjectInformation function returns information about
4872 * a window station or desktop object.
4873 * Parameters: HANDLE hObj handle of object to get information for
4874 * int nIndex type of information to get
4875 * PVOID pvInfo points to buffer that receives the information
4876 * DWORD nLength size, in bytes, of pvInfo buffer
4877 * LPDWORD lpnLengthNeeded receives required size, in bytes, of pvInfo buffer
4878 * Variables :
4879 * Result : If the function succeeds, the return value is TRUE.
4880 * If the function fails, the return value is FALSE. To get extended
4881 * error information, call GetLastError.
4882 * Remark :
4883 * Status : UNTESTED STUB
4884 *
4885 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4886 *****************************************************************************/
4887
4888BOOL WIN32API GetUserObjectInformationA(HANDLE hObj,
4889 int nIndex,
4890 PVOID pvInfo,
4891 DWORD nLength,
4892 LPDWORD lpnLengthNeeded)
4893{
4894 dprintf(("USER32:GetUserObjectInformationA (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
4895 hObj,
4896 nIndex,
4897 pvInfo,
4898 nLength,
4899 lpnLengthNeeded));
4900
4901 return (FALSE);
4902}
4903
4904
4905/*****************************************************************************
4906 * Name : BOOL WIN32API GetUserObjectInformationW
4907 * Purpose : The GetUserObjectInformation function returns information about
4908 * a window station or desktop object.
4909 * Parameters: HANDLE hObj handle of object to get information for
4910 * int nIndex type of information to get
4911 * PVOID pvInfo points to buffer that receives the information
4912 * DWORD nLength size, in bytes, of pvInfo buffer
4913 * LPDWORD lpnLengthNeeded receives required size, in bytes, of pvInfo buffer
4914 * Variables :
4915 * Result : If the function succeeds, the return value is TRUE.
4916 * If the function fails, the return value is FALSE. To get extended
4917 * error information, call GetLastError.
4918 * Remark :
4919 * Status : UNTESTED STUB
4920 *
4921 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4922 *****************************************************************************/
4923
4924BOOL WIN32API GetUserObjectInformationW(HANDLE hObj,
4925 int nIndex,
4926 PVOID pvInfo,
4927 DWORD nLength,
4928 LPDWORD lpnLengthNeeded)
4929{
4930 dprintf(("USER32:GetUserObjectInformationW (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
4931 hObj,
4932 nIndex,
4933 pvInfo,
4934 nLength,
4935 lpnLengthNeeded));
4936
4937 return (FALSE);
4938}
4939
4940
4941/*****************************************************************************
4942 * Name : BOOL WIN32API GetUserObjectSecurity
4943 * Purpose : The GetUserObjectSecurity function retrieves security information
4944 * for the specified user object.
4945 * Parameters: HANDLE hObj handle of user object
4946 * SECURITY_INFORMATION * pSIRequested address of requested security information
4947 * LPSECURITY_DESCRIPTOR pSID address of security descriptor
4948 * DWORD nLength size of buffer for security descriptor
4949 * LPDWORD lpnLengthNeeded address of required size of buffer
4950 * Variables :
4951 * Result : If the function succeeds, the return value is TRUE.
4952 * If the function fails, the return value is FALSE. To get extended
4953 * error information, call GetLastError.
4954 * Remark :
4955 * Status : UNTESTED STUB
4956 *
4957 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4958 *****************************************************************************/
4959
4960BOOL WIN32API GetUserObjectSecurity(HANDLE hObj,
4961 SECURITY_INFORMATION * pSIRequested,
4962 LPSECURITY_DESCRIPTOR pSID,
4963 DWORD nLength,
4964 LPDWORD lpnLengthNeeded)
4965{
4966 dprintf(("USER32:GetUserObjectSecurity (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
4967 hObj,
4968 pSIRequested,
4969 pSID,
4970 nLength,
4971 lpnLengthNeeded));
4972
4973 return (FALSE);
4974}
4975
4976
4977
4978/*****************************************************************************
4979 * Name : int WIN32API GetWindowRgn
4980 * Purpose : The GetWindowRgn function obtains a copy of the window region of a window.
4981 * Parameters: HWND hWnd handle to window whose window region is to be obtained
4982 * HRGN hRgn handle to region that receives a copy of the window region
4983 * Variables :
4984 * Result : NULLREGION, SIMPLEREGION, COMPLEXREGION, ERROR
4985 * Remark :
4986 * Status : UNTESTED STUB
4987 *
4988 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4989 *****************************************************************************/
4990
4991int WIN32API GetWindowRgn (HWND hWnd,
4992 HRGN hRgn)
4993{
4994 dprintf(("USER32:GetWindowRgn (%08xh,%08x) not implemented.\n",
4995 hWnd,
4996 hRgn));
4997
4998 return (NULLREGION);
4999}
5000
5001
5002
5003/*****************************************************************************
5004 * Name : HCURSOR WIN32API LoadCursorFromFileA
5005 * Purpose : The LoadCursorFromFile function creates a cursor based on data
5006 * contained in a file. The file is specified by its name or by a
5007 * system cursor identifier. The function returns a handle to the
5008 * newly created cursor. Files containing cursor data may be in
5009 * either cursor (.CUR) or animated cursor (.ANI) format.
5010 * Parameters: LPCTSTR lpFileName pointer to cursor file, or system cursor id
5011 * Variables :
5012 * Result : If the function is successful, the return value is a handle to
5013 * the new cursor.
5014 * If the function fails, the return value is NULL. To get extended
5015 * error information, call GetLastError. GetLastError may return
5016 * the following
5017 * Remark :
5018 * Status : UNTESTED STUB
5019 *
5020 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5021 *****************************************************************************/
5022
5023HCURSOR WIN32API LoadCursorFromFileA(LPCTSTR lpFileName)
5024{
5025 dprintf(("USER32:LoadCursorFromFileA (%s) not implemented.\n",
5026 lpFileName));
5027
5028 return (NULL);
5029}
5030
5031
5032/*****************************************************************************
5033 * Name : HCURSOR WIN32API LoadCursorFromFileW
5034 * Purpose : The LoadCursorFromFile function creates a cursor based on data
5035 * contained in a file. The file is specified by its name or by a
5036 * system cursor identifier. The function returns a handle to the
5037 * newly created cursor. Files containing cursor data may be in
5038 * either cursor (.CUR) or animated cursor (.ANI) format.
5039 * Parameters: LPCTSTR lpFileName pointer to cursor file, or system cursor id
5040 * Variables :
5041 * Result : If the function is successful, the return value is a handle to
5042 * the new cursor.
5043 * If the function fails, the return value is NULL. To get extended
5044 * error information, call GetLastError. GetLastError may return
5045 * the following
5046 * Remark :
5047 * Status : UNTESTED STUB
5048 *
5049 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5050 *****************************************************************************/
5051
5052HCURSOR WIN32API LoadCursorFromFileW(LPCWSTR lpFileName)
5053{
5054 dprintf(("USER32:LoadCursorFromFileW (%s) not implemented.\n",
5055 lpFileName));
5056
5057 return (NULL);
5058}
5059
5060
5061/*****************************************************************************
5062 * Name : HLK WIN32API LoadKeyboardLayoutA
5063 * Purpose : The LoadKeyboardLayout function loads a new keyboard layout into
5064 * the system. Several keyboard layouts can be loaded at a time, but
5065 * only one per process is active at a time. Loading multiple keyboard
5066 * layouts makes it possible to rapidly switch between layouts.
5067 * Parameters:
5068 * Variables :
5069 * Result : If the function succeeds, the return value is the handle of the
5070 * keyboard layout.
5071 * If the function fails, the return value is NULL. To get extended
5072 * error information, call GetLastError.
5073 * Remark :
5074 * Status : UNTESTED STUB
5075 *
5076 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5077 *****************************************************************************/
5078
5079HKL WIN32API LoadKeyboardLayoutA(LPCTSTR pwszKLID,
5080 UINT Flags)
5081{
5082 dprintf(("USER32:LeadKeyboardLayoutA (%s,%u) not implemented.\n",
5083 pwszKLID,
5084 Flags));
5085
5086 return (NULL);
5087}
5088
5089
5090/*****************************************************************************
5091 * Name : HLK WIN32API LoadKeyboardLayoutW
5092 * Purpose : The LoadKeyboardLayout function loads a new keyboard layout into
5093 * the system. Several keyboard layouts can be loaded at a time, but
5094 * only one per process is active at a time. Loading multiple keyboard
5095 * layouts makes it possible to rapidly switch between layouts.
5096 * Parameters:
5097 * Variables :
5098 * Result : If the function succeeds, the return value is the handle of the
5099 * keyboard layout.
5100 * If the function fails, the return value is NULL. To get extended
5101 * error information, call GetLastError.
5102 * Remark :
5103 * Status : UNTESTED STUB
5104 *
5105 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5106 *****************************************************************************/
5107
5108HKL WIN32API LoadKeyboardLayoutW(LPCWSTR pwszKLID,
5109 UINT Flags)
5110{
5111 dprintf(("USER32:LeadKeyboardLayoutW (%s,%u) not implemented.\n",
5112 pwszKLID,
5113 Flags));
5114
5115 return (NULL);
5116}
5117
5118
5119/*****************************************************************************
5120 * Name : UINT WIN32API MapVirtualKeyExA
5121 * Purpose : The MapVirtualKeyEx function translates (maps) a virtual-key
5122 * code into a scan code or character value, or translates a scan
5123 * code into a virtual-key code. The function translates the codes
5124 * using the input language and physical keyboard layout identified
5125 * by the given keyboard layout handle.
5126 * Parameters:
5127 * Variables :
5128 * Result : The return value is either a scan code, a virtual-key code, or
5129 * a character value, depending on the value of uCode and uMapType.
5130 * If there is no translation, the return value is zero.
5131 * Remark :
5132 * Status : UNTESTED STUB
5133 *
5134 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5135 *****************************************************************************/
5136
5137UINT WIN32API MapVirtualKeyExA(UINT uCode,
5138 UINT uMapType,
5139 HKL dwhkl)
5140{
5141 dprintf(("USER32:MapVirtualKeyExA (%u,%u,%08x) not implemented.\n",
5142 uCode,
5143 uMapType,
5144 dwhkl));
5145
5146 return (0);
5147}
5148
5149
5150/*****************************************************************************
5151 * Name : UINT WIN32API MapVirtualKeyExW
5152 * Purpose : The MapVirtualKeyEx function translates (maps) a virtual-key
5153 * code into a scan code or character value, or translates a scan
5154 * code into a virtual-key code. The function translates the codes
5155 * using the input language and physical keyboard layout identified
5156 * by the given keyboard layout handle.
5157 * Parameters:
5158 * Variables :
5159 * Result : The return value is either a scan code, a virtual-key code, or
5160 * a character value, depending on the value of uCode and uMapType.
5161 * If there is no translation, the return value is zero.
5162 * Remark :
5163 * Status : UNTESTED STUB
5164 *
5165 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5166 *****************************************************************************/
5167
5168UINT WIN32API MapVirtualKeyExW(UINT uCode,
5169 UINT uMapType,
5170 HKL dwhkl)
5171{
5172 dprintf(("USER32:MapVirtualKeyExW (%u,%u,%08x) not implemented.\n",
5173 uCode,
5174 uMapType,
5175 dwhkl));
5176
5177 return (0);
5178}
5179
5180
5181/*****************************************************************************
5182 * Name : int WIN32API MessageBoxExA
5183 * Purpose : The MessageBoxEx function creates, displays, and operates a message box.
5184 * Parameters: HWND hWnd handle of owner window
5185 * LPCTSTR lpText address of text in message box
5186 * LPCTSTR lpCaption address of title of message box
5187 * UINT uType style of message box
5188 * WORD wLanguageId language identifier
5189 * Variables :
5190 * Result : If the function succeeds, the return value is a nonzero menu-item
5191 * value returned by the dialog box.
5192 * Remark :
5193 * Status : UNTESTED STUB
5194 *
5195 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5196 *****************************************************************************/
5197
5198int WIN32API MessageBoxExA(HWND hWnd,
5199 LPCTSTR lpText,
5200 LPCTSTR lpCaption,
5201 UINT uType,
5202 WORD wLanguageId)
5203{
5204 dprintf(("USER32:MessageBoxExA (%08xh,%s,%s,%u,%08w) not implemented.\n",
5205 hWnd,
5206 lpText,
5207 lpCaption,
5208 uType,
5209 wLanguageId));
5210
5211 return (MessageBoxA(hWnd,
5212 lpText,
5213 lpCaption,
5214 uType));
5215}
5216
5217
5218/*****************************************************************************
5219 * Name : int WIN32API MessageBoxExW
5220 * Purpose : The MessageBoxEx function creates, displays, and operates a message box.
5221 * Parameters: HWND hWnd handle of owner window
5222 * LPCTSTR lpText address of text in message box
5223 * LPCTSTR lpCaption address of title of message box
5224 * UINT uType style of message box
5225 * WORD wLanguageId language identifier
5226 * Variables :
5227 * Result : If the function succeeds, the return value is a nonzero menu-item
5228 * value returned by the dialog box.
5229 * Remark :
5230 * Status : UNTESTED STUB
5231 *
5232 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5233 *****************************************************************************/
5234
5235int WIN32API MessageBoxExW(HWND hWnd,
5236 LPCWSTR lpText,
5237 LPCWSTR lpCaption,
5238 UINT uType,
5239 WORD wLanguageId)
5240{
5241
5242 dprintf(("USER32:MessageBoxExW (%08xh,%x,%x,%u,%08w) not implemented.\n",
5243 hWnd,
5244 lpText,
5245 lpCaption,
5246 uType,
5247 wLanguageId));
5248
5249 return MessageBoxW(hWnd, lpText, lpCaption, uType);
5250}
5251
5252
5253/*****************************************************************************
5254 * Name : BOOL WIN32API MessageBoxIndirectW
5255 * Purpose : The MessageBoxIndirect function creates, displays, and operates
5256 * a message box. The message box contains application-defined
5257 * message text and title, any icon, and any combination of
5258 * predefined push buttons.
5259 * Parameters:
5260 * Variables :
5261 * Result :
5262 * Remark :
5263 * Status : UNTESTED STUB
5264 *
5265 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5266 *****************************************************************************/
5267
5268BOOL WIN32API MessageBoxIndirectW(LPMSGBOXPARAMSW lpMsgBoxParams)
5269{
5270 dprintf(("USER32:MessageBoxIndirectW (%08x) not implemented.\n",
5271 lpMsgBoxParams));
5272
5273 return (FALSE);
5274}
5275
5276
5277/*****************************************************************************
5278 * Name : BOOL WIN32API MessageBoxIndirectA
5279 * Purpose : The MessageBoxIndirect function creates, displays, and operates
5280 * a message box. The message box contains application-defined
5281 * message text and title, any icon, and any combination of
5282 * predefined push buttons.
5283 * Parameters:
5284 * Variables :
5285 * Result :
5286 * Remark :
5287 * Status : UNTESTED STUB
5288 *
5289 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5290 *****************************************************************************/
5291
5292BOOL WIN32API MessageBoxIndirectA(LPMSGBOXPARAMSA lpMsgBoxParams)
5293{
5294 dprintf(("USER32:MessageBoxIndirectA (%08x) not implemented.\n",
5295 lpMsgBoxParams));
5296
5297 return (FALSE);
5298}
5299
5300
5301/*****************************************************************************
5302 * Name : DWORD WIN32API OemKeyScan
5303 * Purpose : The OemKeyScan function maps OEM ASCII codes 0 through 0x0FF
5304 * into the OEM scan codes and shift states. The function provides
5305 * information that allows a program to send OEM text to another
5306 * program by simulating keyboard input.
5307 * Parameters:
5308 * Variables :
5309 * Result :
5310 * Remark :
5311 * Status : UNTESTED STUB
5312 *
5313 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5314 *****************************************************************************/
5315
5316DWORD WIN32API OemKeyScan(WORD wOemChar)
5317{
5318 dprintf(("USER32:OemKeyScan (%u) not implemented.\n",
5319 wOemChar));
5320
5321 return (wOemChar);
5322}
5323
5324
5325/*****************************************************************************
5326 * Name : HDESK WIN32API OpenDesktopA
5327 * Purpose : The OpenDesktop function returns a handle to an existing desktop.
5328 * A desktop is a secure object contained within a window station
5329 * object. A desktop has a logical display surface and contains
5330 * windows, menus and hooks.
5331 * Parameters: LPCTSTR lpszDesktopName name of the desktop to open
5332 * DWORD dwFlags flags to control interaction with other applications
5333 * BOOL fInherit specifies whether returned handle is inheritable
5334 * DWORD dwDesiredAccess specifies access of returned handle
5335 * Variables :
5336 * Result : If the function succeeds, the return value is the handle to the
5337 * opened desktop.
5338 * If the function fails, the return value is NULL. To get extended
5339 * error information, call GetLastError.
5340 * Remark :
5341 * Status : UNTESTED STUB
5342 *
5343 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5344 *****************************************************************************/
5345
5346HDESK WIN32API OpenDesktopA(LPCTSTR lpszDesktopName,
5347 DWORD dwFlags,
5348 BOOL fInherit,
5349 DWORD dwDesiredAccess)
5350{
5351 dprintf(("USER32:OpenDesktopA (%s,%08xh,%08xh,%08x) not implemented.\n",
5352 lpszDesktopName,
5353 dwFlags,
5354 fInherit,
5355 dwDesiredAccess));
5356
5357 return (NULL);
5358}
5359
5360
5361/*****************************************************************************
5362 * Name : HDESK WIN32API OpenDesktopW
5363 * Purpose : The OpenDesktop function returns a handle to an existing desktop.
5364 * A desktop is a secure object contained within a window station
5365 * object. A desktop has a logical display surface and contains
5366 * windows, menus and hooks.
5367 * Parameters: LPCTSTR lpszDesktopName name of the desktop to open
5368 * DWORD dwFlags flags to control interaction with other applications
5369 * BOOL fInherit specifies whether returned handle is inheritable
5370 * DWORD dwDesiredAccess specifies access of returned handle
5371 * Variables :
5372 * Result : If the function succeeds, the return value is the handle to the
5373 * opened desktop.
5374 * If the function fails, the return value is NULL. To get extended
5375 * error information, call GetLastError.
5376 * Remark :
5377 * Status : UNTESTED STUB
5378 *
5379 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5380 *****************************************************************************/
5381
5382HDESK WIN32API OpenDesktopW(LPCTSTR lpszDesktopName,
5383 DWORD dwFlags,
5384 BOOL fInherit,
5385 DWORD dwDesiredAccess)
5386{
5387 dprintf(("USER32:OpenDesktopW (%s,%08xh,%08xh,%08x) not implemented.\n",
5388 lpszDesktopName,
5389 dwFlags,
5390 fInherit,
5391 dwDesiredAccess));
5392
5393 return (NULL);
5394}
5395
5396
5397/*****************************************************************************
5398 * Name : HDESK WIN32API OpenInputDesktop
5399 * Purpose : The OpenInputDesktop function returns a handle to the desktop
5400 * that receives user input. The input desktop is a desktop on the
5401 * window station associated with the logged-on user.
5402 * Parameters: DWORD dwFlags flags to control interaction with other applications
5403 * BOOL fInherit specifies whether returned handle is inheritable
5404 * DWORD dwDesiredAccess specifies access of returned handle
5405 * Variables :
5406 * Result : If the function succeeds, the return value is a handle of the
5407 * desktop that receives user input.
5408 * If the function fails, the return value is NULL. To get extended
5409 * error information, call GetLastError.
5410 * Remark :
5411 * Status : UNTESTED STUB
5412 *
5413 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5414 *****************************************************************************/
5415
5416HDESK WIN32API OpenInputDesktop(DWORD dwFlags,
5417 BOOL fInherit,
5418 DWORD dwDesiredAccess)
5419{
5420 dprintf(("USER32:OpenInputDesktop (%08xh,%08xh,%08x) not implemented.\n",
5421 dwFlags,
5422 fInherit,
5423 dwDesiredAccess));
5424
5425 return (NULL);
5426}
5427
5428
5429/*****************************************************************************
5430 * Name : HWINSTA WIN32API OpenWindowStationA
5431 * Purpose : The OpenWindowStation function returns a handle to an existing
5432 * window station.
5433 * Parameters: LPCTSTR lpszWinStaName name of the window station to open
5434 * BOOL fInherit specifies whether returned handle is inheritable
5435 * DWORD dwDesiredAccess specifies access of returned handle
5436 * Variables :
5437 * Result : If the function succeeds, the return value is the handle to the
5438 * specified window station.
5439 * If the function fails, the return value is NULL. To get extended
5440 * error information, call GetLastError.
5441 * Remark :
5442 * Status : UNTESTED STUB
5443 *
5444 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5445 *****************************************************************************/
5446
5447HWINSTA WIN32API OpenWindowStationA(LPCTSTR lpszWinStaName,
5448 BOOL fInherit,
5449 DWORD dwDesiredAccess)
5450{
5451 dprintf(("USER32:OpenWindowStatieonA (%s,%08xh,%08x) not implemented.\n",
5452 lpszWinStaName,
5453 fInherit,
5454 dwDesiredAccess));
5455
5456 return (NULL);
5457}
5458
5459
5460/*****************************************************************************
5461 * Name : HWINSTA WIN32API OpenWindowStationW
5462 * Purpose : The OpenWindowStation function returns a handle to an existing
5463 * window station.
5464 * Parameters: LPCTSTR lpszWinStaName name of the window station to open
5465 * BOOL fInherit specifies whether returned handle is inheritable
5466 * DWORD dwDesiredAccess specifies access of returned handle
5467 * Variables :
5468 * Result : If the function succeeds, the return value is the handle to the
5469 * specified window station.
5470 * If the function fails, the return value is NULL. To get extended
5471 * error information, call GetLastError.
5472
5473 * Remark :
5474 * Status : UNTESTED STUB
5475 *
5476 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5477 *****************************************************************************/
5478
5479HWINSTA WIN32API OpenWindowStationW(LPCTSTR lpszWinStaName,
5480 BOOL fInherit,
5481 DWORD dwDesiredAccess)
5482{
5483 dprintf(("USER32:OpenWindowStatieonW (%s,%08xh,%08x) not implemented.\n",
5484 lpszWinStaName,
5485 fInherit,
5486 dwDesiredAccess));
5487
5488 return (NULL);
5489}
5490
5491
5492/*****************************************************************************
5493 * Name : BOOL WIN32API PaintDesktop
5494 * Purpose : The PaintDesktop function fills the clipping region in the
5495 * specified device context with the desktop pattern or wallpaper.
5496 * The function is provided primarily for shell desktops.
5497 * Parameters:
5498 * Variables :
5499 * Result : If the function succeeds, the return value is TRUE.
5500 * If the function fails, 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 PaintDesktop(HDC hdc)
5508{
5509 dprintf(("USER32:PaintDesktop (%08x) not implemented.\n",
5510 hdc));
5511
5512 return (FALSE);
5513}
5514
5515
5516/*****************************************************************************
5517 * Name : BOOL WIN32API SendMessageCallbackA
5518 * Purpose : The SendMessageCallback function sends the specified message to
5519 * a window or windows. The function calls the window procedure for
5520 * the specified window and returns immediately. After the window
5521 * procedure processes the message, the system calls the specified
5522 * callback function, passing the result of the message processing
5523 * and an application-defined value to the callback function.
5524 * Parameters: HWND hwnd handle of destination window
5525 * UINT uMsg message to send
5526 * WPARAM wParam first message parameter
5527 * LPARAM lParam second message parameter
5528 * SENDASYNCPROC lpResultCallBack function to receive message value
5529 * DWORD dwData value to pass to callback function
5530 * Variables :
5531 * Result : If the function succeeds, the return value is TRUE.
5532 * If the function fails, the return value is FALSE. To get extended
5533 * error information, call GetLastError.
5534 * Remark :
5535 * Status : UNTESTED STUB
5536 *
5537 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5538 *****************************************************************************/
5539
5540BOOL WIN32API SendMessageCallbackA(HWND hWnd,
5541 UINT uMsg,
5542 WPARAM wParam,
5543 LPARAM lParam,
5544 SENDASYNCPROC lpResultCallBack,
5545 DWORD dwData)
5546{
5547 dprintf(("USER32:SendMessageCallBackA (%08xh,%08xh,%08xh,%08xh,%08xh,%08x) not implemented.\n",
5548 hWnd,
5549 uMsg,
5550 wParam,
5551 lParam,
5552 lpResultCallBack,
5553 dwData));
5554
5555 return (FALSE);
5556}
5557
5558
5559/*****************************************************************************
5560 * Name : BOOL WIN32API SendMessageCallbackW
5561 * Purpose : The SendMessageCallback function sends the specified message to
5562 * a window or windows. The function calls the window procedure for
5563 * the specified window and returns immediately. After the window
5564 * procedure processes the message, the system calls the specified
5565 * callback function, passing the result of the message processing
5566 * and an application-defined value to the callback function.
5567 * Parameters: HWND hwnd handle of destination window
5568 * UINT uMsg message to send
5569 * WPARAM wParam first message parameter
5570 * LPARAM lParam second message parameter
5571 * SENDASYNCPROC lpResultCallBack function to receive message value
5572 * DWORD dwData value to pass to callback function
5573 * Variables :
5574 * Result : If the function succeeds, the return value is TRUE.
5575 * If the function fails, the return value is FALSE. To get extended
5576 * error information, call GetLastError.
5577 * Remark :
5578 * Status : UNTESTED STUB
5579 *
5580 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5581 *****************************************************************************/
5582
5583BOOL WIN32API SendMessageCallbackW(HWND hWnd,
5584 UINT uMsg,
5585 WPARAM wParam,
5586 LPARAM lParam,
5587 SENDASYNCPROC lpResultCallBack,
5588 DWORD dwData)
5589{
5590 dprintf(("USER32:SendMessageCallBackW (%08xh,%08xh,%08xh,%08xh,%08xh,%08x) not implemented.\n",
5591 hWnd,
5592 uMsg,
5593 wParam,
5594 lParam,
5595 lpResultCallBack,
5596 dwData));
5597
5598 return (FALSE);
5599}
5600
5601
5602/*****************************************************************************
5603 * Name : VOID WIN32API SetDebugErrorLevel
5604 * Purpose : The SetDebugErrorLevel function sets the minimum error level at
5605 * which Windows will generate debugging events and pass them to a debugger.
5606 * Parameters: DWORD dwLevel debugging error level
5607 * Variables :
5608 * Result :
5609 * Remark :
5610 * Status : UNTESTED STUB
5611 *
5612 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5613 *****************************************************************************/
5614
5615VOID WIN32API SetDebugErrorLevel(DWORD dwLevel)
5616{
5617 dprintf(("USER32:SetDebugErrorLevel (%08x) not implemented.\n",
5618 dwLevel));
5619}
5620
5621
5622/*****************************************************************************
5623 * Name : BOOL WIN32API SetProcessWindowStation
5624 * Purpose : The SetProcessWindowStation function assigns a window station
5625 * to the calling process. This enables the process to access
5626 * objects in the window station such as desktops, the clipboard,
5627 * and global atoms. All subsequent operations on the window station
5628 * use the access rights granted to hWinSta.
5629 * Parameters:
5630 * Variables :
5631 * Result : If the function succeeds, the return value is TRUE.
5632 * If the function fails, the return value is FALSE. To get extended
5633 * error information, call GetLastError.
5634 * Remark :
5635 * Status : UNTESTED STUB
5636 *
5637 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5638 *****************************************************************************/
5639
5640BOOL WIN32API SetProcessWindowStation(HWINSTA hWinSta)
5641{
5642 dprintf(("USER32:SetProcessWindowStation (%08x) not implemented.\n",
5643 hWinSta));
5644
5645 return (FALSE);
5646}
5647
5648
5649/*****************************************************************************
5650 * Name : BOOL WIN32API SetSystemCursor
5651 * Purpose : The SetSystemCursor function replaces the contents of the system
5652 * cursor specified by dwCursorId with the contents of the cursor
5653 * specified by hCursor, and then destroys hCursor. This function
5654 * lets an application customize the system cursors.
5655 * Parameters: HCURSOR hCursor set specified system cursor to this cursor's
5656 * contents, then destroy this
5657 * DWORD dwCursorID system cursor specified by its identifier
5658 * Variables :
5659 * Result : If the function succeeds, the return value is TRUE.
5660 * If the function fails, the return value is FALSE. To get extended
5661 * error information, call GetLastError.
5662 * Remark :
5663 * Status : UNTESTED STUB
5664 *
5665 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5666 *****************************************************************************/
5667
5668BOOL WIN32API SetSystemCursor(HCURSOR hCursor,
5669 DWORD dwCursorId)
5670{
5671 dprintf(("USER32:SetSystemCursor (%08xh,%08x) not implemented.\n",
5672 hCursor,
5673 dwCursorId));
5674
5675 return (FALSE);
5676}
5677
5678
5679/*****************************************************************************
5680 * Name : BOOL WIN32API SetThreadDesktop
5681 * Purpose : The SetThreadDesktop function assigns a desktop to the calling
5682 * thread. All subsequent operations on the desktop use the access
5683 * rights granted to hDesk.
5684 * Parameters: HDESK hDesk handle of the desktop to assign to this thread
5685 * Variables :
5686 * Result : If the function succeeds, the return value is TRUE.
5687 * If the function fails, the return value is FALSE. To get extended
5688 * error information, call GetLastError.
5689 * Remark :
5690 * Status : UNTESTED STUB
5691 *
5692 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5693 *****************************************************************************/
5694
5695BOOL WIN32API SetThreadDesktop(HDESK hDesktop)
5696{
5697 dprintf(("USER32:SetThreadDesktop (%08x) not implemented.\n",
5698 hDesktop));
5699
5700 return (FALSE);
5701}
5702
5703
5704/*****************************************************************************
5705 * Name : BOOL WIN32API SetUserObjectInformationA
5706 * Purpose : The SetUserObjectInformation function sets information about a
5707 * window station or desktop object.
5708 * Parameters: HANDLE hObject handle of the object for which to set information
5709 * int nIndex type of information to set
5710 * PVOID lpvInfo points to a buffer that contains the information
5711 * DWORD cbInfo size, in bytes, of lpvInfo buffer
5712 * Variables :
5713 * Result : If the function succeeds, the return value is TRUE.
5714 * If the function fails the return value is FALSE. To get extended
5715 * error information, call GetLastError.
5716 * Remark :
5717 * Status : UNTESTED STUB
5718 *
5719 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5720 *****************************************************************************/
5721
5722BOOL WIN32API SetUserObjectInformationA(HANDLE hObject,
5723 int nIndex,
5724 PVOID lpvInfo,
5725 DWORD cbInfo)
5726{
5727 dprintf(("USER32:SetUserObjectInformationA (%08xh,%u,%08xh,%08x) not implemented.\n",
5728 hObject,
5729 nIndex,
5730 lpvInfo,
5731 cbInfo));
5732
5733 return (FALSE);
5734}
5735
5736
5737/*****************************************************************************
5738 * Name : BOOL WIN32API SetUserObjectInformationW
5739 * Purpose : The SetUserObjectInformation function sets information about a
5740 * window station or desktop object.
5741 * Parameters: HANDLE hObject handle of the object for which to set information
5742 * int nIndex type of information to set
5743 * PVOID lpvInfo points to a buffer that contains the information
5744 * DWORD cbInfo size, in bytes, of lpvInfo buffer
5745 * Variables :
5746 * Result : If the function succeeds, the return value is TRUE.
5747 * If the function fails the return value is FALSE. To get extended
5748 * error information, call GetLastError.
5749 * Remark :
5750 * Status : UNTESTED STUB
5751 *
5752 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5753 *****************************************************************************/
5754
5755BOOL WIN32API SetUserObjectInformationW(HANDLE hObject,
5756 int nIndex,
5757 PVOID lpvInfo,
5758 DWORD cbInfo)
5759{
5760 dprintf(("USER32:SetUserObjectInformationW (%08xh,%u,%08xh,%08x) not implemented.\n",
5761 hObject,
5762 nIndex,
5763 lpvInfo,
5764 cbInfo));
5765
5766 return (FALSE);
5767}
5768
5769
5770/*****************************************************************************
5771 * Name : BOOL WIN32API SetUserObjectSecurity
5772 * Purpose : The SetUserObjectSecurity function sets the security of a user
5773 * object. This can be, for example, a window or a DDE conversation
5774 * Parameters: HANDLE hObject handle of user object
5775 * SECURITY_INFORMATION * psi address of security information
5776 * LPSECURITY_DESCRIPTOR psd address of security descriptor
5777 * Variables :
5778 * Result : If the function succeeds, the return value is TRUE.
5779 * If the function fails, the return value is FALSE. To get extended
5780 * error information, call GetLastError.
5781 * Remark :
5782 * Status : UNTESTED STUB
5783 *
5784 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5785 *****************************************************************************/
5786
5787BOOL WIN32API SetUserObjectSecurity(HANDLE hObject,
5788 SECURITY_INFORMATION * psi,
5789 LPSECURITY_DESCRIPTOR psd)
5790{
5791 dprintf(("USER32:SetUserObjectSecuroty (%08xh,%08xh,%08x) not implemented.\n",
5792 hObject,
5793 psi,
5794 psd));
5795
5796 return (FALSE);
5797}
5798
5799
5800/*****************************************************************************
5801 * Name : int WIN32API SetWindowRgn
5802 * Purpose : The SetWindowRgn function sets the window region of a window. The
5803 * window region determines the area within the window where the
5804 * operating system permits drawing. The operating system does not
5805 * display any portion of a window that lies outside of the window region
5806 * Parameters: HWND hWnd handle to window whose window region is to be set
5807 * HRGN hRgn handle to region
5808 * BOOL bRedraw window redraw flag
5809 * Variables :
5810 * Result : If the function succeeds, the return value is non-zero.
5811 * If the function fails, the return value is zero.
5812 * Remark :
5813 * Status : UNTESTED STUB
5814 *
5815 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5816 *****************************************************************************/
5817
5818int WIN32API SetWindowRgn(HWND hWnd,
5819 HRGN hRgn,
5820 BOOL bRedraw)
5821{
5822 dprintf(("USER32:SetWindowRgn (%08xh,%08xh,%u) not implemented.\n",
5823 hWnd,
5824 hRgn,
5825 bRedraw));
5826
5827 return (0);
5828}
5829
5830
5831/*****************************************************************************
5832 * Name : BOOL WIN32API SetWindowsHookW
5833 * Purpose : The SetWindowsHook function is not implemented in the Win32 API.
5834 * Win32-based applications should use the SetWindowsHookEx function.
5835 * Parameters:
5836 * Variables :
5837 * Result :
5838 * Remark : ARGH ! MICROSOFT !
5839 * Status : UNTESTED STUB
5840 *
5841 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5842 *****************************************************************************/
5843
5844HHOOK WIN32API SetWindowsHookW(int nFilterType, HOOKPROC pfnFilterProc)
5845
5846{
5847 return (FALSE);
5848}
5849
5850
5851/*****************************************************************************
5852 * Name : BOOL WIN32API ShowWindowAsync
5853 * Purpose : The ShowWindowAsync function sets the show state of a window
5854 * created by a different thread.
5855 * Parameters: HWND hwnd handle of window
5856 * int nCmdShow show state of window
5857 * Variables :
5858 * Result : If the window was previously visible, the return value is TRUE.
5859 * If the window was previously hidden, the return value is FALSE.
5860 * Remark :
5861 * Status : UNTESTED STUB
5862 *
5863 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5864 *****************************************************************************/
5865
5866BOOL WIN32API ShowWindowAsync (HWND hWnd,
5867 int nCmdShow)
5868{
5869 dprintf(("USER32:ShowWindowAsync (%08xh,%08x) not implemented.\n",
5870 hWnd,
5871 nCmdShow));
5872
5873 return (FALSE);
5874}
5875
5876
5877/*****************************************************************************
5878 * Name : BOOL WIN32API SwitchDesktop
5879 * Purpose : The SwitchDesktop function makes a desktop visible and activates
5880 * it. This enables the desktop to receive input from the user. The
5881 * calling process must have DESKTOP_SWITCHDESKTOP access to the
5882 * desktop for the SwitchDesktop function to succeed.
5883 * Parameters:
5884 * Variables :
5885 * Result : If the function succeeds, the return value is TRUE.
5886 * If the function fails, the return value is FALSE. To get extended
5887 * error information, call GetLastError.
5888 * Remark :
5889 * Status : UNTESTED STUB
5890 *
5891 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5892 *****************************************************************************/
5893
5894BOOL WIN32API SwitchDesktop(HDESK hDesktop)
5895{
5896 dprintf(("USER32:SwitchDesktop (%08x) not implemented.\n",
5897 hDesktop));
5898
5899 return (FALSE);
5900}
5901
5902
5903/*****************************************************************************
5904 * Name : WORD WIN32API TileWindows
5905 * Purpose : The TileWindows function tiles the specified windows, or the child
5906 * windows of the specified parent window.
5907 * Parameters: HWND hwndParent handle of parent window
5908 * WORD wFlags types of windows not to arrange
5909 * LPCRECT lpRect rectangle to arrange windows in
5910 * WORD cChildrenb number of windows to arrange
5911 * const HWND *ahwndChildren array of window handles
5912 * Variables :
5913 * Result : If the function succeeds, the return value is the number of
5914 * windows arranged.
5915 * If the function fails, the return value is zero.
5916 * Remark :
5917 * Status : UNTESTED STUB
5918 *
5919 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5920 *****************************************************************************/
5921
5922WORD WIN32API TileWindows(HWND hwndParent,
5923 UINT wFlags,
5924 const LPRECT lpRect,
5925 UINT cChildrenb,
5926 const HWND *ahwndChildren)
5927{
5928 dprintf(("USER32:TileWindows (%08xh,%08xh,%08xh,%08xh,%08x) not implemented.\n",
5929 hwndParent,
5930 wFlags,
5931 lpRect,
5932 cChildrenb,
5933 ahwndChildren));
5934
5935 return (0);
5936}
5937
5938
5939/*****************************************************************************
5940 * Name : int WIN32API ToAscii
5941 * Purpose : The ToAscii function translates the specified virtual-key code
5942 * and keyboard state to the corresponding Windows character or characters.
5943 * Parameters: UINT uVirtKey virtual-key code
5944 * UINT uScanCode scan code
5945 * PBYTE lpbKeyState address of key-state array
5946 * LPWORD lpwTransKey buffer for translated key
5947 * UINT fuState active-menu flag
5948 * Variables :
5949 * Result : 0 The specified virtual key has no translation for the current
5950 * state of the keyboard.
5951 * 1 One Windows character was copied to the buffer.
5952 * 2 Two characters were copied to the buffer. This usually happens
5953 * when a dead-key character (accent or diacritic) stored in the
5954 * keyboard layout cannot be composed with the specified virtual
5955 * key to form a single character.
5956 * Remark :
5957 * Status : UNTESTED STUB
5958 *
5959 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5960 *****************************************************************************/
5961
5962int WIN32API ToAscii(UINT uVirtKey,
5963 UINT uScanCode,
5964 PBYTE lpbKeyState,
5965 LPWORD lpwTransKey,
5966 UINT fuState)
5967{
5968 dprintf(("USER32:ToAscii (%u,%u,%08xh,%08xh,%u) not implemented.\n",
5969 uVirtKey,
5970 uScanCode,
5971 lpbKeyState,
5972 lpwTransKey,
5973 fuState));
5974
5975 return (0);
5976}
5977
5978
5979/*****************************************************************************
5980 * Name : int WIN32API ToAsciiEx
5981 * Purpose : The ToAscii function translates the specified virtual-key code
5982 * and keyboard state to the corresponding Windows character or characters.
5983 * Parameters: UINT uVirtKey virtual-key code
5984 * UINT uScanCode scan code
5985 * PBYTE lpbKeyState address of key-state array
5986 * LPWORD lpwTransKey buffer for translated key
5987 * UINT fuState active-menu flag
5988 * HLK hlk keyboard layout handle
5989 * Variables :
5990 * Result : 0 The specified virtual key has no translation for the current
5991 * state of the keyboard.
5992 * 1 One Windows character was copied to the buffer.
5993 * 2 Two characters were copied to the buffer. This usually happens
5994 * when a dead-key character (accent or diacritic) stored in the
5995 * keyboard layout cannot be composed with the specified virtual
5996 * key to form a single character.
5997 * Remark :
5998 * Status : UNTESTED STUB
5999 *
6000 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
6001 *****************************************************************************/
6002
6003int WIN32API ToAsciiEx(UINT uVirtKey,
6004 UINT uScanCode,
6005 PBYTE lpbKeyState,
6006 LPWORD lpwTransKey,
6007 UINT fuState,
6008 HKL hkl)
6009{
6010 dprintf(("USER32:ToAsciiEx (%u,%u,%08xh,%08xh,%u,%08x) not implemented.\n",
6011 uVirtKey,
6012 uScanCode,
6013 lpbKeyState,
6014 lpwTransKey,
6015 fuState,
6016 hkl));
6017
6018 return (0);
6019}
6020
6021
6022/*****************************************************************************
6023 * Name : int WIN32API ToUnicode
6024 * Purpose : The ToUnicode function translates the specified virtual-key code
6025 * and keyboard state to the corresponding Unicode character or characters.
6026 * Parameters: UINT wVirtKey virtual-key code
6027 * UINT wScanCode scan code
6028 * PBYTE lpKeyState address of key-state array
6029 * LPWSTR pwszBuff buffer for translated key
6030 * int cchBuff size of translated key buffer
6031 * UINT wFlags set of function-conditioning flags
6032 * Variables :
6033 * Result : - 1 The specified virtual key is a dead-key character (accent or
6034 * diacritic). This value is returned regardless of the keyboard
6035 * layout, even if several characters have been typed and are
6036 * stored in the keyboard state. If possible, even with Unicode
6037 * keyboard layouts, the function has written a spacing version of
6038 * the dead-key character to the buffer specified by pwszBuffer.
6039 * For example, the function writes the character SPACING ACUTE
6040 * (0x00B4), rather than the character NON_SPACING ACUTE (0x0301).
6041 * 0 The specified virtual key has no translation for the current
6042 * state of the keyboard. Nothing was written to the buffer
6043 * specified by pwszBuffer.
6044 * 1 One character was written to the buffer specified by pwszBuffer.
6045 * 2 or more Two or more characters were written to the buffer specified by
6046 * pwszBuff. The most common cause for this is that a dead-key
6047 * character (accent or diacritic) stored in the keyboard layout
6048 * could not be combined with the specified virtual key to form a
6049 * single character.
6050 * Remark :
6051 * Status : UNTESTED STUB
6052 *
6053 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
6054 *****************************************************************************/
6055
6056int WIN32API ToUnicode(UINT uVirtKey,
6057 UINT uScanCode,
6058 PBYTE lpKeyState,
6059 LPWSTR pwszBuff,
6060 int cchBuff,
6061 UINT wFlags)
6062{
6063 dprintf(("USER32:ToUnicode (%u,%u,%08xh,%08xh,%u,%08x) not implemented.\n",
6064 uVirtKey,
6065 uScanCode,
6066 lpKeyState,
6067 pwszBuff,
6068 cchBuff,
6069 wFlags));
6070
6071 return (0);
6072}
6073
6074
6075/*****************************************************************************
6076 * Name : BOOL WIN32API UnloadKeyboardLayout
6077 * Purpose : The UnloadKeyboardLayout function removes a keyboard layout.
6078 * Parameters: HKL hkl handle of keyboard layout
6079 * Variables :
6080 * Result : If the function succeeds, the return value is the handle of the
6081 * keyboard layout; otherwise, it is NULL. To get extended error
6082 * information, use the GetLastError function.
6083 * Remark :
6084 * Status : UNTESTED STUB
6085 *
6086 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
6087 *****************************************************************************/
6088
6089BOOL WIN32API UnloadKeyboardLayout (HKL hkl)
6090{
6091 dprintf(("USER32:UnloadKeyboardLayout (%08x) not implemented.\n",
6092 hkl));
6093
6094 return (0);
6095}
6096
6097
6098/*****************************************************************************
6099 * Name : SHORT WIN32API VkKeyScanExW
6100 * Purpose : The VkKeyScanEx function translates a character to the
6101 * corresponding virtual-key code and shift state. The function
6102 * translates the character using the input language and physical
6103 * keyboard layout identified by the given keyboard layout handle.
6104 * Parameters: UINT uChar character to translate
6105 * HKL hkl keyboard layout handle
6106 * Variables :
6107 * Result : see docs
6108 * Remark :
6109 * Status : UNTESTED STUB
6110 *
6111 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
6112 *****************************************************************************/
6113
6114WORD WIN32API VkKeyScanExW(WCHAR uChar,
6115 HKL hkl)
6116{
6117 dprintf(("USER32:VkKeyScanExW (%u,%08x) not implemented.\n",
6118 uChar,
6119 hkl));
6120
6121 return (uChar);
6122}
6123
6124
6125/*****************************************************************************
6126 * Name : SHORT WIN32API VkKeyScanExA
6127 * Purpose : The VkKeyScanEx function translates a character to the
6128 * corresponding virtual-key code and shift state. The function
6129 * translates the character using the input language and physical
6130 * keyboard layout identified by the given keyboard layout handle.
6131 * Parameters: UINT uChar character to translate
6132 * HKL hkl keyboard layout handle
6133 * Variables :
6134 * Result : see docs
6135 * Remark :
6136 * Status : UNTESTED STUB
6137 *
6138 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
6139 *****************************************************************************/
6140
6141WORD WIN32API VkKeyScanExA(CHAR uChar,
6142 HKL hkl)
6143{
6144 dprintf(("USER32:VkKeyScanExA (%u,%08x) not implemented.\n",
6145 uChar,
6146 hkl));
6147
6148 return (uChar);
6149}
6150
6151
6152/*****************************************************************************
6153 * Name : VOID WIN32API keybd_event
6154 * Purpose : The keybd_event function synthesizes a keystroke. The system
6155 * can use such a synthesized keystroke to generate a WM_KEYUP or
6156 * WM_KEYDOWN message. The keyboard driver's interrupt handler calls
6157 * the keybd_event function.
6158 * Parameters: BYTE bVk virtual-key code
6159
6160 * BYTE bScan hardware scan code
6161 * DWORD dwFlags flags specifying various function options
6162 * DWORD dwExtraInfo additional data associated with keystroke
6163 * Variables :
6164 * Result :
6165 * Remark :
6166 * Status : UNTESTED STUB
6167 *
6168 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
6169 *****************************************************************************/
6170
6171VOID WIN32API keybd_event (BYTE bVk,
6172 BYTE bScan,
6173 DWORD dwFlags,
6174 DWORD dwExtraInfo)
6175{
6176 dprintf(("USER32:keybd_event (%u,%u,%08xh,%08x) not implemented.\n",
6177 bVk,
6178 bScan,
6179 dwFlags,
6180 dwExtraInfo));
6181}
6182
6183
6184/*****************************************************************************
6185 * Name : VOID WIN32API mouse_event
6186 * Purpose : The mouse_event function synthesizes mouse motion and button clicks.
6187 * Parameters: DWORD dwFlags flags specifying various motion/click variants
6188 * DWORD dx horizontal mouse position or position change
6189 * DWORD dy vertical mouse position or position change
6190 * DWORD cButtons unused, reserved for future use, set to zero
6191 * DWORD dwExtraInfo 32 bits of application-defined information
6192 * Variables :
6193 * Result :
6194 * Remark :
6195 * Status : UNTESTED STUB
6196 *
6197 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
6198 *****************************************************************************/
6199
6200VOID WIN32API mouse_event(DWORD dwFlags,
6201 DWORD dx,
6202 DWORD dy,
6203 DWORD cButtons,
6204 DWORD dwExtraInfo)
6205{
6206 dprintf(("USER32:mouse_event (%08xh,%u,%u,%u,%08x) not implemented.\n",
6207 dwFlags,
6208 dx,
6209 dy,
6210 cButtons,
6211 dwExtraInfo));
6212}
6213
6214
6215/*****************************************************************************
6216 * Name : BOOL WIN32API SetShellWindow
6217 * Purpose : Unknown
6218 * Parameters: Unknown
6219 * Variables :
6220 * Result :
6221 * Remark :
6222 * Status : UNTESTED UNKNOWN STUB
6223 *
6224 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6225 *****************************************************************************/
6226
6227BOOL WIN32API SetShellWindow(DWORD x1)
6228{
6229 dprintf(("USER32: SetShellWindow(%08x) not implemented.\n",
6230 x1));
6231
6232 return (FALSE); /* default */
6233}
6234
6235
6236/*****************************************************************************
6237 * Name : BOOL WIN32API PlaySoundEvent
6238 * Purpose : Unknown
6239 * Parameters: Unknown
6240 * Variables :
6241 * Result :
6242 * Remark :
6243 * Status : UNTESTED UNKNOWN STUB
6244 *
6245 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6246 *****************************************************************************/
6247
6248BOOL WIN32API PlaySoundEvent(DWORD x1)
6249{
6250 dprintf(("USER32: PlaySoundEvent(%08x) not implemented.\n",
6251 x1));
6252
6253 return (FALSE); /* default */
6254}
6255
6256
6257/*****************************************************************************
6258 * Name : BOOL WIN32API TileChildWindows
6259 * Purpose : Unknown
6260 * Parameters: Unknown
6261 * Variables :
6262 * Result :
6263 * Remark :
6264 * Status : UNTESTED UNKNOWN STUB
6265 *
6266 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6267 *****************************************************************************/
6268
6269BOOL WIN32API TileChildWindows(DWORD x1,
6270 DWORD x2)
6271{
6272 dprintf(("USER32: TileChildWindows(%08xh,%08xh) not implemented.\n",
6273 x1,
6274 x2));
6275
6276 return (FALSE); /* default */
6277}
6278
6279
6280/*****************************************************************************
6281 * Name : BOOL WIN32API SetSysColorsTemp
6282 * Purpose : Unknown
6283 * Parameters: Unknown
6284 * Variables :
6285 * Result :
6286 * Remark :
6287 * Status : UNTESTED UNKNOWN STUB
6288 *
6289 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6290 *****************************************************************************/
6291
6292BOOL WIN32API SetSysColorsTemp(void)
6293{
6294 dprintf(("USER32: SetSysColorsTemp() not implemented.\n"));
6295
6296 return (FALSE); /* default */
6297}
6298
6299
6300/*****************************************************************************
6301 * Name : BOOL WIN32API RegisterNetworkCapabilities
6302 * Purpose : Unknown
6303 * Parameters: Unknown
6304 * Variables :
6305 * Result :
6306 * Remark :
6307 * Status : UNTESTED UNKNOWN STUB
6308 *
6309 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6310 *****************************************************************************/
6311
6312BOOL WIN32API RegisterNetworkCapabilities(DWORD x1,
6313 DWORD x2)
6314{
6315 dprintf(("USER32: RegisterNetworkCapabilities(%08xh,%08xh) not implemented.\n",
6316 x1,
6317 x2));
6318
6319 return (FALSE); /* default */
6320}
6321
6322
6323/*****************************************************************************
6324 * Name : BOOL WIN32API EndTask
6325 * Purpose : Unknown
6326 * Parameters: Unknown
6327 * Variables :
6328 * Result :
6329 * Remark :
6330 * Status : UNTESTED UNKNOWN STUB
6331 *
6332 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6333 *****************************************************************************/
6334
6335BOOL WIN32API EndTask(DWORD x1,
6336 DWORD x2,
6337 DWORD x3)
6338{
6339 dprintf(("USER32: EndTask(%08xh,%08xh,%08xh) not implemented.\n",
6340 x1,
6341 x2,
6342 x3));
6343
6344 return (FALSE); /* default */
6345}
6346
6347
6348/*****************************************************************************
6349 * Name : BOOL WIN32API SwitchToThisWindow
6350 * Purpose : Unknown
6351 * Parameters: Unknown
6352 * Variables :
6353 * Result :
6354 * Remark :
6355 * Status : UNTESTED UNKNOWN STUB
6356 *
6357 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6358 *****************************************************************************/
6359
6360BOOL WIN32API SwitchToThisWindow(HWND hwnd,
6361 BOOL x2)
6362{
6363 dprintf(("USER32: SwitchToThisWindow(%08xh,%08xh) not implemented.\n",
6364 hwnd,
6365 x2));
6366
6367 return (FALSE); /* default */
6368}
6369
6370
6371/*****************************************************************************
6372 * Name : BOOL WIN32API GetNextQueueWindow
6373 * Purpose : Unknown
6374 * Parameters: Unknown
6375 * Variables :
6376 * Result :
6377 * Remark :
6378 * Status : UNTESTED UNKNOWN STUB
6379 *
6380 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6381 *****************************************************************************/
6382
6383BOOL WIN32API GetNextQueueWindow(DWORD x1,
6384 DWORD x2)
6385{
6386 dprintf(("USER32: GetNextQueueWindow(%08xh,%08xh) not implemented.\n",
6387 x1,
6388 x2));
6389
6390 return (FALSE); /* default */
6391}
6392
6393
6394/*****************************************************************************
6395 * Name : BOOL WIN32API YieldTask
6396 * Purpose : Unknown
6397 * Parameters: Unknown
6398 * Variables :
6399 * Result :
6400 * Remark :
6401 * Status : UNTESTED UNKNOWN STUB
6402 *
6403 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6404 *****************************************************************************/
6405
6406BOOL WIN32API YieldTask(void)
6407{
6408 dprintf(("USER32: YieldTask() not implemented.\n"));
6409
6410 return (FALSE); /* default */
6411}
6412
6413
6414/*****************************************************************************
6415 * Name : BOOL WIN32API WinOldAppHackoMatic
6416 * Purpose : Unknown
6417 * Parameters: Unknown
6418 * Variables :
6419 * Result :
6420 * Remark :
6421 * Status : UNTESTED UNKNOWN STUB
6422 *
6423 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6424 *****************************************************************************/
6425
6426BOOL WIN32API WinOldAppHackoMatic(DWORD x1)
6427{
6428 dprintf(("USER32: WinOldAppHackoMatic(%08x) not implemented.\n",
6429 x1));
6430
6431 return (FALSE); /* default */
6432}
6433
6434
6435/*****************************************************************************
6436 * Name : BOOL WIN32API DragObject
6437 * Purpose : Unknown
6438 * Parameters: Unknown
6439 * Variables :
6440 * Result :
6441 * Remark :
6442 * Status : UNTESTED UNKNOWN STUB
6443 *
6444 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6445 *****************************************************************************/
6446
6447DWORD WIN32API DragObject(HWND x1,HWND x2,UINT x3,DWORD x4,HCURSOR x5)
6448{
6449 dprintf(("USER32: DragObject(%08x,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
6450 x1,
6451 x2,
6452 x3,
6453 x4,
6454 x5));
6455
6456 return (FALSE); /* default */
6457}
6458
6459
6460/*****************************************************************************
6461 * Name : BOOL WIN32API CascadeChildWindows
6462 * Purpose : Unknown
6463 * Parameters: Unknown
6464 * Variables :
6465 * Result :
6466 * Remark :
6467 * Status : UNTESTED UNKNOWN STUB
6468 *
6469 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6470 *****************************************************************************/
6471
6472BOOL WIN32API CascadeChildWindows(DWORD x1,
6473 DWORD x2)
6474{
6475 dprintf(("USER32: CascadeChildWindows(%08xh,%08xh) not implemented.\n",
6476 x1,
6477 x2));
6478
6479 return (FALSE); /* default */
6480}
6481
6482
6483/*****************************************************************************
6484 * Name : BOOL WIN32API RegisterSystemThread
6485 * Purpose : Unknown
6486 * Parameters: Unknown
6487 * Variables :
6488 * Result :
6489 * Remark :
6490 * Status : UNTESTED UNKNOWN STUB
6491 *
6492 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6493 *****************************************************************************/
6494
6495BOOL WIN32API RegisterSystemThread(DWORD x1,
6496 DWORD x2)
6497{
6498 dprintf(("USER32: RegisterSystemThread(%08xh,%08xh) not implemented.\n",
6499 x1,
6500 x2));
6501
6502 return (FALSE); /* default */
6503}
6504
6505
6506/*****************************************************************************
6507 * Name : BOOL WIN32API IsHungThread
6508 * Purpose : Unknown
6509 * Parameters: Unknown
6510 * Variables :
6511 * Result :
6512 * Remark :
6513 * Status : UNTESTED UNKNOWN STUB
6514 *
6515 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6516 *****************************************************************************/
6517
6518BOOL WIN32API IsHungThread(DWORD x1)
6519{
6520 dprintf(("USER32: IsHungThread(%08xh) not implemented.\n",
6521 x1));
6522
6523 return (FALSE); /* default */
6524}
6525
6526
6527/*****************************************************************************
6528 * Name : BOOL WIN32API SysErrorBox
6529 * Purpose : Unknown
6530 * Parameters: Unknown
6531 * Variables :
6532 * Result :
6533 * Remark : HARDERR like ?
6534 * Status : UNTESTED UNKNOWN STUB
6535 *
6536 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6537 *****************************************************************************/
6538
6539BOOL WIN32API SysErrorBox(DWORD x1,
6540 DWORD x2,
6541 DWORD x3)
6542{
6543 dprintf(("USER32: SysErrorBox(%08xh,%08xh,%08xh) not implemented.\n",
6544 x1,
6545 x2,
6546 x3));
6547
6548 return (FALSE); /* default */
6549}
6550
6551
6552/*****************************************************************************
6553 * Name : BOOL WIN32API UserSignalProc
6554 * Purpose : Unknown
6555 * Parameters: Unknown
6556 * Variables :
6557 * Result :
6558 * Remark :
6559 * Status : UNTESTED UNKNOWN STUB
6560 *
6561 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6562 *****************************************************************************/
6563
6564BOOL WIN32API UserSignalProc(DWORD x1,
6565 DWORD x2,
6566 DWORD x3,
6567 DWORD x4)
6568{
6569 dprintf(("USER32: SysErrorBox(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
6570 x1,
6571 x2,
6572 x3,
6573 x4));
6574
6575 return (FALSE); /* default */
6576}
6577
6578
6579/*****************************************************************************
6580 * Name : BOOL WIN32API GetShellWindow
6581 * Purpose : Unknown
6582 * Parameters: Unknown
6583 * Variables :
6584 * Result :
6585 * Remark :
6586 * Status : UNTESTED UNKNOWN STUB
6587 *
6588 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6589 *****************************************************************************/
6590
6591HWND WIN32API GetShellWindow(void)
6592{
6593 dprintf(("USER32: GetShellWindow() not implemented.\n"));
6594
6595 return (0); /* default */
6596}
6597
6598
6599/***********************************************************************
6600 * RegisterTasklist32 [USER32.436]
6601 */
6602DWORD WIN32API RegisterTasklist (DWORD x)
6603{
6604 dprintf(("USER32: RegisterTasklist(%08xh) not implemented.\n",
6605 x));
6606
6607 return TRUE;
6608}
6609
6610
6611/***********************************************************************
6612 * DrawCaptionTemp32A [USER32.599]
6613 *
6614 * PARAMS
6615 *
6616 * RETURNS
6617 * Success:
6618 * Failure:
6619 */
6620
6621BOOL WIN32API DrawCaptionTempA(HWND hwnd,
6622 HDC hdc,
6623 const RECT *rect,
6624 HFONT hFont,
6625 HICON hIcon,
6626 LPCSTR str,
6627 UINT uFlags)
6628{
6629 RECT rc = *rect;
6630
6631 dprintf(("USER32: DrawCaptionTempA(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh)\n",
6632 hwnd,
6633 hdc,
6634 rect,
6635 hFont,
6636 hIcon,
6637 str,
6638 uFlags));
6639
6640 /* drawing background */
6641 if (uFlags & DC_INBUTTON)
6642 {
6643 O32_FillRect (hdc,
6644 &rc,
6645 GetSysColorBrush (COLOR_3DFACE));
6646
6647 if (uFlags & DC_ACTIVE)
6648 {
6649 HBRUSH hbr = O32_SelectObject (hdc,
6650 GetSysColorBrush (COLOR_ACTIVECAPTION));
6651 O32_PatBlt (hdc,
6652 rc.left,
6653 rc.top,
6654 rc.right - rc.left,
6655 rc.bottom - rc.top,
6656 0xFA0089);
6657
6658 O32_SelectObject (hdc,
6659 hbr);
6660 }
6661 }
6662 else
6663 {
6664 O32_FillRect (hdc,
6665 &rc,
6666 GetSysColorBrush ((uFlags & DC_ACTIVE) ?
6667 COLOR_ACTIVECAPTION : COLOR_INACTIVECAPTION));
6668 }
6669
6670
6671 /* drawing icon */
6672 if ((uFlags & DC_ICON) && !(uFlags & DC_SMALLCAP))
6673 {
6674 POINT pt;
6675
6676 pt.x = rc.left + 2;
6677 pt.y = (rc.bottom + rc.top - O32_GetSystemMetrics(SM_CYSMICON)) / 2;
6678
6679 if (hIcon)
6680 {
6681 DrawIconEx (hdc,
6682 pt.x,
6683 pt.y,
6684 hIcon,
6685 O32_GetSystemMetrics(SM_CXSMICON),
6686 O32_GetSystemMetrics(SM_CYSMICON),
6687 0,
6688 0,
6689 DI_NORMAL);
6690 }
6691 else
6692 {
6693 /* @@@PH 1999/06/08 not ported yet, just don't draw any icon
6694 WND *wndPtr = WIN_FindWndPtr(hwnd);
6695 HICON hAppIcon = 0;
6696
6697 if (wndPtr->class->hIconSm)
6698 hAppIcon = wndPtr->class->hIconSm;
6699 else
6700 if (wndPtr->class->hIcon)
6701 hAppIcon = wndPtr->class->hIcon;
6702
6703 DrawIconEx (hdc,
6704 pt.x,
6705 pt.y,
6706 hAppIcon,
6707 GetSystemMetrics(SM_CXSMICON),
6708 GetSystemMetrics(SM_CYSMICON),
6709 0,
6710 0,
6711 DI_NORMAL);
6712
6713 WIN_ReleaseWndPtr(wndPtr);
6714 */
6715 }
6716
6717 rc.left += (rc.bottom - rc.top);
6718 }
6719
6720 /* drawing text */
6721 if (uFlags & DC_TEXT)
6722 {
6723 HFONT hOldFont;
6724
6725 if (uFlags & DC_INBUTTON)
6726 O32_SetTextColor (hdc,
6727 O32_GetSysColor (COLOR_BTNTEXT));
6728 else
6729 if (uFlags & DC_ACTIVE)
6730 O32_SetTextColor (hdc,
6731 O32_GetSysColor (COLOR_CAPTIONTEXT));
6732 else
6733 O32_SetTextColor (hdc,
6734 O32_GetSysColor (COLOR_INACTIVECAPTIONTEXT));
6735
6736 O32_SetBkMode (hdc,
6737 TRANSPARENT);
6738
6739 if (hFont)
6740 hOldFont = O32_SelectObject (hdc,
6741 hFont);
6742 else
6743 {
6744 NONCLIENTMETRICSA nclm;
6745 HFONT hNewFont;
6746
6747 nclm.cbSize = sizeof(NONCLIENTMETRICSA);
6748 O32_SystemParametersInfo (SPI_GETNONCLIENTMETRICS,
6749 0,
6750 &nclm,
6751 0);
6752 hNewFont = O32_CreateFontIndirect ((uFlags & DC_SMALLCAP) ?
6753 &nclm.lfSmCaptionFont : &nclm.lfCaptionFont);
6754 hOldFont = O32_SelectObject (hdc,
6755 hNewFont);
6756 }
6757
6758 if (str)
6759 O32_DrawText (hdc,
6760 str,
6761 -1,
6762 &rc,
6763 DT_SINGLELINE | DT_VCENTER | DT_NOPREFIX | DT_LEFT);
6764 else
6765 {
6766 CHAR szText[128];
6767 INT nLen;
6768
6769 nLen = O32_GetWindowText (hwnd,
6770 szText,
6771 128);
6772
6773 O32_DrawText (hdc,
6774 szText,
6775 nLen,
6776 &rc,
6777 DT_SINGLELINE | DT_VCENTER | DT_NOPREFIX | DT_LEFT);
6778 }
6779
6780 if (hFont)
6781 O32_SelectObject (hdc,
6782 hOldFont);
6783 else
6784 O32_DeleteObject (O32_SelectObject (hdc,
6785 hOldFont));
6786 }
6787
6788 /* drawing focus ??? */
6789 if (uFlags & 0x2000)
6790 {
6791 dprintf(("USER32: DrawCaptionTempA undocumented flag (0x2000)!\n"));
6792 }
6793
6794 return 0;
6795}
6796
6797
6798/***********************************************************************
6799 * DrawCaptionTemp32W [USER32.602]
6800 *
6801 * PARAMS
6802 *
6803 * RETURNS
6804 * Success:
6805 * Failure:
6806 */
6807
6808BOOL WIN32API DrawCaptionTempW (HWND hwnd,
6809 HDC hdc,
6810 const RECT *rect,
6811 HFONT hFont,
6812 HICON hIcon,
6813 LPCWSTR str,
6814 UINT uFlags)
6815{
6816 LPSTR strAscii = UnicodeToAsciiString((LPWSTR)str);
6817
6818 BOOL res = DrawCaptionTempA (hwnd,
6819 hdc,
6820 rect,
6821 hFont,
6822 hIcon,
6823 strAscii,
6824 uFlags);
6825
6826 FreeAsciiString(strAscii);
6827
6828 return res;
6829}
Note: See TracBrowser for help on using the repository browser.