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

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

* empty log message *

File size: 243.0 KB
Line 
1/* $Id: user32.cpp,v 1.10 1999-06-20 20:50:18 sandervl Exp $ */
2
3/*
4 * Win32 misc user32 API functions for OS/2
5 *
6 * Copyright 1998 Sander van Leeuwen
7 * Copyright 1998 Patrick Haller
8 * Copyright 1998 Peter Fitzsimmons
9 * Copyright 1999 Christoph Bratschi
10 *
11 *
12 * Project Odin Software License can be found in LICENSE.TXT
13 *
14 */
15/*****************************************************************************
16 * Name : USER32.CPP
17 * Purpose : This module maps all Win32 functions contained in USER32.DLL
18 * to their OS/2-specific counterparts as far as possible.
19 *****************************************************************************/
20
21#include <os2win.h>
22#include "misc.h"
23
24#include "user32.h"
25#include "wndproc.h"
26#include "wndsubproc.h"
27#include "wndclass.h"
28#include "icon.h"
29#include "usrcall.h"
30#include "syscolor.h"
31
32#include <wchar.h>
33#include <stdlib.h>
34#include <string.h>
35
36//undocumented stuff
37// WIN32API CalcChildScroll
38// WIN32API CascadeChildWindows
39// WIN32API ClientThreadConnect
40// WIN32API DragObject
41// WIN32API DrawFrame
42// WIN32API EditWndProc
43// WIN32API EndTask
44// WIN32API GetInputDesktop
45// WIN32API GetNextQueueWindow
46// WIN32API GetShellWindow
47// WIN32API InitSharedTable
48// WIN32API InitTask
49// WIN32API IsHungThread
50// WIN32API LockWindowStation
51// WIN32API ModifyAccess
52// WIN32API PlaySoundEvent
53// WIN32API RegisterLogonProcess
54// WIN32API RegisterNetworkCapabilities
55// WIN32API RegisterSystemThread
56// WIN32API SetDeskWallpaper
57// WIN32API SetDesktopBitmap
58// WIN32API SetInternalWindowPos
59// WIN32API SetLogonNotifyWindow
60// WIN32API SetShellWindow
61// WIN32API SetSysColorsTemp
62// WIN32API SetWindowFullScreenState
63// WIN32API SwitchToThisWindow
64// WIN32API SysErrorBox
65// WIN32API TileChildWindows
66// WIN32API UnlockWindowStation
67// WIN32API UserClientDllInitialize
68// WIN32API UserSignalProc
69// WIN32API WinOldAppHackoMatic
70// WIN32API WNDPROC_CALLBACK
71// WIN32API YieldTask
72
73
74
75
76//******************************************************************************
77//******************************************************************************
78HWND WIN32API GetActiveWindow()
79{
80 return(O32_GetActiveWindow());
81}
82//******************************************************************************
83//******************************************************************************
84int __cdecl wsprintfA(char *lpOut, LPCSTR lpFmt, ...)
85{
86 int rc;
87 va_list argptr;
88
89#ifdef DEBUG
90 WriteLog("USER32: wsprintfA\n");
91 WriteLog("USER32: %s\n", lpFmt);
92#endif
93 va_start(argptr, lpFmt);
94 rc = O32_wvsprintf(lpOut, (char *)lpFmt, argptr);
95 va_end(argptr);
96#ifdef DEBUG
97 WriteLog("USER32: %s\n", lpOut);
98#endif
99 return(rc);
100}
101//******************************************************************************
102//******************************************************************************
103int __cdecl wsprintfW(LPWSTR lpOut, LPCWSTR lpFmt, ...)
104{
105 int rc;
106 char *lpFmtA;
107 char szOut[512];
108 va_list argptr;
109
110 dprintf(("USER32: wsprintfW(%08xh,%08xh).\n",
111 lpOut,
112 lpFmt));
113
114 lpFmtA = UnicodeToAsciiString((LPWSTR)lpFmt);
115
116 /* @@@PH 98/07/13 transform "%s" to "%ls" does the unicode magic */
117 {
118 PSZ pszTemp;
119 PSZ pszTemp1;
120 ULONG ulStrings;
121 ULONG ulIndex; /* temporary string counter */
122
123 for (ulStrings = 0, /* determine number of placeholders */
124 pszTemp = lpFmtA;
125
126 (pszTemp != NULL) &&
127 (*pszTemp != 0);
128
129 ulStrings++)
130 {
131 pszTemp = strstr(pszTemp,
132 "%s");
133 if (pszTemp != NULL) /* skip 2 characters */
134 {
135 pszTemp++;
136 pszTemp++;
137 }
138 else
139 break; /* leave loop immediately */
140 }
141
142 if (ulStrings != 0) /* transformation required ? */
143 {
144 /* now reallocate lpFmt */
145 ulStrings += strlen(lpFmtA); /* calculate total string length */
146 pszTemp = lpFmtA; /* save string pointer */
147 pszTemp1 = lpFmtA; /* save string pointer */
148
149 /* @@@PH allocation has to be compatible to FreeAsciiString !!! */
150 lpFmtA = (char *)malloc(ulStrings + 1);
151 if (lpFmtA == NULL) /* check proper allocation */
152 return (0); /* raise error condition */
153
154 for (ulIndex = 0;
155 ulIndex <= ulStrings;
156 ulIndex++,
157 pszTemp++)
158 {
159 if ((pszTemp[0] == '%') &&
160 (pszTemp[1] == 's') )
161 {
162 /* replace %s by %ls */
163 lpFmtA[ulIndex++] = '%';
164 lpFmtA[ulIndex ] = 'l';
165 lpFmtA[ulIndex+1] = 's';
166 }
167 else
168 lpFmtA[ulIndex] = *pszTemp; /* just copy over the character */
169 }
170
171 lpFmtA[ulStrings] = 0; /* string termination */
172
173 FreeAsciiString(pszTemp1); /* the original string is obsolete */
174 }
175 }
176
177 dprintf(("USER32: wsprintfW (%s).\n",
178 lpFmt));
179
180 va_start(argptr,
181 lpFmt);
182
183 rc = O32_wvsprintf(szOut,
184 lpFmtA,
185 argptr);
186
187 AsciiToUnicode(szOut,
188 lpOut);
189
190 FreeAsciiString(lpFmtA);
191 return(rc);
192}
193//******************************************************************************
194//******************************************************************************
195int WIN32API MessageBoxA(HWND hwndOwner, LPCTSTR lpszText, LPCTSTR lpszTitle, UINT fuStyle)
196{
197 dprintf(("USER32: MessageBoxA %s %s\n", lpszText, lpszTitle));
198 return(O32_MessageBox(hwndOwner, lpszText, lpszTitle, fuStyle));
199}
200//******************************************************************************
201//******************************************************************************
202BOOL WIN32API MessageBeep( UINT arg1)
203{
204#ifdef DEBUG
205 WriteLog("USER32: MessageBeep\n");
206#endif
207 return O32_MessageBeep(arg1);
208}
209//******************************************************************************
210//******************************************************************************
211LONG WIN32API SendDlgItemMessageA( HWND arg1, int arg2, UINT arg3, WPARAM arg4, LPARAM arg5)
212{
213#ifdef DEBUG
214 WriteLog("USER32: SendDlgItemMessageA\n");
215#endif
216 return O32_SendDlgItemMessage(arg1, arg2, arg3, arg4, arg5);
217}
218//******************************************************************************
219//******************************************************************************
220VOID WIN32API PostQuitMessage( int arg1)
221{
222 dprintf(("USER32: PostQuitMessage\n"));
223 O32_PostQuitMessage(arg1);
224}
225//******************************************************************************
226// Not implemented by Open32 (31-5-99 Christoph Bratschi)
227//******************************************************************************
228BOOL WIN32API IsDlgButtonChecked( HWND arg1, UINT arg2)
229{
230#ifdef DEBUG
231 WriteLog("USER32: IsDlgButtonChecked\n");
232#endif
233// return O32_IsDlgButtonChecked(arg1, arg2);
234 return (BOOL)SendDlgItemMessageA(arg1,arg2,BM_GETCHECK,0,0);
235}
236//******************************************************************************
237//******************************************************************************
238int WIN32API GetWindowTextLengthA( HWND arg1)
239{
240 dprintf(("USER32: GetWindowTextLength\n"));
241 return O32_GetWindowTextLength(arg1);
242}
243//******************************************************************************
244//******************************************************************************
245int WIN32API GetWindowTextA( HWND arg1, LPSTR arg2, int arg3)
246{
247 dprintf(("USER32: GetWindowTextA\n"));
248 return O32_GetWindowText(arg1, arg2, arg3);
249}
250//******************************************************************************
251
252/*******************************************************************
253 * InternalGetWindowText (USER32.326)
254 */
255int WIN32API InternalGetWindowText(HWND hwnd,
256 LPWSTR lpString,
257 INT nMaxCount )
258{
259 dprintf(("USER32: InternalGetWindowText(%08xh,%08xh,%08xh) not properly implemented.\n",
260 hwnd,
261 lpString,
262 nMaxCount));
263
264 return GetWindowTextW(hwnd,lpString,nMaxCount);
265}
266
267
268//******************************************************************************
269BOOL WIN32API GetWindowRect( HWND arg1, PRECT arg2)
270{
271 BOOL rc;
272
273 rc = O32_GetWindowRect(arg1, arg2);
274 dprintf(("USER32: GetWindowRect %X returned %d\n", arg1, rc));
275 return(rc);
276}
277//******************************************************************************
278//******************************************************************************
279HWND WIN32API GetNextDlgTabItem( HWND arg1, HWND arg2, BOOL arg3)
280{
281 dprintf(("USER32: GetNextDlgTabItem\n"));
282 return O32_GetNextDlgTabItem(arg1, arg2, arg3);
283}
284//******************************************************************************
285//******************************************************************************
286BOOL WIN32API GetMessageA( LPMSG arg1, HWND arg2, UINT arg3, UINT arg4)
287{
288//// dprintf(("USER32: GetMessage\n"));
289 return O32_GetMessage(arg1, arg2, arg3, arg4);
290}
291//******************************************************************************
292//******************************************************************************
293HWND WIN32API GetFocus(void)
294{
295 dprintf(("USER32: GetFocus\n"));
296 return O32_GetFocus();
297}
298//******************************************************************************
299//******************************************************************************
300HWND WIN32API GetDlgItem(HWND arg1, int arg2)
301{
302 HWND rc;
303
304 rc = O32_GetDlgItem(arg1, arg2);
305 dprintf(("USER32: GetDlgItem %d returned %d\n", arg2, rc));
306 return(rc);
307}
308//******************************************************************************
309//******************************************************************************
310int WIN32API GetDlgCtrlID( HWND arg1)
311{
312 dprintf(("USER32: GetDlgCtrlID\n"));
313 return O32_GetDlgCtrlID(arg1);
314}
315//******************************************************************************
316//******************************************************************************
317HWND WIN32API GetDesktopWindow(void)
318{
319 dprintf(("USER32: GetDesktopWindow\n"));
320 return O32_GetDesktopWindow();
321}
322//******************************************************************************
323//******************************************************************************
324BOOL WIN32API EnumThreadWindows(DWORD dwThreadId, WNDENUMPROC lpfn, LPARAM lParam)
325{
326 BOOL rc;
327 EnumWindowCallback *callback = new EnumWindowCallback(lpfn, lParam);
328
329 dprintf(("USER32: EnumThreadWindows\n"));
330 rc = O32_EnumThreadWindows(dwThreadId, callback->GetOS2Callback(), (LPARAM)callback);
331 if(callback)
332 delete callback;
333 return(rc);
334}
335//******************************************************************************
336//******************************************************************************
337BOOL WIN32API EndDialog( HWND arg1, int arg2)
338{
339 BOOL rc;
340
341 dprintf(("USER32: EndDialog\n"));
342 rc = O32_EndDialog(arg1, arg2);
343 return(rc);
344}
345//******************************************************************************
346//******************************************************************************
347LONG WIN32API DispatchMessageA( const MSG * arg1)
348{
349//// dprintf(("USER32: DispatchMessage\n"));
350 return O32_DispatchMessage(arg1);
351}
352//******************************************************************************
353//******************************************************************************
354BOOL WIN32API OffsetRect( PRECT arg1, int arg2, int arg3)
355{
356#ifdef DEBUG
357//// WriteLog("USER32: OffsetRect\n");
358#endif
359 return O32_OffsetRect(arg1, arg2, arg3);
360}
361//******************************************************************************
362//******************************************************************************
363BOOL WIN32API CopyRect( PRECT arg1, const RECT * arg2)
364{
365// ddprintf(("USER32: CopyRect\n"));
366 return O32_CopyRect(arg1, arg2);
367}
368//******************************************************************************
369// Not implemented by Open32 (5-31-99 Christoph Bratschi)
370//******************************************************************************
371BOOL WIN32API CheckDlgButton( HWND arg1, int arg2, UINT arg3)
372{
373#ifdef DEBUG
374 WriteLog("USER32: CheckDlgButton\n");
375#endif
376// return O32_CheckDlgButton(arg1, arg2, arg3);
377 return (BOOL)SendDlgItemMessageA(arg1,arg2,BM_SETCHECK,arg3,0);
378}
379//******************************************************************************
380//******************************************************************************
381HWND WIN32API SetFocus( HWND arg1)
382{
383 dprintf(("USER32: SetFocus\n"));
384 return O32_SetFocus(arg1);
385}
386//******************************************************************************
387//******************************************************************************
388BOOL WIN32API TranslateMessage( const MSG * arg1)
389{
390#ifdef DEBUG
391//// WriteLog("USER32: TranslateMessage\n");
392#endif
393 return O32_TranslateMessage(arg1);
394}
395//******************************************************************************
396//******************************************************************************
397BOOL WIN32API SetWindowPos( HWND arg1, HWND arg2, int arg3, int arg4, int arg5, int arg6, UINT arg7)
398{
399#ifdef DEBUG
400 WriteLog("USER32: SetWindowPos\n");
401#endif
402 return O32_SetWindowPos(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
403}
404//******************************************************************************
405//******************************************************************************
406BOOL WIN32API ShowWindow(HWND arg1, int arg2)
407{
408#ifdef DEBUG
409 WriteLog("USER32: ShowWindow %X %d\n", arg1, arg2);
410#endif
411 return O32_ShowWindow(arg1, arg2);
412}
413//******************************************************************************
414//******************************************************************************
415BOOL WIN32API SetWindowTextA(HWND arg1, LPCSTR arg2)
416{
417#ifdef DEBUG
418 WriteLog("USER32: SetWindowText %s\n", arg2);
419#endif
420 return O32_SetWindowText(arg1, arg2);
421}
422//******************************************************************************
423//******************************************************************************
424BOOL WIN32API SetForegroundWindow(HWND arg1)
425{
426#ifdef DEBUG
427 WriteLog("USER32: SetForegroundWindow\n");
428#endif
429 return O32_SetForegroundWindow(arg1);
430}
431//******************************************************************************
432//******************************************************************************
433int WIN32API ReleaseDC( HWND arg1, HDC arg2)
434{
435#ifdef DEBUG
436 WriteLog("USER32: ReleaseDC\n");
437#endif
438 return O32_ReleaseDC(arg1, arg2);
439}
440//******************************************************************************
441//******************************************************************************
442BOOL WIN32API InvalidateRect(HWND arg1, const RECT *arg2, BOOL arg3)
443{
444#ifdef DEBUG
445 if(arg2)
446 WriteLog("USER32: InvalidateRect for window %X (%d,%d)(%d,%d) %d\n", arg1, arg2->left, arg2->top, arg2->right, arg2->bottom, arg3);
447 else WriteLog("USER32: InvalidateRect for window %X NULL, %d\n", arg1, arg3);
448#endif
449 return O32_InvalidateRect(arg1, arg2, arg3);
450}
451//******************************************************************************
452//******************************************************************************
453BOOL WIN32API GetUpdateRect( HWND arg1, PRECT arg2, BOOL arg3)
454{
455#ifdef DEBUG
456 WriteLog("USER32: GetUpdateRect\n");
457#endif
458 return O32_GetUpdateRect(arg1, arg2, arg3);
459}
460//******************************************************************************
461//******************************************************************************
462HDC WIN32API GetDC( HWND arg1)
463{
464 HDC hdc;
465
466 hdc = O32_GetDC(arg1);
467#ifdef DEBUG
468 WriteLog("USER32: GetDC of %X returns %X\n", arg1, hdc);
469#endif
470 return(hdc);
471}
472//******************************************************************************
473//******************************************************************************
474HDC WIN32API GetDCEx(HWND arg1, HRGN arg2, DWORD arg3)
475{
476#ifdef DEBUG
477 WriteLog("USER32: GetDCEx\n");
478#endif
479 return O32_GetDCEx(arg1, arg2, arg3);
480}
481//******************************************************************************
482//******************************************************************************
483BOOL WIN32API GetClientRect( HWND arg1, PRECT arg2)
484{
485#ifdef DEBUG
486 WriteLog("USER32: GetClientRect of %X\n", arg1);
487#endif
488
489 return O32_GetClientRect(arg1, arg2);
490}
491//******************************************************************************
492//******************************************************************************
493HWND WIN32API FindWindowA(LPCSTR arg1, LPCSTR arg2)
494{
495#ifdef DEBUG
496 WriteLog("USER32: FindWindow\n");
497#endif
498 return O32_FindWindow(arg1, arg2);
499}
500//******************************************************************************
501//******************************************************************************
502HWND WIN32API FindWindowExA(HWND arg1, HWND arg2, LPCSTR arg3, LPCSTR arg4)
503{
504#ifdef DEBUG
505 WriteLog("USER32: FindWindowExA, not completely implemented\n");
506#endif
507 return O32_FindWindow(arg3, arg4);
508}
509//******************************************************************************
510//******************************************************************************
511BOOL WIN32API FlashWindow( HWND arg1, BOOL arg2)
512{
513#ifdef DEBUG
514 WriteLog("USER32: FlashWindow\n");
515#endif
516 return O32_FlashWindow(arg1, arg2);
517}
518//******************************************************************************
519//******************************************************************************
520BOOL WIN32API EndPaint( HWND arg1, const PAINTSTRUCT * arg2)
521{
522#ifdef DEBUG
523 WriteLog("USER32: EndPaint\n");
524#endif
525 return O32_EndPaint(arg1, arg2);
526}
527//******************************************************************************
528//******************************************************************************
529BOOL WIN32API MoveWindow(HWND arg1, int arg2, int arg3, int arg4, int arg5, BOOL arg6)
530{
531 BOOL rc;
532
533 rc = O32_MoveWindow(arg1, arg2, arg3, arg4, arg5, arg6);
534 dprintf(("USER32: MoveWindow %X to (%d,%d) size (%d,%d), repaint = %d returned %d\n", arg1, arg2, arg3, arg4, arg5, arg6, rc));
535 return(rc);
536}
537//******************************************************************************
538//******************************************************************************
539HWND WIN32API CreateWindowExA(DWORD dwExStyle,
540 LPCSTR arg2,
541 LPCSTR arg3,
542 DWORD dwStyle,
543 int x,
544 int y,
545 int nWidth,
546 int nHeight,
547 HWND parent,
548 HMENU arg10,
549 HINSTANCE arg11,
550 PVOID arg12)
551{
552 HWND hwnd;
553 Win32WindowProc *window = NULL;
554
555 /* @@@PH 98/06/12 CreateWindow crashes somewhere in Open32 */
556 if(arg3 == NULL)
557 arg3 = (LPCSTR)"CRASH, CRASH";
558
559 // 6-12-99 CB: WS_CLIPCHILDREN not set -> controls not redrawn
560 // Problems with group boxes
561 dwStyle |= WS_CLIPCHILDREN;
562
563 //SvL: Correct window style (like Wine does)
564 if(dwStyle & WS_CHILD) {
565 dwStyle |= WS_CLIPSIBLINGS;
566 if(!(dwStyle & WS_POPUP)) {
567 dwStyle |= WS_CAPTION;
568 }
569 }
570 if(dwExStyle & WS_EX_DLGMODALFRAME)
571 {
572 dwStyle &= ~WS_THICKFRAME;
573 }
574
575#ifdef DEBUG
576 WriteLog("USER32: CreateWindow: dwExStyle = %X\n", dwExStyle);
577 if((int)arg2 >> 16 != 0)
578 WriteLog("USER32: CreateWindow: classname = %s\n", arg2);
579 else WriteLog("USER32: CreateWindow: classname = %X\n", arg2);
580 WriteLog("USER32: CreateWindow: windowname= %s\n", arg3);
581 WriteLog("USER32: CreateWindow: dwStyle = %X\n", dwStyle);
582 WriteLog("USER32: CreateWindow: x = %d\n", x);
583 WriteLog("USER32: CreateWindow: y = %d\n", y);
584 WriteLog("USER32: CreateWindow: nWidth = %d\n", nWidth);
585 WriteLog("USER32: CreateWindow: nHeight = %d\n", nHeight);
586 WriteLog("USER32: CreateWindow: parent = %X\n", parent);
587 WriteLog("USER32: CreateWindow: hwmenu = %X\n", arg10);
588 WriteLog("USER32: CreateWindow: hinstance = %X\n", arg11);
589 WriteLog("USER32: CreateWindow: param = %X\n", arg12);
590 #endif
591
592 if((int) arg2 >> 16 != 0 && strcmp(arg2, "COMBOBOX") == 0)
593 {
594 dprintf(("COMBOBOX creation"));
595 //TODO: #%@#%$ Open32 doesn't support this
596 dwStyle &= ~(CBS_OWNERDRAWFIXED | CBS_OWNERDRAWVARIABLE);
597
598 /* @@@PH 98/06/12 drop down combos are problematic too */
599 /* so we translate the styles to OS/2 style */
600 dwStyle |= CBS_DROPDOWN | CBS_DROPDOWNLIST;
601 }
602
603 //Classname might be name of system class, in which case we don't
604 //need to use our own callback
605// if(Win32WindowClass::FindClass((LPSTR)arg2) != NULL) {
606 window = new Win32WindowProc(arg11, arg2);
607// }
608
609 hwnd = O32_CreateWindowEx(dwExStyle,
610 arg2,
611 arg3,
612 dwStyle,
613 x,
614 y,
615 nWidth,
616 nHeight,
617 parent,
618 arg10,
619 arg11,
620 arg12);
621
622 //SvL: 16-11-'97: window can be already destroyed if hwnd == 0
623 if(hwnd == 0 && window != 0 && Win32WindowProc::FindWindowProc(window)) {
624 delete(window);
625 window = 0;
626 }
627 if(window) {
628 window->SetWindowHandle(hwnd);
629 }
630
631 dprintf(("USER32: ************CreateWindowExA %s (%d,%d,%d,%d), hwnd = %X\n", arg2, x, y, nWidth, nHeight, hwnd));
632 return(hwnd);
633}
634//******************************************************************************
635//******************************************************************************
636LRESULT WIN32API SendMessageA(HWND arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
637{
638 LRESULT rc;
639
640#ifdef DEBUG
641 WriteLog("USER32: SendMessage....\n");
642#endif
643 rc = O32_SendMessage(arg1, arg2, arg3, arg4);
644#ifdef DEBUG
645 WriteLog("USER32: *****SendMessage %X %X %X %X returned %d\n", arg1, arg2, arg3, arg4, rc);
646#endif
647 return(rc);
648}
649//******************************************************************************
650//******************************************************************************
651HWND WIN32API SetActiveWindow( HWND arg1)
652{
653#ifdef DEBUG
654 WriteLog("USER32: SetActiveWindow\n");
655#endif
656 return O32_SetActiveWindow(arg1);
657}
658//******************************************************************************
659//******************************************************************************
660HDC WIN32API BeginPaint(HWND arg1, PPAINTSTRUCT arg2)
661{
662 dprintf(("USER32: BeginPaint %X\n", arg2));
663 return O32_BeginPaint(arg1, arg2);
664}
665//******************************************************************************
666//******************************************************************************
667BOOL WIN32API IsDialogMessageA( HWND arg1, LPMSG arg2)
668{
669#ifdef DEBUG
670//// WriteLog("USER32: IsDialogMessage\n");
671#endif
672 return O32_IsDialogMessage(arg1, arg2);
673}
674//******************************************************************************
675//******************************************************************************
676int WIN32API DrawTextA(HDC arg1, LPCSTR arg2, int arg3, PRECT arg4, UINT arg5)
677{
678#ifdef DEBUG
679 WriteLog("USER32: DrawTextA %s", arg2);
680#endif
681 return O32_DrawText(arg1, arg2, arg3, arg4, arg5);
682}
683//******************************************************************************
684//******************************************************************************
685int WIN32API DrawTextExA(HDC arg1, LPCSTR arg2, int arg3, PRECT arg4, UINT arg5, LPDRAWTEXTPARAMS lpDTParams)
686{
687#ifdef DEBUG
688 WriteLog("USER32: DrawTextExA (not completely implemented) %s", arg2);
689#endif
690 return O32_DrawText(arg1, arg2, arg3, arg4, arg5);
691}
692//******************************************************************************
693//******************************************************************************
694int WIN32API GetSystemMetrics(int arg1)
695{
696 int rc;
697
698 switch(arg1) {
699 case SM_CXICONSPACING: //TODO: size of grid cell for large icons
700 rc = O32_GetSystemMetrics(SM_CXICON);
701 break;
702 case SM_CYICONSPACING:
703 rc = O32_GetSystemMetrics(SM_CYICON);
704 break;
705 case SM_PENWINDOWS:
706 rc = FALSE;
707 break;
708 case SM_DBCSENABLED:
709 rc = FALSE;
710 break;
711 case SM_CXEDGE: //size of 3D window edge (not supported)
712 rc = 1;
713 break;
714 case SM_CYEDGE:
715 rc = 1;
716 break;
717 case SM_CXMINSPACING: //can be SM_CXMINIMIZED or larger
718 rc = O32_GetSystemMetrics(SM_CXMINIMIZED);
719 break;
720 case SM_CYMINSPACING:
721 rc = GetSystemMetrics(SM_CYMINIMIZED);
722 break;
723 case SM_CXSMICON: //recommended size of small icons (TODO: adjust to screen res.)
724 rc = 16;
725 break;
726 case SM_CYSMICON:
727 rc = 16;
728 break;
729 case SM_CYSMCAPTION: //size in pixels of a small caption (TODO: ????)
730 rc = 8;
731 break;
732 case SM_CXSMSIZE: //size of small caption buttons (pixels) (TODO: implement properly)
733 rc = 16;
734 break;
735 case SM_CYSMSIZE:
736 rc = 16;
737 break;
738 case SM_CXMENUSIZE: //TODO: size of menu bar buttons (such as MDI window close)
739 rc = 16;
740 break;
741 case SM_CYMENUSIZE:
742 rc = 16;
743 break;
744 case SM_ARRANGE:
745 rc = ARW_BOTTOMLEFT | ARW_LEFT;
746 break;
747 case SM_CXMINIMIZED:
748 break;
749 case SM_CYMINIMIZED:
750 break;
751 case SM_CXMAXTRACK: //max window size
752 case SM_CXMAXIMIZED: //max toplevel window size
753 rc = O32_GetSystemMetrics(SM_CXSCREEN);
754 break;
755 case SM_CYMAXTRACK:
756 case SM_CYMAXIMIZED:
757 rc = O32_GetSystemMetrics(SM_CYSCREEN);
758 break;
759 case SM_NETWORK:
760 rc = 0x01; //TODO: default = yes
761 break;
762 case SM_CLEANBOOT:
763 rc = 0; //normal boot
764 break;
765 case SM_CXDRAG: //nr of pixels before drag becomes a real one
766 rc = 2;
767 break;
768 case SM_CYDRAG:
769 rc = 2;
770 break;
771 case SM_SHOWSOUNDS: //show instead of play sound
772 rc = FALSE;
773 break;
774 case SM_CXMENUCHECK:
775 rc = 4; //TODO
776 break;
777 case SM_CYMENUCHECK:
778 rc = O32_GetSystemMetrics(SM_CYMENU);
779 break;
780 case SM_SLOWMACHINE:
781 rc = FALSE; //even a slow machine is fast with OS/2 :)
782 break;
783 case SM_MIDEASTENABLED:
784 rc = FALSE;
785 break;
786 case SM_CMETRICS:
787 rc = O32_GetSystemMetrics(44); //Open32 changed this one
788 break;
789 default:
790 rc = O32_GetSystemMetrics(arg1);
791 break;
792 }
793#ifdef DEBUG
794 WriteLog("USER32: GetSystemMetrics %d returned %d\n", arg1, rc);
795#endif
796 return(rc);
797}
798//******************************************************************************
799//******************************************************************************
800UINT WIN32API SetTimer( HWND arg1, UINT arg2, UINT arg3, TIMERPROC arg4)
801{
802#ifdef DEBUG
803 WriteLog("USER32: SetTimer INCORRECT CALLING CONVENTION FOR HANDLER!!!!!\n");
804#endif
805 //SvL: Write callback handler class for this one
806 return O32_SetTimer(arg1, arg2, arg3, (TIMERPROC_O32)arg4);
807}
808//******************************************************************************
809//******************************************************************************
810BOOL WIN32API KillTimer(HWND arg1, UINT arg2)
811{
812#ifdef DEBUG
813 WriteLog("USER32: KillTimer\n");
814#endif
815 return O32_KillTimer(arg1, arg2);
816}
817//******************************************************************************
818//******************************************************************************
819BOOL WIN32API DestroyWindow(HWND arg1)
820{
821#ifdef DEBUG
822 WriteLog("USER32: DestroyWindow\n");
823#endif
824 return O32_DestroyWindow(arg1);
825}
826//******************************************************************************
827//******************************************************************************
828BOOL WIN32API PostMessageA( HWND arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
829{
830#ifdef DEBUG
831 WriteLog("USER32: PostMessageA %X %X %X %X\n", arg1, arg2, arg3, arg4);
832#endif
833 return O32_PostMessage(arg1, arg2, arg3, arg4);
834}
835//******************************************************************************
836//******************************************************************************
837BOOL WIN32API InflateRect( PRECT arg1, int arg2, int arg3)
838{
839#ifdef DEBUG
840 WriteLog("USER32: InflateRect\n");
841#endif
842 return O32_InflateRect(arg1, arg2, arg3);
843}
844//******************************************************************************
845//TODO:How can we emulate this one in OS/2???
846//******************************************************************************
847DWORD WIN32API WaitForInputIdle(HANDLE hProcess, DWORD dwTimeOut)
848{
849#ifdef DEBUG
850 WriteLog("USER32: WaitForInputIdle (Not Implemented) %d\n", dwTimeOut);
851#endif
852
853 if(dwTimeOut == INFINITE) return(0);
854
855// DosSleep(dwTimeOut/16);
856 return(0);
857}
858//******************************************************************************
859//******************************************************************************
860UINT WIN32API GetDlgItemTextA(HWND arg1, int arg2, LPSTR arg3, UINT arg4)
861{
862 UINT rc;
863
864 rc = O32_GetDlgItemText(arg1, arg2, arg3, arg4);
865#ifdef DEBUG
866 if(rc)
867 WriteLog("USER32: GetDlgItemTextA returned %s\n", arg3);
868 else WriteLog("USER32: GetDlgItemTextA returned 0 (%d)\n", GetLastError());
869#endif
870 return(rc);
871}
872//******************************************************************************
873//******************************************************************************
874BOOL WIN32API PeekMessageA(LPMSG arg1, HWND arg2, UINT arg3, UINT arg4, UINT arg5)
875{
876#ifdef DEBUG
877// WriteLog("USER32: PeekMessage\n");
878#endif
879 return O32_PeekMessage(arg1, arg2, arg3, arg4, arg5);
880}
881//******************************************************************************
882//******************************************************************************
883int WIN32API ShowCursor( BOOL arg1)
884{
885#ifdef DEBUG
886 WriteLog("USER32: ShowCursor\n");
887#endif
888 return O32_ShowCursor(arg1);
889}
890//******************************************************************************
891//BUGBUG: UpdateWindow sends a WM_ERASEBKGRND when it shouldn't!
892// So we just do it manually
893//******************************************************************************
894BOOL WIN32API UpdateWindow(HWND hwnd)
895{
896 RECT rect;
897
898#ifdef DEBUG
899 WriteLog("USER32: UpdateWindow\n");
900#endif
901 if(O32_GetUpdateRect(hwnd, &rect, FALSE) != FALSE) {//update region empty?
902 WndCallback(hwnd, WM_PAINT, 0, 0);
903// O32_PostMessage(hwnd, WM_PAINT, 0, 0);
904 }
905#ifdef DEBUG
906 else WriteLog("USER32: Update region empty!\n");
907#endif
908 return(TRUE);
909}
910//******************************************************************************
911//******************************************************************************
912BOOL WIN32API AdjustWindowRect( PRECT arg1, DWORD arg2, BOOL arg3)
913{
914#ifdef DEBUG
915 WriteLog("USER32: AdjustWindowRect\n");
916#endif
917 return O32_AdjustWindowRect(arg1, arg2, arg3);
918}
919//******************************************************************************
920//******************************************************************************
921BOOL WIN32API AdjustWindowRectEx( PRECT arg1, DWORD arg2, BOOL arg3, DWORD arg4)
922{
923#ifdef DEBUG
924 WriteLog("USER32: AdjustWindowRectEx\n");
925#endif
926 return O32_AdjustWindowRectEx(arg1, arg2, arg3, arg4);
927}
928//******************************************************************************
929//******************************************************************************
930BOOL WIN32API ClientToScreen( HWND arg1, PPOINT arg2)
931{
932#ifdef DEBUG
933//// WriteLog("USER32: ClientToScreen\n");
934#endif
935 return O32_ClientToScreen(arg1, arg2);
936}
937//******************************************************************************
938//******************************************************************************
939BOOL WIN32API SetRect( PRECT arg1, int arg2, int arg3, int arg4, int arg5)
940{
941#ifdef DEBUG
942 WriteLog("USER32: SetRect\n");
943#endif
944 return O32_SetRect(arg1, arg2, arg3, arg4, arg5);
945}
946//******************************************************************************
947//******************************************************************************
948LONG WIN32API GetWindowLongA(HWND hwnd, int nIndex)
949{
950 LONG rc;
951
952 if(nIndex == GWL_WNDPROC || nIndex == DWL_DLGPROC) {
953#ifdef DEBUG
954 WriteLog("USER32: GetWindowLong %X %d\n", hwnd, nIndex);
955#endif
956 Win32WindowProc *window = Win32WindowProc::FindProc(hwnd);
957 if(window && !(nIndex == DWL_DLGPROC && window->IsWindow() == TRUE)) {
958 return (LONG)window->GetWin32Callback();
959 }
960 }
961 rc = O32_GetWindowLong(hwnd, nIndex);
962 return(rc);
963}
964//******************************************************************************
965//******************************************************************************
966BOOL WIN32API SetDlgItemInt( HWND arg1, int arg2, UINT arg3, BOOL arg4)
967{
968#ifdef DEBUG
969 WriteLog("USER32: SetDlgItemInt\n");
970#endif
971 return O32_SetDlgItemInt(arg1, arg2, arg3, arg4);
972}
973//******************************************************************************
974//******************************************************************************
975BOOL WIN32API SetDlgItemTextA( HWND arg1, int arg2, LPCSTR arg3)
976{
977#ifdef DEBUG
978 WriteLog("USER32: SetDlgItemText to %s\n", arg3);
979#endif
980 return O32_SetDlgItemText(arg1, arg2, arg3);
981}
982//******************************************************************************
983//******************************************************************************
984BOOL WIN32API WinHelpA( HWND arg1, LPCSTR arg2, UINT arg3, DWORD arg4)
985{
986#ifdef DEBUG
987 WriteLog("USER32: WinHelp not implemented %s\n", arg2);
988#endif
989// return O32_WinHelp(arg1, arg2, arg3, arg4);
990 return(TRUE);
991}
992//******************************************************************************
993//******************************************************************************
994BOOL WIN32API IsIconic( HWND arg1)
995{
996#ifdef DEBUG
997 WriteLog("USER32: IsIconic\n");
998#endif
999 return O32_IsIconic(arg1);
1000}
1001//******************************************************************************
1002//******************************************************************************
1003int WIN32API TranslateAcceleratorA(HWND arg1, HACCEL arg2, LPMSG arg3)
1004{
1005#ifdef DEBUG
1006//// WriteLog("USER32: TranslateAccelerator\n");
1007#endif
1008 return O32_TranslateAccelerator(arg1, arg2, arg3);
1009}
1010//******************************************************************************
1011//******************************************************************************
1012HWND WIN32API GetWindow(HWND arg1, UINT arg2)
1013{
1014 HWND rc;
1015
1016 rc = O32_GetWindow(arg1, arg2);
1017#ifdef DEBUG
1018 WriteLog("USER32: GetWindow %X %d returned %d\n", arg1, arg2, rc);
1019#endif
1020 return(rc);
1021}
1022//******************************************************************************
1023//******************************************************************************
1024HDC WIN32API GetWindowDC(HWND arg1)
1025{
1026#ifdef DEBUG
1027 WriteLog("USER32: GetWindowDC\n");
1028#endif
1029 return O32_GetWindowDC(arg1);
1030}
1031//******************************************************************************
1032//******************************************************************************
1033BOOL WIN32API SubtractRect( PRECT arg1, const RECT * arg2, const RECT * arg3)
1034{
1035#ifdef DEBUG
1036 WriteLog("USER32: SubtractRect");
1037#endif
1038 return O32_SubtractRect(arg1, arg2, arg3);
1039}
1040//******************************************************************************
1041//SvL: 24-6-'97 - Added
1042//******************************************************************************
1043BOOL WIN32API ClipCursor(const RECT * arg1)
1044{
1045#ifdef DEBUG
1046 WriteLog("USER32: ClipCursor\n");
1047#endif
1048 return O32_ClipCursor(arg1);
1049}
1050//******************************************************************************
1051//SvL: 24-6-'97 - Added
1052//TODO: Not implemented
1053//******************************************************************************
1054WORD WIN32API GetAsyncKeyState(INT nVirtKey)
1055{
1056#ifdef DEBUG
1057//// WriteLog("USER32: GetAsyncKeyState Not implemented\n");
1058#endif
1059 return 0;
1060}
1061//******************************************************************************
1062//SvL: 24-6-'97 - Added
1063//******************************************************************************
1064HCURSOR WIN32API GetCursor(void)
1065{
1066#ifdef DEBUG
1067//// WriteLog("USER32: GetCursor\n");
1068#endif
1069 return O32_GetCursor();
1070}
1071//******************************************************************************
1072//SvL: 24-6-'97 - Added
1073//******************************************************************************
1074BOOL WIN32API GetCursorPos( PPOINT arg1)
1075{
1076#ifdef DEBUG
1077//// WriteLog("USER32: GetCursorPos\n");
1078#endif
1079 return O32_GetCursorPos(arg1);
1080}
1081//******************************************************************************
1082//SvL: 24-6-'97 - Added
1083//******************************************************************************
1084UINT WIN32API RegisterWindowMessageA(LPCSTR arg1)
1085{
1086 UINT rc;
1087
1088 rc = O32_RegisterWindowMessage(arg1);
1089#ifdef DEBUG
1090 WriteLog("USER32: RegisterWindowMessageA %s returned %X\n", arg1, rc);
1091#endif
1092 return(rc);
1093}
1094//******************************************************************************
1095//SvL: 24-6-'97 - Added
1096//******************************************************************************
1097WORD WIN32API VkKeyScanA( char arg1)
1098{
1099#ifdef DEBUG
1100 WriteLog("USER32: VkKeyScanA\n");
1101#endif
1102 return O32_VkKeyScan(arg1);
1103}
1104//******************************************************************************
1105//SvL: 24-6-'97 - Added
1106//******************************************************************************
1107SHORT WIN32API GetKeyState( int arg1)
1108{
1109#ifdef DEBUG
1110 WriteLog("USER32: GetKeyState %d\n", arg1);
1111#endif
1112 return O32_GetKeyState(arg1);
1113}
1114//******************************************************************************
1115//******************************************************************************
1116HCURSOR WIN32API SetCursor( HCURSOR arg1)
1117{
1118#ifdef DEBUG
1119 WriteLog("USER32: SetCursor\n");
1120#endif
1121 return O32_SetCursor(arg1);
1122}
1123//******************************************************************************
1124//******************************************************************************
1125BOOL WIN32API SetCursorPos( int arg1, int arg2)
1126{
1127#ifdef DEBUG
1128 WriteLog("USER32: SetCursorPos\n");
1129#endif
1130 return O32_SetCursorPos(arg1, arg2);
1131}
1132//******************************************************************************
1133//******************************************************************************
1134BOOL WIN32API EnableScrollBar( HWND arg1, INT arg2, UINT arg3)
1135{
1136#ifdef DEBUG
1137 WriteLog("USER32: EnableScrollBar\n");
1138#endif
1139 return O32_EnableScrollBar(arg1, arg2, arg3);
1140}
1141//******************************************************************************
1142//******************************************************************************
1143BOOL WIN32API EnableWindow( HWND arg1, BOOL arg2)
1144{
1145#ifdef DEBUG
1146 WriteLog("USER32: EnableWindow\n");
1147#endif
1148 return O32_EnableWindow(arg1, arg2);
1149}
1150//******************************************************************************
1151//******************************************************************************
1152HWND WIN32API SetCapture( HWND arg1)
1153{
1154#ifdef DEBUG
1155 WriteLog("USER32: SetCapture\n");
1156#endif
1157 return O32_SetCapture(arg1);
1158}
1159//******************************************************************************
1160//******************************************************************************
1161BOOL WIN32API ReleaseCapture(void)
1162{
1163#ifdef DEBUG
1164 WriteLog("USER32: ReleaseCapture\n");
1165#endif
1166 return O32_ReleaseCapture();
1167}
1168//******************************************************************************
1169//******************************************************************************
1170DWORD WIN32API MsgWaitForMultipleObjects( DWORD arg1, LPHANDLE arg2, BOOL arg3, DWORD arg4, DWORD arg5)
1171{
1172#ifdef DEBUG
1173 WriteLog("USER32: MsgWaitForMultipleObjects\n");
1174#endif
1175 return O32_MsgWaitForMultipleObjects(arg1, arg2, arg3, arg4, arg5);
1176}
1177//******************************************************************************
1178//******************************************************************************
1179HDWP WIN32API BeginDeferWindowPos( int arg1)
1180{
1181#ifdef DEBUG
1182 WriteLog("USER32: BeginDeferWindowPos\n");
1183#endif
1184 return O32_BeginDeferWindowPos(arg1);
1185}
1186//******************************************************************************
1187//******************************************************************************
1188BOOL WIN32API BringWindowToTop( HWND arg1)
1189{
1190#ifdef DEBUG
1191 WriteLog("USER32: BringWindowToTop\n");
1192#endif
1193 return O32_BringWindowToTop(arg1);
1194}
1195//******************************************************************************
1196//******************************************************************************
1197BOOL WIN32API CallMsgFilterA( LPMSG arg1, int arg2)
1198{
1199#ifdef DEBUG
1200 WriteLog("USER32: CallMsgFilterA\n");
1201#endif
1202 return O32_CallMsgFilter(arg1, arg2);
1203}
1204//******************************************************************************
1205//******************************************************************************
1206BOOL WIN32API CallMsgFilterW( LPMSG arg1, int arg2)
1207{
1208#ifdef DEBUG
1209 WriteLog("USER32: CallMsgFilterW\n");
1210#endif
1211 // NOTE: This will not work as is (needs UNICODE support)
1212 return O32_CallMsgFilter(arg1, arg2);
1213}
1214//******************************************************************************
1215//******************************************************************************
1216LRESULT WIN32API CallWindowProcA(WNDPROC wndprcPrev,
1217 HWND arg2,
1218 UINT arg3,
1219 WPARAM arg4,
1220 LPARAM arg5)
1221{
1222#ifdef DEBUG
1223//// WriteLog("USER32: CallWindowProcA %X hwnd=%X, msg = %X\n", wndprcPrev, arg2, arg3);
1224#endif
1225
1226 if(Win32WindowSubProc::FindSubProc((WNDPROC_O32)wndprcPrev) != NULL) {
1227 WNDPROC_O32 orgprc = (WNDPROC_O32)wndprcPrev; //is original Open32 system class callback (_System)
1228 return orgprc(arg2, arg3, arg4, arg5);
1229 }
1230 else return wndprcPrev(arg2, arg3, arg4, arg5); //win32 callback (__stdcall)
1231}
1232//******************************************************************************
1233//******************************************************************************
1234LRESULT WIN32API CallWindowProcW(WNDPROC arg1,
1235 HWND arg2,
1236 UINT arg3,
1237 WPARAM arg4,
1238 LPARAM arg5)
1239{
1240 dprintf(("USER32: CallWindowProcW(%08xh,%08xh,%08xh,%08xh,%08xh) not properly implemented.\n",
1241 arg1,
1242 arg2,
1243 arg3,
1244 arg4,
1245 arg5));
1246
1247 return CallWindowProcA(arg1,
1248 arg2,
1249 arg3,
1250 arg4,
1251 arg5);
1252}
1253//******************************************************************************
1254//******************************************************************************
1255BOOL WIN32API ChangeClipboardChain( HWND arg1, HWND arg2)
1256{
1257#ifdef DEBUG
1258 WriteLog("USER32: ChangeClipboardChain\n");
1259#endif
1260 return O32_ChangeClipboardChain(arg1, arg2);
1261}
1262//******************************************************************************
1263//******************************************************************************
1264UINT WIN32API ArrangeIconicWindows( HWND arg1)
1265{
1266#ifdef DEBUG
1267 WriteLog("USER32: ArrangeIconicWindows\n");
1268#endif
1269 return O32_ArrangeIconicWindows(arg1);
1270}
1271//******************************************************************************
1272// Not implemented by Open32 (5-31-99 Christoph Bratschi)
1273//******************************************************************************
1274BOOL WIN32API CheckRadioButton( HWND arg1, UINT arg2, UINT arg3, UINT arg4)
1275{
1276#ifdef DEBUG
1277 WriteLog("USER32: CheckRadioButton\n");
1278#endif
1279// return O32_CheckRadioButton(arg1, arg2, arg3, arg4);
1280 if (arg2 > arg3) return (FALSE);
1281 for (UINT x=arg2;x <= arg3;x++)
1282 {
1283 SendDlgItemMessageA(arg1,x,BM_SETCHECK,(x == arg4) ? BST_CHECKED : BST_UNCHECKED,0);
1284 }
1285 return (TRUE);
1286}
1287//******************************************************************************
1288//******************************************************************************
1289HWND WIN32API ChildWindowFromPoint( HWND arg1, POINT arg2)
1290{
1291#ifdef DEBUG
1292 WriteLog("USER32: ChildWindowFromPoint\n");
1293#endif
1294 return O32_ChildWindowFromPoint(arg1, arg2);
1295}
1296//******************************************************************************
1297//******************************************************************************
1298HWND WIN32API ChildWindowFromPointEx(HWND arg1, POINT arg2, UINT uFlags)
1299{
1300#ifdef DEBUG
1301 WriteLog("USER32: ChildWindowFromPointEx, not completely supported!\n");
1302#endif
1303 return O32_ChildWindowFromPoint(arg1, arg2);
1304}
1305//******************************************************************************
1306//******************************************************************************
1307BOOL WIN32API CloseClipboard(void)
1308{
1309#ifdef DEBUG
1310 WriteLog("USER32: CloseClipboard\n");
1311#endif
1312 return O32_CloseClipboard();
1313}
1314//******************************************************************************
1315//******************************************************************************
1316BOOL WIN32API CloseWindow( HWND arg1)
1317{
1318#ifdef DEBUG
1319 WriteLog("USER32: CloseWindow\n");
1320#endif
1321 return O32_CloseWindow(arg1);
1322}
1323//******************************************************************************
1324//******************************************************************************
1325HICON WIN32API CopyIcon( HICON arg1)
1326{
1327#ifdef DEBUG
1328 WriteLog("USER32: CopyIcon\n");
1329#endif
1330 return O32_CopyIcon(arg1);
1331}
1332//******************************************************************************
1333//******************************************************************************
1334int WIN32API CountClipboardFormats(void)
1335{
1336#ifdef DEBUG
1337 WriteLog("USER32: CountClipboardFormats\n");
1338#endif
1339 return O32_CountClipboardFormats();
1340}
1341//******************************************************************************
1342//******************************************************************************
1343HACCEL WIN32API CreateAcceleratorTableA( LPACCEL arg1, int arg2)
1344{
1345#ifdef DEBUG
1346 WriteLog("USER32: CreateAcceleratorTableA\n");
1347#endif
1348 return O32_CreateAcceleratorTable(arg1, arg2);
1349}
1350//******************************************************************************
1351//******************************************************************************
1352HACCEL WIN32API CreateAcceleratorTableW( LPACCEL arg1, int arg2)
1353{
1354#ifdef DEBUG
1355 WriteLog("USER32: CreateAcceleratorTableW\n");
1356#endif
1357 // NOTE: This will not work as is (needs UNICODE support)
1358 return O32_CreateAcceleratorTable(arg1, arg2);
1359}
1360//******************************************************************************
1361//******************************************************************************
1362BOOL WIN32API CreateCaret( HWND arg1, HBITMAP arg2, int arg3, int arg4)
1363{
1364#ifdef DEBUG
1365 WriteLog("USER32: CreateCaret\n");
1366#endif
1367 return O32_CreateCaret(arg1, arg2, arg3, arg4);
1368}
1369//******************************************************************************
1370//******************************************************************************
1371HCURSOR WIN32API CreateCursor( HINSTANCE arg1, int arg2, int arg3, int arg4, int arg5, const VOID * arg6, const VOID * arg7)
1372{
1373#ifdef DEBUG
1374 WriteLog("USER32: CreateCursor\n");
1375#endif
1376 return O32_CreateCursor(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
1377}
1378//******************************************************************************
1379//******************************************************************************
1380HICON WIN32API CreateIcon( HINSTANCE arg1, INT arg2, INT arg3, BYTE arg4, BYTE arg5, LPCVOID arg6, LPCVOID arg7)
1381{
1382#ifdef DEBUG
1383 WriteLog("USER32: CreateIcon\n");
1384#endif
1385 return O32_CreateIcon(arg1, arg2, arg3, arg4, arg5, (const BYTE *)arg6, (const BYTE *)arg7);
1386}
1387//******************************************************************************
1388//ASSERT dwVer == win31 (ok according to SDK docs)
1389//******************************************************************************
1390HICON WIN32API CreateIconFromResource(PBYTE presbits, UINT dwResSize,
1391 BOOL fIcon, DWORD dwVer)
1392{
1393 HICON hicon;
1394 DWORD OS2ResSize = 0;
1395 PBYTE OS2Icon = ConvertWin32Icon(presbits, dwResSize, &OS2ResSize);
1396
1397 hicon = O32_CreateIconFromResource(OS2Icon, OS2ResSize, fIcon, dwVer);
1398#ifdef DEBUG
1399 WriteLog("USER32: CreateIconFromResource returned %X (%X)\n", hicon, GetLastError());
1400#endif
1401 if(OS2Icon)
1402 FreeIcon(OS2Icon);
1403
1404 return(hicon);
1405}
1406//******************************************************************************
1407//******************************************************************************
1408HICON WIN32API CreateIconFromResourceEx(PBYTE presbits, UINT dwResSize,
1409 BOOL fIcon, DWORD dwVer,
1410 int cxDesired, int cyDesired,
1411 UINT Flags)
1412{
1413#ifdef DEBUG
1414 WriteLog("USER32: CreateIconFromResourceEx %X %d %d %X %d %d %X, not completely supported!\n", presbits, dwResSize, fIcon, dwVer, cxDesired, cyDesired, Flags);
1415#endif
1416 return CreateIconFromResource(presbits, dwResSize, fIcon, dwVer);
1417}
1418//******************************************************************************
1419//******************************************************************************
1420HICON WIN32API CreateIconIndirect(LPICONINFO arg1)
1421{
1422#ifdef DEBUG
1423 WriteLog("USER32: CreateIconIndirect\n");
1424#endif
1425 return O32_CreateIconIndirect(arg1);
1426}
1427//******************************************************************************
1428//******************************************************************************
1429HWND WIN32API CreateMDIWindowA(LPCSTR arg1, LPCSTR arg2, DWORD arg3,
1430 int arg4, int arg5, int arg6, int arg7,
1431 HWND arg8, HINSTANCE arg9, LPARAM arg10)
1432{
1433 HWND hwnd;
1434
1435#ifdef DEBUG
1436 WriteLog("USER32: CreateMDIWindowA\n");
1437#endif
1438 Win32WindowProc *window = new Win32WindowProc(arg9, arg1);
1439 hwnd = O32_CreateMDIWindow((LPSTR)arg1, (LPSTR)arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
1440 //SvL: 16-11-'97: window can be already destroyed if hwnd == 0
1441 if(hwnd == 0 && window != 0 && Win32WindowProc::FindWindowProc(window)) {
1442 delete(window);
1443 window = 0;
1444 }
1445
1446#ifdef DEBUG
1447 WriteLog("USER32: CreateMDIWindowA returned %X\n", hwnd);
1448#endif
1449 return hwnd;
1450}
1451//******************************************************************************
1452//******************************************************************************
1453HWND WIN32API CreateMDIWindowW(LPCWSTR arg1, LPCWSTR arg2, DWORD arg3, int arg4,
1454 int arg5, int arg6, int arg7, HWND arg8, HINSTANCE arg9,
1455 LPARAM arg10)
1456{
1457 HWND hwnd;
1458 char *astring1 = NULL, *astring2 = NULL;
1459 Win32WindowProc *window = NULL;
1460
1461 if((int)arg1 >> 16 != 0) {
1462 astring1 = UnicodeToAsciiString((LPWSTR)arg1);
1463 }
1464 else astring1 = (char *)arg2;
1465
1466 astring2 = UnicodeToAsciiString((LPWSTR)arg2);
1467
1468 //Classname might be name of system class, in which case we don't
1469 //need to use our own callback
1470// if(Win32WindowClass::FindClass((LPSTR)astring1) != NULL) {
1471 window = new Win32WindowProc(arg9, astring1);
1472// }
1473 hwnd = O32_CreateMDIWindow(astring1, astring2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
1474 //SvL: 16-11-'97: window can be already destroyed if hwnd == 0
1475 if(hwnd == 0 && window != 0 && Win32WindowProc::FindWindowProc(window)) {
1476 delete(window);
1477 window = 0;
1478 }
1479 if(window) {
1480 window->SetWindowHandle(hwnd);
1481 }
1482
1483 if(astring1) FreeAsciiString(astring1);
1484 FreeAsciiString(astring2);
1485#ifdef DEBUG
1486 WriteLog("USER32: CreateMDIWindowW hwnd = %X\n", hwnd);
1487#endif
1488 return(hwnd);
1489}
1490//******************************************************************************
1491//******************************************************************************
1492HWND WIN32API CreateWindowExW(DWORD arg1,
1493 LPCWSTR arg2,
1494 LPCWSTR arg3,
1495 DWORD dwStyle,
1496 int arg5,
1497 int arg6,
1498 int arg7,
1499 int arg8,
1500 HWND arg9,
1501 HMENU arg10,
1502 HINSTANCE arg11,
1503 PVOID arg12)
1504{
1505 HWND hwnd;
1506 char *astring1 = NULL,
1507 *astring2 = NULL;
1508 Win32WindowProc *window = NULL;
1509
1510 /* @@@PH 98/06/21 changed to call OS2CreateWindowExA */
1511 if((int)arg2 >> 16 != 0)
1512 astring1 = UnicodeToAsciiString((LPWSTR)arg2);
1513 else
1514 astring1 = (char *)arg2;
1515
1516 astring2 = UnicodeToAsciiString((LPWSTR)arg3);
1517
1518#ifdef DEBUG
1519 WriteLog("USER32: CreateWindowExW: dwExStyle = %X\n", arg1);
1520 if((int)arg2 >> 16 != 0)
1521 WriteLog("USER32: CreateWindow: classname = %s\n", astring1);
1522 else WriteLog("USER32: CreateWindow: classname = %X\n", arg2);
1523 WriteLog("USER32: CreateWindow: windowname= %s\n", astring2);
1524 WriteLog("USER32: CreateWindow: dwStyle = %X\n", dwStyle);
1525 WriteLog("USER32: CreateWindow: x = %d\n", arg5);
1526 WriteLog("USER32: CreateWindow: y = %d\n", arg6);
1527 WriteLog("USER32: CreateWindow: nWidth = %d\n", arg7);
1528 WriteLog("USER32: CreateWindow: nHeight = %d\n", arg8);
1529 WriteLog("USER32: CreateWindow: parent = %X\n", arg9);
1530 WriteLog("USER32: CreateWindow: hwmenu = %X\n", arg10);
1531 WriteLog("USER32: CreateWindow: hinstance = %X\n", arg11);
1532 WriteLog("USER32: CreateWindow: param = %X\n", arg12);
1533 #endif
1534
1535 hwnd = CreateWindowExA(arg1,
1536 astring1,
1537 astring2,
1538 dwStyle,
1539 arg5,
1540 arg6,
1541 arg7,
1542 arg8,
1543 arg9,
1544 arg10,
1545 arg11,
1546 arg12);
1547
1548 if(astring1)
1549 FreeAsciiString(astring1);
1550
1551 FreeAsciiString(astring2);
1552
1553#ifdef DEBUG
1554 WriteLog("USER32: ************CreateWindowExW hwnd = %X (%X)\n", hwnd, GetLastError());
1555#endif
1556 return(hwnd);
1557}
1558//******************************************************************************
1559//******************************************************************************
1560HDWP WIN32API DeferWindowPos( HDWP arg1, HWND arg2, HWND arg3, int arg4, int arg5, int arg6, int arg7, UINT arg8)
1561{
1562#ifdef DEBUG
1563 WriteLog("USER32: DeferWindowPos\n");
1564#endif
1565 return O32_DeferWindowPos(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
1566}
1567//******************************************************************************
1568//******************************************************************************
1569BOOL WIN32API DestroyAcceleratorTable( HACCEL arg1)
1570{
1571#ifdef DEBUG
1572 WriteLog("USER32: DestroyAcceleratorTable\n");
1573#endif
1574 return O32_DestroyAcceleratorTable(arg1);
1575}
1576//******************************************************************************
1577//******************************************************************************
1578BOOL WIN32API DestroyCaret(void)
1579{
1580#ifdef DEBUG
1581 WriteLog("USER32: DestroyCaret\n");
1582#endif
1583 return O32_DestroyCaret();
1584}
1585//******************************************************************************
1586//******************************************************************************
1587BOOL WIN32API DestroyCursor( HCURSOR arg1)
1588{
1589#ifdef DEBUG
1590 WriteLog("USER32: DestroyCursor\n");
1591#endif
1592 return O32_DestroyCursor(arg1);
1593}
1594//******************************************************************************
1595//******************************************************************************
1596BOOL WIN32API DestroyIcon( HICON arg1)
1597{
1598#ifdef DEBUG
1599 WriteLog("USER32: DestroyIcon\n");
1600#endif
1601 return O32_DestroyIcon(arg1);
1602}
1603//******************************************************************************
1604//******************************************************************************
1605LONG WIN32API DispatchMessageW( const MSG * arg1)
1606{
1607#ifdef DEBUG
1608 WriteLog("USER32: DispatchMessageW\n");
1609#endif
1610 // NOTE: This will not work as is (needs UNICODE support)
1611 return O32_DispatchMessage(arg1);
1612}
1613//******************************************************************************
1614//******************************************************************************
1615int WIN32API DlgDirListA( HWND arg1, LPSTR arg2, int arg3, int arg4, UINT arg5)
1616{
1617#ifdef DEBUG
1618 WriteLog("USER32: DlgDirListA\n");
1619#endif
1620 return O32_DlgDirList(arg1, arg2, arg3, arg4, arg5);
1621}
1622//******************************************************************************
1623//******************************************************************************
1624int WIN32API DlgDirListComboBoxA( HWND arg1, LPSTR arg2, int arg3, int arg4, UINT arg5)
1625{
1626#ifdef DEBUG
1627 WriteLog("USER32: DlgDirListComboBoxA\n");
1628#endif
1629 return O32_DlgDirListComboBox(arg1, arg2, arg3, arg4, arg5);
1630}
1631//******************************************************************************
1632//******************************************************************************
1633int WIN32API DlgDirListComboBoxW( HWND arg1, LPWSTR arg2, int arg3, int arg4, UINT arg5)
1634{
1635#ifdef DEBUG
1636 WriteLog("USER32: DlgDirListComboBoxW NOT WORKING\n");
1637#endif
1638 // NOTE: This will not work as is (needs UNICODE support)
1639 return 0;
1640// return O32_DlgDirListComboBox(arg1, arg2, arg3, arg4, arg5);
1641}
1642//******************************************************************************
1643//******************************************************************************
1644int WIN32API DlgDirListW( HWND arg1, LPWSTR arg2, int arg3, int arg4, UINT arg5)
1645{
1646#ifdef DEBUG
1647 WriteLog("USER32: DlgDirListW NOT WORKING\n");
1648#endif
1649 // NOTE: This will not work as is (needs UNICODE support)
1650 return 0;
1651// return O32_DlgDirList(arg1, arg2, arg3, arg4, arg5);
1652}
1653//******************************************************************************
1654//******************************************************************************
1655BOOL WIN32API DlgDirSelectComboBoxExA( HWND arg1, LPSTR arg2, int arg3, int arg4)
1656{
1657#ifdef DEBUG
1658 WriteLog("USER32: DlgDirSelectComboBoxExA\n");
1659#endif
1660 return O32_DlgDirSelectComboBoxEx(arg1, arg2, arg3, arg4);
1661}
1662//******************************************************************************
1663//******************************************************************************
1664BOOL WIN32API DlgDirSelectComboBoxExW( HWND arg1, LPWSTR arg2, int arg3, int arg4)
1665{
1666#ifdef DEBUG
1667 WriteLog("USER32: DlgDirSelectComboBoxExW NOT WORKING\n");
1668#endif
1669 // NOTE: This will not work as is (needs UNICODE support)
1670 return 0;
1671// return O32_DlgDirSelectComboBoxEx(arg1, arg2, arg3, arg4);
1672}
1673//******************************************************************************
1674//******************************************************************************
1675BOOL WIN32API DlgDirSelectExA( HWND arg1, LPSTR arg2, int arg3, int arg4)
1676{
1677#ifdef DEBUG
1678 WriteLog("USER32: DlgDirSelectExA\n");
1679#endif
1680 return O32_DlgDirSelectEx(arg1, arg2, arg3, arg4);
1681}
1682//******************************************************************************
1683//******************************************************************************
1684BOOL WIN32API DlgDirSelectExW( HWND arg1, LPWSTR arg2, int arg3, int arg4)
1685{
1686#ifdef DEBUG
1687 WriteLog("USER32: DlgDirSelectExW NOT WORKING\n");
1688#endif
1689 // NOTE: This will not work as is (needs UNICODE support)
1690 return 0;
1691// return O32_DlgDirSelectEx(arg1, arg2, arg3, arg4);
1692}
1693//******************************************************************************
1694//******************************************************************************
1695BOOL WIN32API DrawFocusRect( HDC arg1, const RECT * arg2)
1696{
1697#ifdef DEBUG
1698 WriteLog("USER32: DrawFocusRect\n");
1699#endif
1700 return O32_DrawFocusRect(arg1, arg2);
1701}
1702//******************************************************************************
1703//******************************************************************************
1704BOOL WIN32API DrawIcon( HDC arg1, int arg2, int arg3, HICON arg4)
1705{
1706#ifdef DEBUG
1707 WriteLog("USER32: DrawIcon\n");
1708#endif
1709 return O32_DrawIcon(arg1, arg2, arg3, arg4);
1710}
1711//******************************************************************************
1712//******************************************************************************
1713BOOL WIN32API DrawIconEx(HDC hdc, int xLeft, int xRight, HICON hIcon,
1714 int cxWidth, int cyWidth, UINT istepIfAniCur,
1715 HBRUSH hbrFlickerFreeDraw, UINT diFlags)
1716{
1717#ifdef DEBUG
1718 WriteLog("USER32: DrawIcon, partially implemented\n");
1719#endif
1720 return O32_DrawIcon(hdc, xLeft, xRight, hIcon);
1721}
1722//******************************************************************************
1723//******************************************************************************
1724BOOL WIN32API DrawMenuBar( HWND arg1)
1725{
1726#ifdef DEBUG
1727 WriteLog("USER32: DrawMenuBar\n");
1728#endif
1729 return O32_DrawMenuBar(arg1);
1730}
1731//******************************************************************************
1732//******************************************************************************
1733int WIN32API DrawTextW( HDC arg1, LPCWSTR arg2, int arg3, PRECT arg4, UINT arg5)
1734{
1735 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
1736 int rc;
1737
1738#ifdef DEBUG
1739 WriteLog("USER32: DrawTextW %s\n", astring);
1740#endif
1741 rc = O32_DrawText(arg1, astring, arg3, arg4, arg5);
1742 FreeAsciiString(astring);
1743 return(rc);
1744}
1745//******************************************************************************
1746//******************************************************************************
1747int WIN32API DrawTextExW(HDC arg1, LPCWSTR arg2, int arg3, PRECT arg4, UINT arg5, LPDRAWTEXTPARAMS lpDTParams)
1748{
1749 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
1750 int rc;
1751
1752#ifdef DEBUG
1753 WriteLog("USER32: DrawTextExW (not completely supported) %s\n", astring);
1754#endif
1755 rc = O32_DrawText(arg1, astring, arg3, arg4, arg5);
1756 FreeAsciiString(astring);
1757 return(rc);
1758}
1759//******************************************************************************
1760//******************************************************************************
1761BOOL WIN32API EmptyClipboard(void)
1762{
1763#ifdef DEBUG
1764 WriteLog("USER32: EmptyClipboard\n");
1765#endif
1766 return O32_EmptyClipboard();
1767}
1768//******************************************************************************
1769//******************************************************************************
1770BOOL WIN32API EndDeferWindowPos( HDWP arg1)
1771{
1772#ifdef DEBUG
1773 WriteLog("USER32: EndDeferWindowPos\n");
1774#endif
1775 return O32_EndDeferWindowPos(arg1);
1776}
1777//******************************************************************************
1778//******************************************************************************
1779BOOL WIN32API EnumChildWindows(HWND hwnd, WNDENUMPROC lpfn, LPARAM lParam)
1780{
1781 BOOL rc;
1782 EnumWindowCallback *callback = new EnumWindowCallback(lpfn, lParam);
1783
1784#ifdef DEBUG
1785 WriteLog("USER32: EnumChildWindows\n");
1786#endif
1787 rc = O32_EnumChildWindows(hwnd, callback->GetOS2Callback(), (LPARAM)callback);
1788 if(callback)
1789 delete callback;
1790 return(rc);
1791}
1792//******************************************************************************
1793//******************************************************************************
1794UINT WIN32API EnumClipboardFormats(UINT arg1)
1795{
1796#ifdef DEBUG
1797 WriteLog("USER32: EnumClipboardFormats\n");
1798#endif
1799 return O32_EnumClipboardFormats(arg1);
1800}
1801//******************************************************************************
1802//******************************************************************************
1803int WIN32API EnumPropsA(HWND arg1, PROPENUMPROCA arg2)
1804{
1805#ifdef DEBUG
1806 WriteLog("USER32: EnumPropsA DOES NOT WORK\n");
1807#endif
1808 //calling convention problems
1809 return 0;
1810// return O32_EnumProps(arg1, (PROPENUMPROC_O32)arg2);
1811}
1812//******************************************************************************
1813//******************************************************************************
1814int WIN32API EnumPropsExA( HWND arg1, PROPENUMPROCEXA arg2, LPARAM arg3)
1815{
1816#ifdef DEBUG
1817 WriteLog("USER32: EnumPropsExA DOES NOT WORK\n");
1818#endif
1819 //calling convention problems
1820 return 0;
1821// return O32_EnumPropsEx(arg1, arg2, (PROPENUMPROCEX_O32)arg3);
1822}
1823//******************************************************************************
1824//******************************************************************************
1825int WIN32API EnumPropsExW( HWND arg1, PROPENUMPROCEXW arg2, LPARAM arg3)
1826{
1827#ifdef DEBUG
1828 WriteLog("USER32: EnumPropsExW\n");
1829#endif
1830 // NOTE: This will not work as is (needs UNICODE support)
1831 //calling convention problems
1832 return 0;
1833// return O32_EnumPropsEx(arg1, arg2, arg3);
1834}
1835//******************************************************************************
1836//******************************************************************************
1837int WIN32API EnumPropsW( HWND arg1, PROPENUMPROCW arg2)
1838{
1839#ifdef DEBUG
1840 WriteLog("USER32: EnumPropsW\n");
1841#endif
1842 // NOTE: This will not work as is (needs UNICODE support)
1843 //calling convention problems
1844 return 0;
1845// return O32_EnumProps(arg1, arg2);
1846}
1847//******************************************************************************
1848//******************************************************************************
1849BOOL WIN32API EnumWindows(WNDENUMPROC lpfn, LPARAM lParam)
1850{
1851 BOOL rc;
1852 EnumWindowCallback *callback = new EnumWindowCallback(lpfn, lParam);
1853
1854#ifdef DEBUG
1855 WriteLog("USER32: EnumWindows\n");
1856#endif
1857 rc = O32_EnumWindows(callback->GetOS2Callback(), (LPARAM)callback);
1858 if(callback)
1859 delete callback;
1860 return(rc);
1861}
1862//******************************************************************************
1863//******************************************************************************
1864BOOL WIN32API EqualRect( const RECT * arg1, const RECT * arg2)
1865{
1866#ifdef DEBUG
1867 WriteLog("USER32: EqualRect\n");
1868#endif
1869 return O32_EqualRect(arg1, arg2);
1870}
1871//******************************************************************************
1872//******************************************************************************
1873BOOL WIN32API ExcludeUpdateRgn( HDC arg1, HWND arg2)
1874{
1875#ifdef DEBUG
1876 WriteLog("USER32: ExcludeUpdateRgn\n");
1877#endif
1878 return O32_ExcludeUpdateRgn(arg1, arg2);
1879}
1880//******************************************************************************
1881//******************************************************************************
1882BOOL WIN32API ExitWindowsEx( UINT arg1, DWORD arg2)
1883{
1884#ifdef DEBUG
1885 WriteLog("USER32: ExitWindowsEx\n");
1886#endif
1887 return O32_ExitWindowsEx(arg1, arg2);
1888}
1889//******************************************************************************
1890//******************************************************************************
1891int WIN32API FillRect(HDC arg1, const RECT * arg2, HBRUSH arg3)
1892{
1893#ifdef DEBUG
1894 WriteLog("USER32: FillRect (%d,%d)(%d,%d) brush %X\n", arg2->left, arg2->top, arg2->right, arg2->bottom, arg3);
1895#endif
1896 return O32_FillRect(arg1, arg2, arg3);
1897}
1898//******************************************************************************
1899//******************************************************************************
1900HWND WIN32API FindWindowW( LPCWSTR arg1, LPCWSTR arg2)
1901{
1902 char *astring1 = UnicodeToAsciiString((LPWSTR)arg1);
1903 char *astring2 = UnicodeToAsciiString((LPWSTR)arg2);
1904 HWND rc;
1905
1906#ifdef DEBUG
1907 WriteLog("USER32: FindWindowW\n");
1908#endif
1909 rc = O32_FindWindow(astring1, astring2);
1910 FreeAsciiString(astring1);
1911 FreeAsciiString(astring2);
1912 return rc;
1913}
1914//******************************************************************************
1915//******************************************************************************
1916int WIN32API FrameRect( HDC arg1, const RECT * arg2, HBRUSH arg3)
1917{
1918#ifdef DEBUG
1919 WriteLog("USER32: FrameRect\n");
1920#endif
1921 return O32_FrameRect(arg1, arg2, arg3);
1922}
1923//******************************************************************************
1924//******************************************************************************
1925HWND WIN32API GetCapture(void)
1926{
1927#ifdef DEBUG
1928 WriteLog("USER32: GetCapture\n");
1929#endif
1930 return O32_GetCapture();
1931}
1932//******************************************************************************
1933//******************************************************************************
1934UINT WIN32API GetCaretBlinkTime(void)
1935{
1936#ifdef DEBUG
1937 WriteLog("USER32: GetCaretBlinkTime\n");
1938#endif
1939 return O32_GetCaretBlinkTime();
1940}
1941//******************************************************************************
1942//******************************************************************************
1943BOOL WIN32API GetCaretPos( PPOINT arg1)
1944{
1945#ifdef DEBUG
1946 WriteLog("USER32: GetCaretPos\n");
1947#endif
1948 return O32_GetCaretPos(arg1);
1949}
1950//******************************************************************************
1951//******************************************************************************
1952BOOL WIN32API GetClipCursor( PRECT arg1)
1953{
1954#ifdef DEBUG
1955 WriteLog("USER32: GetClipCursor\n");
1956#endif
1957 return O32_GetClipCursor(arg1);
1958}
1959//******************************************************************************
1960//******************************************************************************
1961HANDLE WIN32API GetClipboardData( UINT arg1)
1962{
1963#ifdef DEBUG
1964 WriteLog("USER32: GetClipboardData\n");
1965#endif
1966 return O32_GetClipboardData(arg1);
1967}
1968//******************************************************************************
1969//******************************************************************************
1970int WIN32API GetClipboardFormatNameA( UINT arg1, LPSTR arg2, int arg3)
1971{
1972#ifdef DEBUG
1973 WriteLog("USER32: GetClipboardFormatNameA %s\n", arg2);
1974#endif
1975 return O32_GetClipboardFormatName(arg1, arg2, arg3);
1976}
1977//******************************************************************************
1978//******************************************************************************
1979int WIN32API GetClipboardFormatNameW(UINT arg1, LPWSTR arg2, int arg3)
1980{
1981 int rc;
1982 char *astring = UnicodeToAsciiString(arg2);
1983
1984#ifdef DEBUG
1985 WriteLog("USER32: GetClipboardFormatNameW %s\n", astring);
1986#endif
1987 rc = O32_GetClipboardFormatName(arg1, astring, arg3);
1988 FreeAsciiString(astring);
1989 return(rc);
1990}
1991//******************************************************************************
1992//******************************************************************************
1993HWND WIN32API GetClipboardOwner(void)
1994{
1995#ifdef DEBUG
1996 WriteLog("USER32: GetClipboardOwner\n");
1997#endif
1998 return O32_GetClipboardOwner();
1999}
2000//******************************************************************************
2001//******************************************************************************
2002HWND WIN32API GetClipboardViewer(void)
2003{
2004#ifdef DEBUG
2005 WriteLog("USER32: GetClipboardViewer\n");
2006#endif
2007 return O32_GetClipboardViewer();
2008}
2009//******************************************************************************
2010//******************************************************************************
2011DWORD WIN32API GetDialogBaseUnits(void)
2012{
2013#ifdef DEBUG
2014 WriteLog("USER32: GetDialogBaseUnits\n");
2015#endif
2016 return O32_GetDialogBaseUnits();
2017}
2018//******************************************************************************
2019//******************************************************************************
2020UINT WIN32API GetDlgItemInt( HWND arg1, int arg2, PBOOL arg3, BOOL arg4)
2021{
2022#ifdef DEBUG
2023 WriteLog("USER32: GetDlgItemInt\n");
2024#endif
2025 return O32_GetDlgItemInt(arg1, arg2, arg3, arg4);
2026}
2027
2028
2029/*****************************************************************************
2030 * Name : UINT WIN32API GetDlgItemTextW
2031 * Purpose : Determine the text of a window control
2032 * Parameters: HWND arg1
2033 * int arg2
2034 * LPWSTR arg3
2035 * UINT arg4
2036 * Variables :
2037 * Result :
2038 * Remark :
2039 * Status : UNTESTED UNKNOWN STUB
2040 *
2041 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2042 *****************************************************************************/
2043
2044UINT WIN32API GetDlgItemTextW(HWND arg1,
2045 int arg2,
2046 LPWSTR arg3,
2047 UINT arg4)
2048{
2049 LPSTR lpBuffer; /* temporary buffer for the ascii result */
2050 UINT uiResult; /* return value of the ascii variant */
2051
2052 dprintf(("USER32: GetDlgItemTextW(%08xh,%08xh,%08xh,%08xh)\n",
2053 arg1,
2054 arg2,
2055 arg3,
2056 arg4));
2057
2058
2059 lpBuffer = (LPSTR)malloc(arg4); /* allocate temporary buffer */
2060 uiResult = GetDlgItemTextA(arg1, /* call ascii variant */
2061 arg2,
2062 lpBuffer,
2063 arg4);
2064
2065 AsciiToUnicodeN(lpBuffer, /* now convert result to unicode */
2066 arg3,
2067 arg4);
2068
2069 free(lpBuffer); /* free the temporary buffer */
2070
2071 return (uiResult); /* OK, that's it */
2072}
2073
2074
2075//******************************************************************************
2076//******************************************************************************
2077UINT WIN32API GetDoubleClickTime(void)
2078{
2079#ifdef DEBUG
2080 WriteLog("USER32: GetDoubleClickTime\n");
2081#endif
2082 return O32_GetDoubleClickTime();
2083}
2084//******************************************************************************
2085//******************************************************************************
2086HWND WIN32API GetForegroundWindow(void)
2087{
2088#ifdef DEBUG
2089 WriteLog("USER32: GetForegroundWindow\n");
2090#endif
2091 return O32_GetForegroundWindow();
2092}
2093//******************************************************************************
2094//******************************************************************************
2095BOOL WIN32API GetIconInfo( HICON arg1, LPICONINFO arg2)
2096{
2097#ifdef DEBUG
2098 WriteLog("USER32: GetIconInfo\n");
2099#endif
2100 return O32_GetIconInfo(arg1, arg2);
2101}
2102//******************************************************************************
2103//******************************************************************************
2104int WIN32API GetKeyNameTextA( LPARAM arg1, LPSTR arg2, int arg3)
2105{
2106#ifdef DEBUG
2107 WriteLog("USER32: GetKeyNameTextA\n");
2108#endif
2109 return O32_GetKeyNameText(arg1, arg2, arg3);
2110}
2111//******************************************************************************
2112//******************************************************************************
2113int WIN32API GetKeyNameTextW( LPARAM arg1, LPWSTR arg2, int arg3)
2114{
2115#ifdef DEBUG
2116 WriteLog("USER32: GetKeyNameTextW DOES NOT WORK\n");
2117#endif
2118 // NOTE: This will not work as is (needs UNICODE support)
2119 return 0;
2120// return O32_GetKeyNameText(arg1, arg2, arg3);
2121}
2122//******************************************************************************
2123//******************************************************************************
2124int WIN32API GetKeyboardType( int arg1)
2125{
2126#ifdef DEBUG
2127 WriteLog("USER32: GetKeyboardType\n");
2128#endif
2129 return O32_GetKeyboardType(arg1);
2130}
2131//******************************************************************************
2132//******************************************************************************
2133HWND WIN32API GetLastActivePopup( HWND arg1)
2134{
2135#ifdef DEBUG
2136 WriteLog("USER32: GetLastActivePopup\n");
2137#endif
2138 return O32_GetLastActivePopup(arg1);
2139}
2140//******************************************************************************
2141//******************************************************************************
2142LONG WIN32API GetMessageExtraInfo(void)
2143{
2144 dprintf(("USER32: GetMessageExtraInfo\n"));
2145 return O32_GetMessageExtraInfo();
2146}
2147//******************************************************************************
2148//******************************************************************************
2149DWORD WIN32API GetMessagePos(void)
2150{
2151 dprintf(("USER32: GetMessagePos\n"));
2152 return O32_GetMessagePos();
2153}
2154//******************************************************************************
2155//******************************************************************************
2156LONG WIN32API GetMessageTime(void)
2157{
2158 dprintf(("USER32: GetMessageTime\n"));
2159 return O32_GetMessageTime();
2160}
2161//******************************************************************************
2162//******************************************************************************
2163BOOL WIN32API GetMessageW(LPMSG arg1, HWND arg2, UINT arg3, UINT arg4)
2164{
2165 BOOL rc;
2166
2167 // NOTE: This will not work as is (needs UNICODE support)
2168 rc = O32_GetMessage(arg1, arg2, arg3, arg4);
2169 dprintf(("USER32: GetMessageW %X returned %d\n", arg2, rc));
2170 return(rc);
2171}
2172//******************************************************************************
2173//******************************************************************************
2174HWND WIN32API GetNextDlgGroupItem( HWND arg1, HWND arg2, BOOL arg3)
2175{
2176#ifdef DEBUG
2177 WriteLog("USER32: GetNextDlgGroupItem\n");
2178#endif
2179 return O32_GetNextDlgGroupItem(arg1, arg2, arg3);
2180}
2181//******************************************************************************
2182//******************************************************************************
2183HWND WIN32API GetOpenClipboardWindow(void)
2184{
2185#ifdef DEBUG
2186 WriteLog("USER32: GetOpenClipboardWindow\n");
2187#endif
2188 return O32_GetOpenClipboardWindow();
2189}
2190//******************************************************************************
2191//******************************************************************************
2192HWND WIN32API GetParent( HWND arg1)
2193{
2194#ifdef DEBUG
2195//// WriteLog("USER32: GetParent\n");
2196#endif
2197 return O32_GetParent(arg1);
2198}
2199//******************************************************************************
2200//******************************************************************************
2201int WIN32API GetPriorityClipboardFormat( PUINT arg1, int arg2)
2202{
2203#ifdef DEBUG
2204 WriteLog("USER32: GetPriorityClipboardFormat\n");
2205#endif
2206 return O32_GetPriorityClipboardFormat(arg1, arg2);
2207}
2208//******************************************************************************
2209//******************************************************************************
2210HANDLE WIN32API GetPropA( HWND arg1, LPCSTR arg2)
2211{
2212#ifdef DEBUG
2213 if((int)arg2 >> 16 != 0)
2214 WriteLog("USER32: GetPropA %s\n", arg2);
2215 else WriteLog("USER32: GetPropA %X\n", arg2);
2216#endif
2217 return O32_GetProp(arg1, arg2);
2218}
2219//******************************************************************************
2220//******************************************************************************
2221HANDLE WIN32API GetPropW(HWND arg1, LPCWSTR arg2)
2222{
2223 BOOL handle;
2224 char *astring;
2225
2226 if((int)arg2 >> 16 != 0)
2227 astring = UnicodeToAsciiString((LPWSTR)arg2);
2228 else astring = (char *)arg2;
2229#ifdef DEBUG
2230 if((int)arg2 >> 16 != 0)
2231 WriteLog("USER32: GetPropW %s\n", astring);
2232 else WriteLog("USER32: GetPropW %X\n", astring);
2233#endif
2234 handle = GetPropA(arg1, (LPCSTR)astring);
2235 if((int)arg2 >> 16 != 0)
2236 FreeAsciiString(astring);
2237
2238 return(handle);
2239}
2240//******************************************************************************
2241//******************************************************************************
2242DWORD WIN32API GetQueueStatus( UINT arg1)
2243{
2244#ifdef DEBUG
2245 WriteLog("USER32: GetQueueStatus\n");
2246#endif
2247 return O32_GetQueueStatus(arg1);
2248}
2249//******************************************************************************
2250//******************************************************************************
2251int WIN32API GetScrollPos(HWND hwnd, int fnBar)
2252{
2253 int pos;
2254
2255 pos = O32_GetScrollPos(hwnd, fnBar);
2256#ifdef DEBUG
2257 WriteLog("USER32: GetScrollPos of %X type %d returned %d\n", hwnd, fnBar, pos);
2258#endif
2259 return(pos);
2260}
2261//******************************************************************************
2262//******************************************************************************
2263BOOL WIN32API GetScrollRange( HWND arg1, int arg2, int * arg3, int * arg4)
2264{
2265#ifdef DEBUG
2266 WriteLog("USER32: GetScrollRange\n");
2267#endif
2268 return O32_GetScrollRange(arg1, arg2, arg3, arg4);
2269}
2270//******************************************************************************
2271//******************************************************************************
2272DWORD WIN32API GetTabbedTextExtentA( HDC arg1, LPCSTR arg2, int arg3, int arg4, int * arg5)
2273{
2274#ifdef DEBUG
2275 WriteLog("USER32: GetTabbedTextExtentA\n");
2276#endif
2277 return O32_GetTabbedTextExtent(arg1, arg2, arg3, arg4, arg5);
2278}
2279//******************************************************************************
2280//******************************************************************************
2281DWORD WIN32API GetTabbedTextExtentW( HDC arg1, LPCWSTR arg2, int arg3, int arg4, int * arg5)
2282{
2283 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
2284 DWORD rc;
2285
2286#ifdef DEBUG
2287 WriteLog("USER32: GetTabbedTextExtentW\n");
2288#endif
2289 rc = O32_GetTabbedTextExtent(arg1, astring, arg3, arg4, arg5);
2290 FreeAsciiString(astring);
2291 return rc;
2292}
2293//******************************************************************************
2294//******************************************************************************
2295HWND WIN32API GetTopWindow( HWND arg1)
2296{
2297#ifdef DEBUG
2298//// WriteLog("USER32: GetTopWindow\n");
2299#endif
2300 return O32_GetTopWindow(arg1);
2301}
2302//******************************************************************************
2303//******************************************************************************
2304int WIN32API GetUpdateRgn( HWND arg1, HRGN arg2, BOOL arg3)
2305{
2306#ifdef DEBUG
2307 WriteLog("USER32: GetUpdateRgn\n");
2308#endif
2309 return O32_GetUpdateRgn(arg1, arg2, arg3);
2310}
2311//******************************************************************************
2312//******************************************************************************
2313LONG WIN32API GetWindowLongW( HWND arg1, int arg2)
2314{
2315#ifdef DEBUG
2316 WriteLog("USER32: GetWindowLongW\n");
2317#endif
2318 return GetWindowLongA(arg1, arg2); //class procedures..
2319}
2320//******************************************************************************
2321//******************************************************************************
2322BOOL WIN32API GetWindowPlacement( HWND arg1, LPWINDOWPLACEMENT arg2)
2323{
2324#ifdef DEBUG
2325 WriteLog("USER32: GetWindowPlacement\n");
2326#endif
2327 return O32_GetWindowPlacement(arg1, arg2);
2328}
2329//******************************************************************************
2330
2331/***********************************************************************
2332 * GetInternalWindowPos (USER32.245)
2333 */
2334UINT WIN32API GetInternalWindowPos(HWND hwnd,
2335 LPRECT rectWnd,
2336 LPPOINT ptIcon )
2337{
2338 WINDOWPLACEMENT wndpl;
2339
2340 dprintf(("USER32: GetInternalWindowPos(%08xh,%08xh,%08xh)\n",
2341 hwnd,
2342 rectWnd,
2343 ptIcon));
2344
2345 if (O32_GetWindowPlacement( hwnd, &wndpl ))
2346 {
2347 if (rectWnd) *rectWnd = wndpl.rcNormalPosition;
2348 if (ptIcon) *ptIcon = wndpl.ptMinPosition;
2349 return wndpl.showCmd;
2350 }
2351 return 0;
2352}
2353
2354
2355//******************************************************************************
2356int WIN32API GetWindowTextLengthW( HWND arg1)
2357{
2358#ifdef DEBUG
2359 WriteLog("USER32: GetWindowTextLengthW\n");
2360#endif
2361 return O32_GetWindowTextLength(arg1);
2362}
2363//******************************************************************************
2364//******************************************************************************
2365int WIN32API GetWindowTextW(HWND hwnd, LPWSTR lpsz, int cch)
2366{
2367 char title[128];
2368 int rc;
2369
2370 rc = O32_GetWindowText(hwnd, title, sizeof(title));
2371#ifdef DEBUG
2372 WriteLog("USER32: GetWindowTextW returned %s\n", title);
2373#endif
2374 if(rc > cch) {
2375 title[cch-1] = 0;
2376 rc = cch;
2377 }
2378 AsciiToUnicode(title, lpsz);
2379 return(rc);
2380}
2381//******************************************************************************
2382//******************************************************************************
2383DWORD WIN32API GetWindowThreadProcessId(HWND arg1, PDWORD arg2)
2384{
2385#ifdef DEBUG
2386 WriteLog("USER32: GetWindowThreadProcessId\n");
2387#endif
2388 return O32_GetWindowThreadProcessId(arg1, arg2);
2389}
2390//******************************************************************************
2391//******************************************************************************
2392WORD WIN32API GetWindowWord( HWND arg1, int arg2)
2393{
2394#ifdef DEBUG
2395 WriteLog("USER32: GetWindowWord\n");
2396#endif
2397 return O32_GetWindowWord(arg1, arg2);
2398}
2399//******************************************************************************
2400//******************************************************************************
2401BOOL WIN32API HideCaret( HWND arg1)
2402{
2403#ifdef DEBUG
2404 WriteLog("USER32: HideCaret\n");
2405#endif
2406 return O32_HideCaret(arg1);
2407}
2408//******************************************************************************
2409//******************************************************************************
2410BOOL WIN32API InSendMessage(void)
2411{
2412#ifdef DEBUG
2413 WriteLog("USER32: InSendMessage\n");
2414#endif
2415 return O32_InSendMessage();
2416}
2417//******************************************************************************
2418//******************************************************************************
2419BOOL WIN32API IntersectRect( PRECT arg1, const RECT * arg2, const RECT * arg3)
2420{
2421#ifdef DEBUG
2422//// WriteLog("USER32: IntersectRect\n");
2423#endif
2424 return O32_IntersectRect(arg1, arg2, arg3);
2425}
2426//******************************************************************************
2427//******************************************************************************
2428BOOL WIN32API InvalidateRgn( HWND arg1, HRGN arg2, BOOL arg3)
2429{
2430#ifdef DEBUG
2431 WriteLog("USER32: InvalidateRgn\n");
2432#endif
2433 return O32_InvalidateRgn(arg1, arg2, arg3);
2434}
2435//******************************************************************************
2436//******************************************************************************
2437BOOL WIN32API InvertRect( HDC arg1, const RECT * arg2)
2438{
2439#ifdef DEBUG
2440 WriteLog("USER32: InvertRect\n");
2441#endif
2442 return O32_InvertRect(arg1, arg2);
2443}
2444//******************************************************************************
2445//******************************************************************************
2446BOOL WIN32API IsChild( HWND arg1, HWND arg2)
2447{
2448#ifdef DEBUG
2449 WriteLog("USER32: IsChild\n");
2450#endif
2451 return O32_IsChild(arg1, arg2);
2452}
2453//******************************************************************************
2454//******************************************************************************
2455BOOL WIN32API IsClipboardFormatAvailable( UINT arg1)
2456{
2457#ifdef DEBUG
2458 WriteLog("USER32: IsClipboardFormatAvailable\n");
2459#endif
2460 return O32_IsClipboardFormatAvailable(arg1);
2461}
2462//******************************************************************************
2463//******************************************************************************
2464BOOL WIN32API IsDialogMessageW( HWND arg1, LPMSG arg2)
2465{
2466#ifdef DEBUG
2467 WriteLog("USER32: IsDialogMessageW\n");
2468#endif
2469 // NOTE: This will not work as is (needs UNICODE support)
2470 return O32_IsDialogMessage(arg1, arg2);
2471}
2472//******************************************************************************
2473//******************************************************************************
2474BOOL WIN32API IsRectEmpty( const RECT * arg1)
2475{
2476#ifdef DEBUG
2477 WriteLog("USER32: IsRectEmpty\n");
2478#endif
2479 return O32_IsRectEmpty(arg1);
2480}
2481//******************************************************************************
2482//******************************************************************************
2483BOOL WIN32API IsWindow( HWND arg1)
2484{
2485#ifdef DEBUG
2486 WriteLog("USER32: IsWindow\n");
2487#endif
2488 return O32_IsWindow(arg1);
2489}
2490//******************************************************************************
2491//******************************************************************************
2492BOOL WIN32API IsWindowEnabled( HWND arg1)
2493{
2494#ifdef DEBUG
2495 WriteLog("USER32: IsWindowEnabled\n");
2496#endif
2497 return O32_IsWindowEnabled(arg1);
2498}
2499//******************************************************************************
2500//******************************************************************************
2501BOOL WIN32API IsWindowVisible( HWND arg1)
2502{
2503#ifdef DEBUG
2504 WriteLog("USER32: IsWindowVisible\n");
2505#endif
2506 return O32_IsWindowVisible(arg1);
2507}
2508//******************************************************************************
2509//******************************************************************************
2510BOOL WIN32API IsZoomed( HWND arg1)
2511{
2512#ifdef DEBUG
2513 WriteLog("USER32: IsZoomed\n");
2514#endif
2515 return O32_IsZoomed(arg1);
2516}
2517//******************************************************************************
2518//******************************************************************************
2519BOOL WIN32API LockWindowUpdate( HWND arg1)
2520{
2521#ifdef DEBUG
2522 WriteLog("USER32: LockWindowUpdate\n");
2523#endif
2524 return O32_LockWindowUpdate(arg1);
2525}
2526//******************************************************************************
2527//******************************************************************************
2528BOOL WIN32API MapDialogRect( HWND arg1, PRECT arg2)
2529{
2530#ifdef DEBUG
2531 WriteLog("USER32: MapDialogRect\n");
2532#endif
2533 return O32_MapDialogRect(arg1, arg2);
2534}
2535//******************************************************************************
2536//******************************************************************************
2537UINT WIN32API MapVirtualKeyA( UINT arg1, UINT arg2)
2538{
2539#ifdef DEBUG
2540 WriteLog("USER32: MapVirtualKeyA\n");
2541#endif
2542 return O32_MapVirtualKey(arg1, arg2);
2543}
2544//******************************************************************************
2545//******************************************************************************
2546UINT WIN32API MapVirtualKeyW( UINT arg1, UINT arg2)
2547{
2548#ifdef DEBUG
2549 WriteLog("USER32: MapVirtualKeyW\n");
2550#endif
2551 // NOTE: This will not work as is (needs UNICODE support)
2552 return O32_MapVirtualKey(arg1, arg2);
2553}
2554//******************************************************************************
2555//******************************************************************************
2556int WIN32API MapWindowPoints( HWND arg1, HWND arg2, LPPOINT arg3, UINT arg4)
2557{
2558#ifdef DEBUG
2559 WriteLog("USER32: MapWindowPoints\n");
2560#endif
2561 return O32_MapWindowPoints(arg1, arg2, arg3, arg4);
2562}
2563//******************************************************************************
2564//******************************************************************************
2565int WIN32API MessageBoxW(HWND arg1, LPCWSTR arg2, LPCWSTR arg3, UINT arg4)
2566{
2567 char *astring1, *astring2;
2568 int rc;
2569
2570 astring1 = UnicodeToAsciiString((LPWSTR)arg2);
2571 astring2 = UnicodeToAsciiString((LPWSTR)arg3);
2572#ifdef DEBUG
2573 WriteLog("USER32: MessageBoxW %s %s\n", astring1, astring2);
2574#endif
2575 rc = O32_MessageBox(arg1, astring1, astring2, arg4);
2576 FreeAsciiString(astring1);
2577 FreeAsciiString(astring2);
2578 return(rc);
2579}
2580//******************************************************************************
2581//******************************************************************************
2582BOOL WIN32API OpenClipboard( HWND arg1)
2583{
2584#ifdef DEBUG
2585 WriteLog("USER32: OpenClipboard\n");
2586#endif
2587 return O32_OpenClipboard(arg1);
2588}
2589//******************************************************************************
2590//******************************************************************************
2591BOOL WIN32API PeekMessageW( LPMSG arg1, HWND arg2, UINT arg3, UINT arg4, UINT arg5)
2592{
2593#ifdef DEBUG
2594 WriteLog("USER32: PeekMessageW\n");
2595#endif
2596 // NOTE: This will not work as is (needs UNICODE support)
2597 return O32_PeekMessage(arg1, arg2, arg3, arg4, arg5);
2598}
2599//******************************************************************************
2600//******************************************************************************
2601// NOTE: Open32 function doesn't have the 'W'.
2602BOOL WIN32API PostMessageW( HWND arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
2603{
2604#ifdef DEBUG
2605 WriteLog("USER32: PostMessageW\n");
2606#endif
2607 // NOTE: This will not work as is (needs UNICODE support)
2608 return O32_PostMessage(arg1, arg2, arg3, arg4);
2609}
2610//******************************************************************************
2611//******************************************************************************
2612BOOL WIN32API PostThreadMessageA( DWORD arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
2613{
2614#ifdef DEBUG
2615 WriteLog("USER32: PostThreadMessageA\n");
2616#endif
2617 return O32_PostThreadMessage(arg1, arg2, arg3, arg4);
2618}
2619//******************************************************************************
2620//******************************************************************************
2621BOOL WIN32API PostThreadMessageW( DWORD arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
2622{
2623#ifdef DEBUG
2624 WriteLog("USER32: PostThreadMessageW\n");
2625#endif
2626 // NOTE: This will not work as is (needs UNICODE support)
2627 return O32_PostThreadMessage(arg1, arg2, arg3, arg4);
2628}
2629//******************************************************************************
2630//******************************************************************************
2631BOOL WIN32API PtInRect( const RECT * arg1, POINT arg2)
2632{
2633#ifdef DEBUG1
2634 WriteLog("USER32: PtInRect\n");
2635#endif
2636 return O32_PtInRect(arg1, arg2);
2637}
2638//******************************************************************************
2639//******************************************************************************
2640BOOL WIN32API RedrawWindow( HWND arg1, const RECT * arg2, HRGN arg3, UINT arg4)
2641{
2642 BOOL rc;
2643
2644 rc = O32_RedrawWindow(arg1, arg2, arg3, arg4);
2645#ifdef DEBUG
2646 WriteLog("USER32: RedrawWindow %X , %X, %X, %X returned %d\n", arg1, arg2, arg3, arg4, rc);
2647#endif
2648 InvalidateRect(arg1, arg2, TRUE);
2649 UpdateWindow(arg1);
2650 SendMessageA(arg1, WM_PAINT, 0, 0);
2651 return(rc);
2652}
2653//******************************************************************************
2654//******************************************************************************
2655UINT WIN32API RegisterClipboardFormatA( LPCSTR arg1)
2656{
2657#ifdef DEBUG
2658 WriteLog("USER32: RegisterClipboardFormatA\n");
2659#endif
2660 return O32_RegisterClipboardFormat(arg1);
2661}
2662//******************************************************************************
2663//******************************************************************************
2664UINT WIN32API RegisterClipboardFormatW(LPCWSTR arg1)
2665{
2666 UINT rc;
2667 char *astring = UnicodeToAsciiString((LPWSTR)arg1);
2668
2669#ifdef DEBUG
2670 WriteLog("USER32: RegisterClipboardFormatW %s\n", astring);
2671#endif
2672 rc = O32_RegisterClipboardFormat(astring);
2673 FreeAsciiString(astring);
2674#ifdef DEBUG
2675 WriteLog("USER32: RegisterClipboardFormatW returned %d\n", rc);
2676#endif
2677 return(rc);
2678}
2679//******************************************************************************
2680//******************************************************************************
2681UINT WIN32API RegisterWindowMessageW( LPCWSTR arg1)
2682{
2683 char *astring = UnicodeToAsciiString((LPWSTR)arg1);
2684 UINT rc;
2685
2686#ifdef DEBUG
2687 WriteLog("USER32: RegisterWindowMessageW\n");
2688#endif
2689 rc = O32_RegisterWindowMessage(astring);
2690 FreeAsciiString(astring);
2691 return rc;
2692}
2693//******************************************************************************
2694//******************************************************************************
2695HANDLE WIN32API RemovePropA( HWND arg1, LPCSTR arg2)
2696{
2697#ifdef DEBUG
2698 WriteLog("USER32: RemovePropA\n");
2699#endif
2700 return O32_RemoveProp(arg1, arg2);
2701}
2702//******************************************************************************
2703//******************************************************************************
2704HANDLE WIN32API RemovePropW( HWND arg1, LPCWSTR arg2)
2705{
2706 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
2707 HANDLE rc;
2708
2709#ifdef DEBUG
2710 WriteLog("USER32: RemovePropW\n");
2711#endif
2712 rc = O32_RemoveProp(arg1, astring);
2713 FreeAsciiString(astring);
2714 return rc;
2715}
2716//******************************************************************************
2717//******************************************************************************
2718BOOL WIN32API ReplyMessage( LRESULT arg1)
2719{
2720#ifdef DEBUG
2721 WriteLog("USER32: ReplyMessage\n");
2722#endif
2723 return O32_ReplyMessage(arg1);
2724}
2725//******************************************************************************
2726//******************************************************************************
2727BOOL WIN32API ScreenToClient( HWND arg1, LPPOINT arg2)
2728{
2729#ifdef DEBUG
2730 WriteLog("USER32: ScreenToClient\n");
2731#endif
2732 return O32_ScreenToClient(arg1, arg2);
2733}
2734//******************************************************************************
2735//******************************************************************************
2736BOOL WIN32API ScrollDC( HDC arg1, int arg2, int arg3, const RECT * arg4, const RECT * arg5, HRGN arg6, PRECT arg7)
2737{
2738#ifdef DEBUG
2739 WriteLog("USER32: ScrollDC\n");
2740#endif
2741 return O32_ScrollDC(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
2742}
2743//******************************************************************************
2744//******************************************************************************
2745BOOL WIN32API ScrollWindow( HWND arg1, int arg2, int arg3, const RECT * arg4, const RECT * arg5)
2746{
2747#ifdef DEBUG
2748 WriteLog("USER32: ScrollWindow\n");
2749#endif
2750 return O32_ScrollWindow(arg1, arg2, arg3, arg4, arg5);
2751}
2752//******************************************************************************
2753//******************************************************************************
2754BOOL WIN32API ScrollWindowEx( HWND arg1, int arg2, int arg3, const RECT * arg4, const RECT * arg5, HRGN arg6, PRECT arg7, UINT arg8)
2755{
2756#ifdef DEBUG
2757 WriteLog("USER32: ScrollWindowEx\n");
2758#endif
2759 return O32_ScrollWindowEx(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
2760}
2761//******************************************************************************
2762//******************************************************************************
2763LONG WIN32API SendDlgItemMessageW( HWND arg1, int arg2, UINT arg3, WPARAM arg4, LPARAM arg5)
2764{
2765#ifdef DEBUG
2766 WriteLog("USER32: SendDlgItemMessageW\n");
2767#endif
2768 return O32_SendDlgItemMessage(arg1, arg2, arg3, arg4, arg5);
2769}
2770//******************************************************************************
2771//******************************************************************************
2772LRESULT WIN32API SendMessageW( HWND arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
2773{
2774LRESULT rc;
2775
2776#ifdef DEBUG
2777 WriteLog("USER32: SendMessageW....\n");
2778#endif
2779 rc = O32_SendMessage(arg1, arg2, arg3, arg4);
2780#ifdef DEBUG
2781 WriteLog("USER32: SendMessageW %X %X %X %X returned %d\n", arg1, arg2, arg3, arg4, rc);
2782#endif
2783 return(rc);
2784}
2785//******************************************************************************
2786//******************************************************************************
2787BOOL WIN32API SetCaretBlinkTime( UINT arg1)
2788{
2789#ifdef DEBUG
2790 WriteLog("USER32: SetCaretBlinkTime\n");
2791#endif
2792 return O32_SetCaretBlinkTime(arg1);
2793}
2794//******************************************************************************
2795//******************************************************************************
2796BOOL WIN32API SetCaretPos( int arg1, int arg2)
2797{
2798 dprintf(("USER32: SetCaretPos\n"));
2799 return O32_SetCaretPos(arg1, arg2);
2800}
2801//******************************************************************************
2802//******************************************************************************
2803HANDLE WIN32API SetClipboardData( UINT arg1, HANDLE arg2)
2804{
2805 dprintf(("USER32: SetClipboardData\n"));
2806 return O32_SetClipboardData(arg1, arg2);
2807}
2808//******************************************************************************
2809//******************************************************************************
2810HWND WIN32API SetClipboardViewer( HWND arg1)
2811{
2812 dprintf(("USER32: SetClipboardViewer\n"));
2813 return O32_SetClipboardViewer(arg1);
2814}
2815//******************************************************************************
2816//******************************************************************************
2817BOOL WIN32API SetDlgItemTextW( HWND arg1, int arg2, LPCWSTR arg3)
2818{
2819char *astring = UnicodeToAsciiString((LPWSTR)arg3);
2820BOOL rc;
2821
2822#ifdef DEBUG
2823 WriteLog("USER32: SetDlgItemTextW\n");
2824#endif
2825 // NOTE: This will not work as is (needs UNICODE support)
2826 rc = O32_SetDlgItemText(arg1, arg2, astring);
2827 FreeAsciiString(astring);
2828 return rc;
2829}
2830//******************************************************************************
2831//******************************************************************************
2832BOOL WIN32API SetDoubleClickTime( UINT arg1)
2833{
2834#ifdef DEBUG
2835 WriteLog("USER32: SetDoubleClickTime\n");
2836#endif
2837 return O32_SetDoubleClickTime(arg1);
2838}
2839//******************************************************************************
2840//******************************************************************************
2841HWND WIN32API SetParent( HWND arg1, HWND arg2)
2842{
2843#ifdef DEBUG
2844 WriteLog("USER32: SetParent\n");
2845#endif
2846 return O32_SetParent(arg1, arg2);
2847}
2848//******************************************************************************
2849//******************************************************************************
2850BOOL WIN32API SetPropA( HWND arg1, LPCSTR arg2, HANDLE arg3)
2851{
2852#ifdef DEBUG
2853 if((int)arg2 >> 16 != 0)
2854 WriteLog("USER32: SetPropA %S\n", arg2);
2855 else WriteLog("USER32: SetPropA %X\n", arg2);
2856#endif
2857 return O32_SetProp(arg1, arg2, arg3);
2858}
2859//******************************************************************************
2860//******************************************************************************
2861BOOL WIN32API SetPropW(HWND arg1, LPCWSTR arg2, HANDLE arg3)
2862{
2863 BOOL rc;
2864 char *astring;
2865
2866 if((int)arg2 >> 16 != 0)
2867 astring = UnicodeToAsciiString((LPWSTR)arg2);
2868 else astring = (char *)arg2;
2869
2870#ifdef DEBUG
2871 if((int)arg2 >> 16 != 0)
2872 WriteLog("USER32: SetPropW %S\n", astring);
2873 else WriteLog("USER32: SetPropW %X\n", astring);
2874#endif
2875 rc = O32_SetProp(arg1, astring, arg3);
2876 if((int)astring >> 16 != 0)
2877 FreeAsciiString(astring);
2878 return(rc);
2879}
2880//******************************************************************************
2881//******************************************************************************
2882BOOL WIN32API SetRectEmpty( PRECT arg1)
2883{
2884#ifdef DEBUG
2885 WriteLog("USER32: SetRectEmpty\n");
2886#endif
2887 return O32_SetRectEmpty(arg1);
2888}
2889//******************************************************************************
2890//******************************************************************************
2891int WIN32API SetScrollPos( HWND arg1, int arg2, int arg3, BOOL arg4)
2892{
2893#ifdef DEBUG
2894 WriteLog("USER32: SetScrollPos\n");
2895#endif
2896 return O32_SetScrollPos(arg1, arg2, arg3, arg4);
2897}
2898//******************************************************************************
2899//******************************************************************************
2900BOOL WIN32API SetScrollRange( HWND arg1, int arg2, int arg3, int arg4, BOOL arg5)
2901{
2902#ifdef DEBUG
2903 WriteLog("USER32: SetScrollRange\n");
2904#endif
2905 return O32_SetScrollRange(arg1, arg2, arg3, arg4, arg5);
2906}
2907//******************************************************************************
2908//******************************************************************************
2909LONG WIN32API SetWindowLongA(HWND hwnd, int nIndex, LONG arg3)
2910{
2911 LONG rc;
2912
2913 dprintf(("USER32: SetWindowLongA %X %d %X\n", hwnd, nIndex, arg3));
2914 if(nIndex == GWL_WNDPROC || nIndex == DWL_DLGPROC) {
2915 Win32WindowProc *wndproc = Win32WindowProc::FindProc(hwnd);
2916 if(wndproc == NULL) {//created with system class and app wants to change the handler
2917 dprintf(("USER32: SetWindowLong new WindowProc for system class\n"));
2918 wndproc = new Win32WindowProc((WNDPROC)arg3);
2919 wndproc->SetWindowHandle(hwnd);
2920 rc = O32_GetWindowLong(hwnd, nIndex);
2921 Win32WindowSubProc *subwndproc = new Win32WindowSubProc(hwnd, (WNDPROC_O32)rc);
2922 O32_SetWindowLong(hwnd, nIndex, (LONG)wndproc->GetOS2Callback());
2923 return((LONG)subwndproc->GetWin32Callback());
2924 }
2925 else {
2926 if(!(nIndex == DWL_DLGPROC && wndproc->IsWindow() == TRUE)) {
2927 rc = (LONG)wndproc->GetWin32Callback();
2928 dprintf(("USER32: SetWindowLong change WindowProc %X to %X\n", rc, arg3));
2929 wndproc->SetWin32Callback((WNDPROC)arg3);
2930 return(rc);
2931 }
2932 //else window that accesses it's normal window data
2933 }
2934 }
2935 return O32_SetWindowLong(hwnd, nIndex, arg3);
2936}
2937//******************************************************************************
2938//TODO: Is this always correct? (GWL_ID: window identifier??)
2939//******************************************************************************
2940LONG WIN32API SetWindowLongW(HWND arg1, int arg2, LONG arg3)
2941{
2942 dprintf(("USER32: SetWindowLongW %X %d %X\n", arg1, arg2, arg3));
2943 return SetWindowLongA(arg1, arg2, arg3);
2944}
2945//******************************************************************************
2946//******************************************************************************
2947BOOL WIN32API SetWindowPlacement( HWND arg1, const WINDOWPLACEMENT * arg2)
2948{
2949 dprintf(("USER32: SetWindowPlacement\n"));
2950 return O32_SetWindowPlacement(arg1, arg2);
2951}
2952//******************************************************************************
2953//******************************************************************************
2954BOOL WIN32API SetWindowTextW( HWND arg1, LPCWSTR arg2)
2955{
2956 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
2957 BOOL rc;
2958
2959 rc = SetWindowTextA(arg1, (LPCSTR)astring);
2960 dprintf(("USER32: SetWindowTextW %X %s returned %d\n", arg1, astring, rc));
2961 FreeAsciiString(astring);
2962 return(rc);
2963}
2964//******************************************************************************
2965//******************************************************************************
2966WORD WIN32API SetWindowWord( HWND arg1, int arg2, WORD arg3)
2967{
2968 dprintf(("USER32: SetWindowWord\n"));
2969 return O32_SetWindowWord(arg1, arg2, arg3);
2970}
2971//******************************************************************************
2972//******************************************************************************
2973BOOL WIN32API ShowCaret( HWND arg1)
2974{
2975 dprintf(("USER32: ShowCaret\n"));
2976 return O32_ShowCaret(arg1);
2977}
2978//******************************************************************************
2979//******************************************************************************
2980BOOL WIN32API ShowOwnedPopups( HWND arg1, BOOL arg2)
2981{
2982 dprintf(("USER32: ShowOwnedPopups\n"));
2983 return O32_ShowOwnedPopups(arg1, arg2);
2984}
2985//******************************************************************************
2986//******************************************************************************
2987BOOL WIN32API ShowScrollBar( HWND arg1, int arg2, BOOL arg3)
2988{
2989#ifdef DEBUG
2990 WriteLog("USER32: ShowScrollBar\n");
2991#endif
2992 return O32_ShowScrollBar(arg1, arg2, arg3);
2993}
2994//******************************************************************************
2995//******************************************************************************
2996BOOL WIN32API SwapMouseButton( BOOL arg1)
2997{
2998#ifdef DEBUG
2999 WriteLog("USER32: SwapMouseButton\n");
3000#endif
3001 return O32_SwapMouseButton(arg1);
3002}
3003//******************************************************************************
3004//******************************************************************************
3005BOOL WIN32API SystemParametersInfoA(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni)
3006{
3007 BOOL rc;
3008 NONCLIENTMETRICSA *cmetric = (NONCLIENTMETRICSA *)pvParam;
3009
3010 switch(uiAction) {
3011 case SPI_SCREENSAVERRUNNING:
3012 *(BOOL *)pvParam = FALSE;
3013 rc = TRUE;
3014 break;
3015 case SPI_GETDRAGFULLWINDOWS:
3016 *(BOOL *)pvParam = FALSE;
3017 rc = TRUE;
3018 break;
3019 case SPI_GETNONCLIENTMETRICS:
3020 memset(cmetric, 0, sizeof(NONCLIENTMETRICSA));
3021 cmetric->cbSize = sizeof(NONCLIENTMETRICSA);
3022 O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfCaptionFont),0);
3023 O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfMenuFont),0);
3024 O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfStatusFont),0);
3025 O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfMessageFont),0);
3026 cmetric->iBorderWidth = GetSystemMetrics(SM_CXBORDER);
3027 cmetric->iScrollWidth = GetSystemMetrics(SM_CXHSCROLL);
3028 cmetric->iScrollHeight = GetSystemMetrics(SM_CYHSCROLL);
3029 cmetric->iCaptionWidth = 32; //TODO
3030 cmetric->iCaptionHeight = 16; //TODO
3031 cmetric->iSmCaptionWidth = GetSystemMetrics(SM_CXSMSIZE);
3032 cmetric->iSmCaptionHeight = GetSystemMetrics(SM_CYSMSIZE);
3033 cmetric->iMenuWidth = 32; //TODO
3034 cmetric->iMenuHeight = GetSystemMetrics(SM_CYMENU);
3035 rc = TRUE;
3036 break;
3037 case 104: //TODO: Undocumented
3038 rc = 16;
3039 break;
3040 default:
3041 rc = O32_SystemParametersInfo(uiAction, uiParam, pvParam, fWinIni);
3042 break;
3043 }
3044#ifdef DEBUG
3045 WriteLog("USER32: SystemParametersInfoA %d, returned %d\n", uiAction, rc);
3046#endif
3047 return(rc);
3048}
3049//******************************************************************************
3050//TODO: Check for more options that have different structs for Unicode!!!!
3051//******************************************************************************
3052BOOL WIN32API SystemParametersInfoW(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni)
3053{
3054 BOOL rc;
3055 NONCLIENTMETRICSW *clientMetricsW = (NONCLIENTMETRICSW *)pvParam;
3056 NONCLIENTMETRICSA clientMetricsA = {0};
3057 PVOID pvParamA;
3058 UINT uiParamA;
3059
3060 switch(uiAction) {
3061 case SPI_SETNONCLIENTMETRICS:
3062 clientMetricsA.cbSize = sizeof(NONCLIENTMETRICSA);
3063 clientMetricsA.iBorderWidth = clientMetricsW->iBorderWidth;
3064 clientMetricsA.iScrollWidth = clientMetricsW->iScrollWidth;
3065 clientMetricsA.iScrollHeight = clientMetricsW->iScrollHeight;
3066 clientMetricsA.iCaptionWidth = clientMetricsW->iCaptionWidth;
3067 clientMetricsA.iCaptionHeight = clientMetricsW->iCaptionHeight;
3068 ConvertFontWA(&clientMetricsW->lfCaptionFont, &clientMetricsA.lfCaptionFont);
3069 clientMetricsA.iSmCaptionWidth = clientMetricsW->iSmCaptionWidth;
3070 clientMetricsA.iSmCaptionHeight = clientMetricsW->iSmCaptionHeight;
3071 ConvertFontWA(&clientMetricsW->lfSmCaptionFont, &clientMetricsA.lfSmCaptionFont);
3072 clientMetricsA.iMenuWidth = clientMetricsW->iMenuWidth;
3073 clientMetricsA.iMenuHeight = clientMetricsW->iMenuHeight;
3074 ConvertFontWA(&clientMetricsW->lfMenuFont, &clientMetricsA.lfMenuFont);
3075 ConvertFontWA(&clientMetricsW->lfStatusFont, &clientMetricsA.lfStatusFont);
3076 ConvertFontWA(&clientMetricsW->lfMessageFont, &clientMetricsA.lfMessageFont);
3077 //no break
3078 case SPI_GETNONCLIENTMETRICS:
3079 uiParamA = sizeof(NONCLIENTMETRICSA);
3080 pvParamA = &clientMetricsA;
3081 break;
3082 default:
3083 pvParamA = pvParam;
3084 uiParamA = uiParam;
3085 break;
3086 }
3087 rc = SystemParametersInfoA(uiAction, uiParamA, pvParamA, fWinIni);
3088
3089 switch(uiAction) {
3090 case SPI_GETNONCLIENTMETRICS:
3091 clientMetricsW->cbSize = sizeof(*clientMetricsW);
3092 clientMetricsW->iBorderWidth = clientMetricsA.iBorderWidth;
3093 clientMetricsW->iScrollWidth = clientMetricsA.iScrollWidth;
3094 clientMetricsW->iScrollHeight = clientMetricsA.iScrollHeight;
3095 clientMetricsW->iCaptionWidth = clientMetricsA.iCaptionWidth;
3096 clientMetricsW->iCaptionHeight = clientMetricsA.iCaptionHeight;
3097 ConvertFontAW(&clientMetricsA.lfCaptionFont, &clientMetricsW->lfCaptionFont);
3098
3099 clientMetricsW->iSmCaptionWidth = clientMetricsA.iSmCaptionWidth;
3100 clientMetricsW->iSmCaptionHeight = clientMetricsA.iSmCaptionHeight;
3101 ConvertFontAW(&clientMetricsA.lfSmCaptionFont, &clientMetricsW->lfSmCaptionFont);
3102
3103 clientMetricsW->iMenuWidth = clientMetricsA.iMenuWidth;
3104 clientMetricsW->iMenuHeight = clientMetricsA.iMenuHeight;
3105 ConvertFontAW(&clientMetricsA.lfMenuFont, &clientMetricsW->lfMenuFont);
3106 ConvertFontAW(&clientMetricsA.lfStatusFont, &clientMetricsW->lfStatusFont);
3107 ConvertFontAW(&clientMetricsA.lfMessageFont, &clientMetricsW->lfMessageFont);
3108 break;
3109 }
3110#ifdef DEBUG
3111 WriteLog("USER32: SystemParametersInfoW %d, returned %d\n", uiAction, rc);
3112#endif
3113 return(rc);
3114}
3115//******************************************************************************
3116//******************************************************************************
3117LONG WIN32API TabbedTextOutA( HDC arg1, int arg2, int arg3, LPCSTR arg4, int arg5, int arg6, int * arg7, int arg8)
3118{
3119#ifdef DEBUG
3120 WriteLog("USER32: TabbedTextOutA\n");
3121#endif
3122 return O32_TabbedTextOut(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
3123}
3124//******************************************************************************
3125//******************************************************************************
3126LONG WIN32API TabbedTextOutW( HDC arg1, int arg2, int arg3, LPCWSTR arg4, int arg5, int arg6, int * arg7, int arg8)
3127{
3128 char *astring = UnicodeToAsciiString((LPWSTR)arg4);
3129 LONG rc;
3130
3131#ifdef DEBUG
3132 WriteLog("USER32: TabbedTextOutW\n");
3133#endif
3134 rc = O32_TabbedTextOut(arg1, arg2, arg3, astring, arg5, arg6, arg7, arg8);
3135 FreeAsciiString(astring);
3136 return rc;
3137}
3138//******************************************************************************
3139//******************************************************************************
3140int WIN32API TranslateAccelerator( HWND arg1, HACCEL arg2, LPMSG arg3)
3141{
3142#ifdef DEBUG
3143 WriteLog("USER32: TranslateAccelerator\n");
3144#endif
3145 return O32_TranslateAccelerator(arg1, arg2, arg3);
3146}
3147//******************************************************************************
3148//******************************************************************************
3149int WIN32API TranslateAcceleratorW( HWND arg1, HACCEL arg2, LPMSG arg3)
3150{
3151#ifdef DEBUG
3152 WriteLog("USER32: TranslateAcceleratorW\n");
3153#endif
3154 // NOTE: This will not work as is (needs UNICODE support)
3155 return O32_TranslateAccelerator(arg1, arg2, arg3);
3156}
3157//******************************************************************************
3158//******************************************************************************
3159BOOL WIN32API TranslateMDISysAccel( HWND arg1, LPMSG arg2)
3160{
3161#ifdef DEBUG
3162//// WriteLog("USER32: TranslateMDISysAccel\n");
3163#endif
3164 return O32_TranslateMDISysAccel(arg1, arg2);
3165}
3166//******************************************************************************
3167//******************************************************************************
3168BOOL WIN32API UnionRect( PRECT arg1, const RECT * arg2, const RECT * arg3)
3169{
3170#ifdef DEBUG
3171 WriteLog("USER32: UnionRect\n");
3172#endif
3173 return O32_UnionRect(arg1, arg2, arg3);
3174}
3175//******************************************************************************
3176//******************************************************************************
3177BOOL WIN32API ValidateRect( HWND arg1, const RECT * arg2)
3178{
3179#ifdef DEBUG
3180 WriteLog("USER32: ValidateRect\n");
3181#endif
3182 return O32_ValidateRect(arg1, arg2);
3183}
3184//******************************************************************************
3185//******************************************************************************
3186BOOL WIN32API ValidateRgn( HWND arg1, HRGN arg2)
3187{
3188#ifdef DEBUG
3189 WriteLog("USER32: ValidateRgn\n");
3190#endif
3191 return O32_ValidateRgn(arg1, arg2);
3192}
3193//******************************************************************************
3194//******************************************************************************
3195WORD WIN32API VkKeyScanW( WCHAR arg1)
3196{
3197#ifdef DEBUG
3198 WriteLog("USER32: VkKeyScanW\n");
3199#endif
3200 // NOTE: This will not work as is (needs UNICODE support)
3201 return O32_VkKeyScan((char)arg1);
3202}
3203//******************************************************************************
3204//******************************************************************************
3205BOOL WIN32API WaitMessage(void)
3206{
3207#ifdef DEBUG
3208 WriteLog("USER32: WaitMessage\n");
3209#endif
3210 return O32_WaitMessage();
3211}
3212//******************************************************************************
3213//******************************************************************************
3214BOOL WIN32API WinHelpW( HWND arg1, LPCWSTR arg2, UINT arg3, DWORD arg4)
3215{
3216 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
3217 BOOL rc;
3218
3219#ifdef DEBUG
3220 WriteLog("USER32: WinHelpW\n");
3221#endif
3222 rc = WinHelpA(arg1, astring, arg3, arg4);
3223 FreeAsciiString(astring);
3224 return rc;
3225}
3226//******************************************************************************
3227//******************************************************************************
3228HWND WIN32API WindowFromDC( HDC arg1)
3229{
3230#ifdef DEBUG
3231 WriteLog("USER32: WindowFromDC\n");
3232#endif
3233 return O32_WindowFromDC(arg1);
3234}
3235//******************************************************************************
3236//******************************************************************************
3237HWND WIN32API WindowFromPoint( POINT arg1)
3238{
3239#ifdef DEBUG
3240 WriteLog("USER32: WindowFromPoint\n");
3241#endif
3242 return O32_WindowFromPoint(arg1);
3243}
3244//******************************************************************************
3245//******************************************************************************
3246int WIN32API wvsprintfA( LPSTR arg1, LPCSTR arg2, va_list arg3)
3247{
3248#ifdef DEBUG
3249 WriteLog("USER32: wvsprintfA\n");
3250#endif
3251 return O32_wvsprintf(arg1, arg2, (LPCVOID *)arg3);
3252}
3253//******************************************************************************
3254//******************************************************************************
3255int WIN32API wvsprintfW(LPWSTR lpOut, LPCWSTR lpFmt, va_list argptr)
3256{
3257 int rc;
3258 char szOut[256];
3259 char *lpFmtA;
3260
3261 lpFmtA = UnicodeToAsciiString((LPWSTR)lpFmt);
3262#ifdef DEBUG
3263 WriteLog("USER32: wvsprintfW, DOES NOT HANDLE UNICODE STRINGS!\n");
3264 WriteLog("USER32: %s\n", lpFmt);
3265#endif
3266 rc = O32_wvsprintf(szOut, lpFmtA, (LPCVOID)argptr);
3267
3268 AsciiToUnicode(szOut, lpOut);
3269#ifdef DEBUG
3270 WriteLog("USER32: %s\n", lpOut);
3271#endif
3272 FreeAsciiString(lpFmtA);
3273 return(rc);
3274}
3275//******************************************************************************
3276//No need to support this
3277//******************************************************************************
3278BOOL WIN32API SetMessageQueue(int cMessagesMax)
3279{
3280#ifdef DEBUG
3281 WriteLog("USER32: SetMessageQueue\n");
3282#endif
3283 return(TRUE);
3284}
3285//******************************************************************************
3286//TODO: Not complete
3287//******************************************************************************
3288BOOL WIN32API GetScrollInfo(HWND hwnd, int fnBar, LPSCROLLINFO lpsi)
3289{
3290#ifdef DEBUG
3291 WriteLog("USER32: GetScrollInfo\n");
3292#endif
3293 if(lpsi == NULL)
3294 return(FALSE);
3295
3296 if(lpsi->fMask & SIF_POS)
3297 lpsi->nPos = GetScrollPos(hwnd, fnBar);
3298 if(lpsi->fMask & SIF_RANGE)
3299 GetScrollRange(hwnd, fnBar, &lpsi->nMin, &lpsi->nMax);
3300 if(lpsi->fMask & SIF_PAGE) {
3301#ifdef DEBUG
3302 WriteLog("USER32: GetScrollInfo, page info not implemented\n");
3303#endif
3304 lpsi->nPage = 25;
3305 }
3306 return(TRUE);
3307}
3308//******************************************************************************
3309//TODO: Not complete
3310//******************************************************************************
3311INT WIN32API SetScrollInfo(HWND hwnd, INT fnBar, const SCROLLINFO *lpsi, BOOL fRedraw)
3312{
3313 int smin, smax;
3314
3315#ifdef DEBUG
3316 WriteLog("USER32: SetScrollInfo\n");
3317#endif
3318 if(lpsi == NULL)
3319 return(FALSE);
3320
3321 if(lpsi->fMask & SIF_POS)
3322 SetScrollPos(hwnd, fnBar, lpsi->nPos, fRedraw);
3323 if(lpsi->fMask & SIF_RANGE)
3324 SetScrollRange(hwnd, fnBar, lpsi->nMin, lpsi->nMax, fRedraw);
3325 if(lpsi->fMask & SIF_PAGE) {
3326#ifdef DEBUG
3327 WriteLog("USER32: GetScrollInfo, page info not implemented\n");
3328#endif
3329 }
3330 if(lpsi->fMask & SIF_DISABLENOSCROLL) {
3331#ifdef DEBUG
3332 WriteLog("USER32: GetScrollInfo, disable scrollbar not yet implemented\n");
3333#endif
3334 }
3335 return(TRUE);
3336}
3337//******************************************************************************
3338//******************************************************************************
3339BOOL WIN32API GrayStringA(HDC hdc, HBRUSH hBrush, GRAYSTRINGPROC lpOutputFunc,
3340 LPARAM lpData, int nCount, int X, int Y, int nWidth,
3341 int nHeight)
3342{
3343 BOOL rc;
3344 COLORREF curclr;
3345
3346#ifdef DEBUG
3347 WriteLog("USER32: GrayStringA, not completely implemented\n");
3348#endif
3349 if(lpOutputFunc == NULL && lpData == NULL) {
3350#ifdef DEBUG
3351 WriteLog("USER32: lpOutputFunc == NULL && lpData == NULL\n");
3352#endif
3353 return(FALSE);
3354 }
3355 if(lpOutputFunc) {
3356 return(lpOutputFunc(hdc, lpData, nCount));
3357 }
3358 curclr = SetTextColor(hdc, GetSysColor(COLOR_GRAYTEXT));
3359 rc = TextOutA(hdc, X, Y, (char *)lpData, nCount);
3360 SetTextColor(hdc, curclr);
3361
3362 return(rc);
3363}
3364//******************************************************************************
3365//******************************************************************************
3366BOOL WIN32API GrayStringW(HDC hdc, HBRUSH hBrush, GRAYSTRINGPROC lpOutputFunc,
3367 LPARAM lpData, int nCount, int X, int Y, int nWidth,
3368 int nHeight)
3369{
3370 BOOL rc;
3371 char *astring;
3372 COLORREF curclr;
3373
3374#ifdef DEBUG
3375 WriteLog("USER32: GrayStringW, not completely implemented\n");
3376#endif
3377
3378 if(lpOutputFunc == NULL && lpData == NULL) {
3379#ifdef DEBUG
3380 WriteLog("USER32: lpOutputFunc == NULL && lpData == NULL\n");
3381#endif
3382 return(FALSE);
3383 }
3384 if(nCount == 0)
3385 nCount = UniStrlen((UniChar*)lpData);
3386
3387 if(lpOutputFunc) {
3388 return(lpOutputFunc(hdc, lpData, nCount));
3389 }
3390 astring = UnicodeToAsciiString((LPWSTR)lpData);
3391
3392 curclr = SetTextColor(hdc, GetSysColor(COLOR_GRAYTEXT));
3393 rc = TextOutA(hdc, X, Y, astring, nCount);
3394 SetTextColor(hdc, curclr);
3395
3396 FreeAsciiString(astring);
3397 return(rc);
3398}
3399//******************************************************************************
3400//TODO:
3401//******************************************************************************
3402int WIN32API CopyAcceleratorTableA(HACCEL hAccelSrc, LPACCEL lpAccelDest,
3403 int cAccelEntries)
3404{
3405#ifdef DEBUG
3406 WriteLog("USER32: CopyAcceleratorTableA, not implemented\n");
3407#endif
3408 return(0);
3409}
3410//******************************************************************************
3411//TODO:
3412//******************************************************************************
3413int WIN32API CopyAcceleratorTableW(HACCEL hAccelSrc, LPACCEL lpAccelDest,
3414 int cAccelEntries)
3415{
3416#ifdef DEBUG
3417 WriteLog("USER32: CopyAcceleratorTableW, not implemented\n");
3418#endif
3419 return(0);
3420}
3421//******************************************************************************
3422//Stolen from Wine (controls\uitools.c)
3423//******************************************************************************
3424BOOL DrawEdgeDiag(HDC hdc, RECT *rect, UINT edge, UINT flags)
3425{
3426 HPEN facePen, shadowPen, lightPen, blackPen, grayPen, nullPen;
3427 HPEN iPen, oPen, oldPen;
3428 HBRUSH oldBrush, faceBrush;
3429 int cl, cr, ct, cb;
3430 BOOL mainDiag;
3431 POINT tp;
3432 RECT r;
3433
3434 /* If both rasied and sunken is specified, they anihilate one another */
3435 if( !((flags & BF_MONO) || (flags & BF_FLAT)) ){
3436 if( (edge & BDR_RAISEDOUTER) && (edge & BDR_SUNKENOUTER) )
3437 return FALSE;
3438 if( (edge & BDR_RAISEDINNER) && (edge & BDR_SUNKENINNER) )
3439 return FALSE;
3440 }
3441
3442 /* Create/get the tools of the trade... */
3443 facePen = CreatePen(PS_SOLID, 0, GetSysColor(COLOR_BTNFACE));
3444 shadowPen = CreatePen(PS_SOLID, 0, GetSysColor(COLOR_BTNSHADOW));
3445 lightPen = CreatePen(PS_SOLID, 0, GetSysColor(COLOR_BTNHILIGHT));
3446 grayPen = CreatePen(PS_SOLID, 0, RGB(168, 152, 144));
3447 blackPen = GetStockObject(BLACK_PEN);
3448 nullPen = GetStockObject(NULL_PEN);
3449 faceBrush = GetSysColorBrush(COLOR_BTNFACE);
3450 oldPen = SelectObject(hdc, nullPen);
3451 oldBrush = SelectObject(hdc, faceBrush);
3452
3453 /* this is my working rectangle */
3454 r = *rect;
3455
3456 if(flags & BF_MONO){
3457 oPen = blackPen;
3458 iPen = nullPen;
3459 }else if(flags & BF_FLAT){
3460 oPen = shadowPen;
3461 iPen = facePen;
3462 }else {
3463 if(flags & BF_SOFT){
3464 if(flags & BF_BOTTOM){
3465 oPen = (edge & BDR_RAISEDOUTER) ? blackPen : lightPen;
3466 iPen = (edge & BDR_RAISEDINNER) ? shadowPen : grayPen;
3467 }
3468 else{
3469 oPen = (edge & BDR_RAISEDOUTER) ? lightPen : blackPen;
3470 iPen = (edge & BDR_RAISEDINNER) ? grayPen : shadowPen;
3471 }
3472 }
3473 else{
3474 if(flags & BF_BOTTOM){
3475 oPen = (edge & BDR_RAISEDOUTER) ? blackPen : lightPen;
3476 iPen = (edge & BDR_RAISEDINNER) ? shadowPen : grayPen;
3477 }
3478 else{
3479 oPen = (edge & BDR_RAISEDOUTER) ? grayPen : shadowPen;
3480 iPen = (edge & BDR_RAISEDINNER) ? lightPen : blackPen;
3481 }
3482 }
3483 }
3484
3485 if(flags & BF_BOTTOM){
3486 if(flags & BF_LEFT){
3487 cr = -1; cl = 0;
3488 ct = 0; cb = -1;
3489 mainDiag = TRUE;
3490 tp.x = r.left; tp.y = r.top;
3491 }
3492 else{ /* RIGHT */
3493 cr = -1; cl = 0;
3494 ct = 1; cb = 0;
3495 tp.x = r.left; tp.y = r.bottom-1;
3496 mainDiag = FALSE;
3497 }
3498 }
3499 else{ /* TOP */
3500 if(flags & BF_LEFT){
3501 cr = 0; cl = 1;
3502 ct = 0; cb = -1;
3503 mainDiag = FALSE;
3504 tp.x = r.right; tp.y = r.top;
3505 }
3506 else{ /* RIGHT */
3507 cr = 0; cl = 1;
3508 ct = 1; cb = 0;
3509 tp.x = r.right; tp.y = r.bottom-1;
3510 mainDiag = TRUE;
3511 }
3512 }
3513
3514 /* if it has external edge, draw it */
3515 if(edge & BDR_OUTER){
3516 SelectObject(hdc, oPen);
3517 MoveToEx(hdc, r.left, mainDiag ? r.bottom-1 : r.top, 0);
3518 LineTo(hdc, r.right, mainDiag ? r.top-1 : r.bottom);
3519 r.left += cl; r.right += cr; r.top += ct; r.bottom += cb;
3520 }
3521
3522 /* if it has internal edge, draw it */
3523 if(edge & BDR_INNER){
3524 SelectObject(hdc, iPen);
3525 MoveToEx(hdc, r.left, mainDiag ? r.bottom-1 : r.top, 0);
3526 LineTo(hdc, r.right, mainDiag ? r.top-1 : r.bottom);
3527 r.left += cl; r.right += cr; r.top += ct; r.bottom += cb;
3528 }
3529
3530 if((flags & BF_MIDDLE) && !(flags & BF_MONO)){
3531 POINT p[3];
3532 p[0].x = mainDiag ? r.right: r.left;
3533 p[0].y = r.top;
3534 p[1].x = mainDiag ? r.left : r.right;
3535 p[1].y = r.bottom;
3536 p[2].x = tp.x;
3537 p[2].y = tp.y;
3538 SelectObject(hdc, nullPen);
3539 SelectObject(hdc, faceBrush);
3540 Polygon(hdc, p, 3);
3541 }
3542
3543 if(flags & BF_ADJUST)
3544 *rect = r;
3545
3546 /* Restore the DC */
3547 SelectObject(hdc, oldPen);
3548 SelectObject(hdc, oldBrush);
3549
3550 /* Clean-up */
3551 DeleteObject(facePen);
3552 DeleteObject(shadowPen);
3553 DeleteObject(lightPen);
3554 DeleteObject(grayPen);
3555
3556 return TRUE;
3557}
3558//******************************************************************************
3559//Stolen from Wine (controls\uitools.c)
3560//******************************************************************************
3561BOOL WIN32API DrawEdge(HDC hdc, LPRECT rect, UINT edge, UINT flags)
3562{
3563 HBRUSH faceBrush, shadowBrush, lightBrush, blackBrush, grayBrush, nullBrush;
3564 HBRUSH iNBrush, iSBrush, iEBrush, iWBrush;
3565 HBRUSH oNBrush, oSBrush, oEBrush, oWBrush;
3566 HBRUSH oldBrush;
3567 POINT point[2];
3568 RECT r;
3569
3570#ifdef DEBUG
3571 WriteLog("USER32: DrawEdge %X %X, partially implemented\n", edge, flags);
3572 WriteLog("USER32: DrawEdge (%d,%d) (%d,%d)\n", rect->left, rect->top, rect->right, rect->bottom);
3573#endif
3574
3575 if(flags & BF_DIAGONAL) {
3576 return DrawEdgeDiag(hdc, rect, edge, flags);
3577 }
3578 /* If both rasied and sunken is specified, they anihilate one another */
3579 if( !((flags & BF_MONO) || (flags & BF_FLAT)) ){
3580 if( (edge & BDR_RAISEDOUTER) && (edge & BDR_SUNKENOUTER) )
3581 return FALSE;
3582 if( (edge & BDR_RAISEDINNER) && (edge & BDR_SUNKENINNER) )
3583 return FALSE;
3584 }
3585
3586 faceBrush = GetSysColorBrush(COLOR_BTNFACE);
3587 shadowBrush = GetSysColorBrush(COLOR_BTNSHADOW);
3588 lightBrush = GetSysColorBrush(COLOR_BTNHILIGHT);
3589 blackBrush = GetStockObject(BLACK_BRUSH);
3590 grayBrush = GetStockObject(LTGRAY_BRUSH);
3591 nullBrush = GetStockObject(NULL_BRUSH);
3592 oldBrush = SelectObject(hdc, nullBrush);
3593
3594 /* this is my working rectangle */
3595 r = *rect;
3596
3597 if(flags & BF_MONO){
3598 oNBrush = oSBrush = oEBrush = oWBrush = blackBrush;
3599 iNBrush = iSBrush = iEBrush = iWBrush = nullBrush;
3600 }else if(flags & BF_FLAT){
3601 oNBrush = oSBrush = oEBrush = oWBrush = shadowBrush;
3602 iNBrush = iSBrush = iEBrush = iWBrush = faceBrush;
3603 }else {
3604 if(flags & BF_SOFT){
3605 oNBrush = oWBrush = (edge & BDR_RAISEDOUTER) ? lightBrush : blackBrush;
3606 oSBrush = oEBrush = (edge & BDR_RAISEDOUTER) ? blackBrush : lightBrush;
3607 iNBrush = iWBrush = (edge & BDR_RAISEDINNER) ? grayBrush : shadowBrush;
3608 iSBrush = iEBrush = (edge & BDR_RAISEDINNER) ? shadowBrush : grayBrush;
3609 }
3610 else{
3611 oNBrush = oWBrush = (edge & BDR_RAISEDOUTER) ? grayBrush : shadowBrush;
3612 oSBrush = oEBrush = (edge & BDR_RAISEDOUTER) ? blackBrush : lightBrush;
3613 iNBrush = iWBrush = (edge & BDR_RAISEDINNER) ? lightBrush : blackBrush;
3614 iSBrush = iEBrush = (edge & BDR_RAISEDINNER) ? shadowBrush : grayBrush;
3615 }
3616 }
3617
3618 /* if it has external edge, draw it */
3619 if(edge & BDR_OUTER){
3620 if(flags & BF_RIGHT){
3621 SelectObject(hdc, oEBrush);
3622 PatBlt(hdc, r.right-1, r.top, 1, r.bottom - r.top, PATCOPY);
3623 r.right--;
3624 }
3625 if(flags & BF_BOTTOM){
3626 SelectObject(hdc, oSBrush);
3627 PatBlt(hdc, r.left, r.bottom-1, r.right-r.left, 1, PATCOPY);
3628 r.bottom--;
3629 }
3630 if(flags & BF_LEFT){
3631 SelectObject(hdc, oWBrush);
3632 PatBlt(hdc, r.left, r.top, 1, r.bottom - r.top, PATCOPY);
3633 r.left++;
3634 }
3635 if(flags & BF_TOP){
3636 SelectObject(hdc, oNBrush);
3637 PatBlt(hdc, r.left, r.top, r.right-r.left, 1, PATCOPY);
3638 r.top++;
3639 }
3640 }
3641
3642 /* if it has internal edge, draw it */
3643 if(edge & BDR_INNER){
3644 if(flags & BF_RIGHT){
3645 SelectObject(hdc, iEBrush);
3646 PatBlt(hdc, r.right-1, r.top, 1, r.bottom - r.top, PATCOPY);
3647 r.right--;
3648 }
3649 if(flags & BF_BOTTOM){
3650 SelectObject(hdc, iSBrush);
3651 PatBlt(hdc, r.left, r.bottom-1, r.right-r.left, 1, PATCOPY);
3652 r.bottom--;
3653 }
3654 if(flags & BF_LEFT){
3655 SelectObject(hdc, iWBrush);
3656 PatBlt(hdc, r.left, r.top, 1, r.bottom - r.top, PATCOPY);
3657 r.left++;
3658 }
3659 if(flags & BF_TOP){
3660 SelectObject(hdc, iNBrush);
3661 PatBlt(hdc, r.left, r.top, r.right-r.left, 1, PATCOPY);
3662 r.top++;
3663 }
3664 }
3665
3666 /* if we got to fill the middle, to it now */
3667 if((flags & BF_MIDDLE) && !(flags & BF_MONO))
3668 FillRect(hdc, &r, faceBrush);
3669
3670 /* adjust the rectangle if required */
3671 if(flags & BF_ADJUST)
3672 *rect = r;
3673
3674 /* Restore the DC */
3675 SelectObject(hdc, oldBrush);
3676
3677 return TRUE;
3678}
3679//******************************************************************************
3680//******************************************************************************
3681LRESULT WIN32API SendMessageTimeoutA(HWND hwnd, UINT Msg, WPARAM wParam,
3682 LPARAM lParam, UINT fuFlags, UINT uTimeOut,
3683 LPDWORD lpdwResult)
3684{
3685#ifdef DEBUG
3686 WriteLog("USER32: SendMessageTimeoutA, partially implemented\n");
3687#endif
3688 //ignore fuFlags & wTimeOut
3689 *lpdwResult = SendMessageA(hwnd, Msg, wParam, lParam);
3690 return(TRUE);
3691}
3692//******************************************************************************
3693//******************************************************************************
3694LRESULT WIN32API SendMessageTimeoutW(HWND hwnd, UINT Msg, WPARAM wParam,
3695 LPARAM lParam, UINT fuFlags, UINT uTimeOut,
3696 LPDWORD lpdwResult)
3697{
3698#ifdef DEBUG
3699 WriteLog("USER32: SendMessageTimeoutW, partially implemented\n");
3700#endif
3701 return(SendMessageTimeoutA(hwnd, Msg, wParam, lParam, fuFlags, uTimeOut, lpdwResult));
3702}
3703//******************************************************************************
3704//******************************************************************************
3705HANDLE WIN32API CopyImage(HANDLE hImage, UINT uType, int cxDesired, int cyDesired, UINT fuFlags)
3706{
3707#ifdef DEBUG
3708 WriteLog("USER32: CopyImage, not implemented\n");
3709#endif
3710 switch(uType) {
3711 case IMAGE_BITMAP:
3712 case IMAGE_CURSOR:
3713 case IMAGE_ICON:
3714 default:
3715#ifdef DEBUG
3716 WriteLog("USER32: CopyImage, unknown type\n");
3717#endif
3718 return(NULL);
3719 }
3720 return(NULL);
3721}
3722//******************************************************************************
3723//******************************************************************************
3724BOOL WIN32API GetKeyboardState(PBYTE lpKeyState)
3725{
3726#ifdef DEBUG
3727 WriteLog("USER32: GetKeyboardState, not properly implemented\n");
3728#endif
3729 memset(lpKeyState, 0, 256);
3730 return(TRUE);
3731}
3732//******************************************************************************
3733//******************************************************************************
3734BOOL WIN32API SetKeyboardState(PBYTE lpKeyState)
3735{
3736#ifdef DEBUG
3737 WriteLog("USER32: SetKeyboardState, not implemented\n");
3738#endif
3739 return(TRUE);
3740}
3741//******************************************************************************
3742//******************************************************************************
3743BOOL WIN32API DrawFrameControl(HDC hdc, LPRECT lprc, UINT uType, UINT uState)
3744{
3745#ifdef DEBUG
3746 WriteLog("USER32: DrawFrameControl, not implemented\n");
3747#endif
3748 return(TRUE);
3749}
3750//******************************************************************************
3751//******************************************************************************
3752BOOL WIN32API SendNotifyMessageA(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)
3753{
3754#ifdef DEBUG
3755 WriteLog("USER32: SendNotifyMessageA, not completely implemented\n");
3756#endif
3757 return(SendMessageA(hwnd, Msg, wParam, lParam));
3758}
3759//******************************************************************************
3760//******************************************************************************
3761BOOL WIN32API SendNotifyMessageW(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)
3762{
3763#ifdef DEBUG
3764 WriteLog("USER32: SendNotifyMessageW, not completely implemented\n");
3765#endif
3766 return(SendMessageA(hwnd, Msg, wParam, lParam));
3767}
3768//******************************************************************************
3769//2nd parameter not used according to SDK (yet?)
3770//******************************************************************************
3771VOID WIN32API SetLastErrorEx(DWORD dwErrCode, DWORD dwType)
3772{
3773#ifdef DEBUG
3774 WriteLog("USER32: SetLastErrorEx\n");
3775#endif
3776 SetLastError(dwErrCode);
3777}
3778//******************************************************************************
3779//******************************************************************************
3780LPARAM WIN32API SetMessageExtraInfo(LPARAM lParam)
3781{
3782#ifdef DEBUG
3783 WriteLog("USER32: SetMessageExtraInfo, not implemented\n");
3784#endif
3785 return(0);
3786}
3787//******************************************************************************
3788//******************************************************************************
3789BOOL WIN32API ActivateKeyboardLayout(HKL hkl, UINT fuFlags)
3790{
3791#ifdef DEBUG
3792 WriteLog("USER32: ActivateKeyboardLayout, not implemented\n");
3793#endif
3794 return(TRUE);
3795}
3796//******************************************************************************
3797//******************************************************************************
3798int WIN32API GetKeyboardLayoutList(int nBuff, HKL *lpList)
3799{
3800#ifdef DEBUG
3801 WriteLog("USER32: GetKeyboardLayoutList, not implemented\n");
3802#endif
3803 return(0);
3804}
3805//******************************************************************************
3806//******************************************************************************
3807HKL WIN32API GetKeyboardLayout(DWORD dwLayout)
3808{
3809#ifdef DEBUG
3810 WriteLog("USER32: GetKeyboardLayout, not implemented\n");
3811#endif
3812 return(0);
3813}
3814//******************************************************************************
3815//******************************************************************************
3816int WIN32API LookupIconIdFromDirectory(PBYTE presbits, BOOL fIcon)
3817{
3818#ifdef DEBUG
3819 WriteLog("USER32: LookupIconIdFromDirectory, not implemented\n");
3820#endif
3821 return(0);
3822}
3823//******************************************************************************
3824//******************************************************************************
3825int WIN32API LookupIconIdFromDirectoryEx(PBYTE presbits, BOOL fIcon,
3826 int cxDesired, int cyDesired,
3827 UINT Flags)
3828{
3829#ifdef DEBUG
3830 WriteLog("USER32: LookupIconIdFromDirectoryEx, not implemented\n");
3831#endif
3832 return(0);
3833}
3834//******************************************************************************
3835//DWORD idAttach; /* thread to attach */
3836//DWORD idAttachTo; /* thread to attach to */
3837//BOOL fAttach; /* attach or detach */
3838//******************************************************************************
3839BOOL WIN32API AttachThreadInput(DWORD idAttach, DWORD idAttachTo, BOOL fAttach)
3840{
3841#ifdef DEBUG
3842 WriteLog("USER32: AttachThreadInput, not implemented\n");
3843#endif
3844 return(TRUE);
3845}
3846//******************************************************************************
3847//******************************************************************************
3848BOOL WIN32API RegisterHotKey(HWND hwnd, int idHotKey, UINT fuModifiers, UINT uVirtKey)
3849{
3850#ifdef DEBUG
3851 WriteLog("USER32: RegisterHotKey, not implemented\n");
3852#endif
3853 return(TRUE);
3854}
3855//******************************************************************************
3856//******************************************************************************
3857BOOL WIN32API UnregisterHotKey(HWND hwnd, int idHotKey)
3858{
3859#ifdef DEBUG
3860 WriteLog("USER32: UnregisterHotKey, not implemented\n");
3861#endif
3862 return(TRUE);
3863}
3864//******************************************************************************
3865//******************************************************************************
3866BOOL WIN32API DrawStateA(HDC hdc, HBRUSH hbc, DRAWSTATEPROC lpOutputFunc,
3867 LPARAM lData, WPARAM wData, int x, int y, int cx,
3868 int cy, UINT fuFlags)
3869{
3870#ifdef DEBUG
3871 WriteLog("USER32: DrawStateA, not implemented\n");
3872#endif
3873 return(TRUE);
3874}
3875//******************************************************************************
3876//******************************************************************************
3877//******************************************************************************
3878//******************************************************************************
3879BOOL WIN32API SetWindowContextHelpId(HWND hwnd, DWORD dwContextHelpId)
3880{
3881#ifdef DEBUG
3882 WriteLog("USER32: SetWindowContextHelpId, not implemented\n");
3883#endif
3884 return(TRUE);
3885}
3886//******************************************************************************
3887//******************************************************************************
3888DWORD WIN32API GetWindowContextHelpId(HWND hwnd)
3889{
3890#ifdef DEBUG
3891 WriteLog("USER32: GetWindowContextHelpId, not implemented\n");
3892#endif
3893 return(0);
3894}
3895//******************************************************************************
3896//restores iconized window to previous size/position
3897//******************************************************************************
3898BOOL WIN32API OpenIcon(HWND hwnd)
3899{
3900#ifdef DEBUG
3901 WriteLog("USER32: OpenIcon\n");
3902#endif
3903 if(!IsIconic(hwnd))
3904 return FALSE;
3905 ShowWindow(hwnd, SW_SHOWNORMAL);
3906 return TRUE;
3907}
3908//******************************************************************************
3909//******************************************************************************
3910BOOL WIN32API IsWindowUnicode(HWND hwnd)
3911{
3912#ifdef DEBUG
3913 WriteLog("USER32: IsWindowUnicode, not implemented\n");
3914#endif
3915 return(FALSE);
3916}
3917//******************************************************************************
3918//******************************************************************************
3919BOOL WIN32API GetMonitorInfoA(HMONITOR,LPMONITORINFO)
3920{
3921#ifdef DEBUG
3922 WriteLog("USER32: GetMonitorInfoA not supported!!\n");
3923#endif
3924 return(FALSE);
3925}
3926//******************************************************************************
3927//******************************************************************************
3928BOOL WIN32API GetMonitorInfoW(HMONITOR,LPMONITORINFO)
3929{
3930#ifdef DEBUG
3931 WriteLog("USER32: GetMonitorInfoW not supported!!\n");
3932#endif
3933 return(FALSE);
3934}
3935//******************************************************************************
3936//******************************************************************************
3937HMONITOR WIN32API MonitorFromWindow(HWND hwnd, DWORD dwFlags)
3938{
3939#ifdef DEBUG
3940 WriteLog("USER32: MonitorFromWindow not correctly supported??\n");
3941#endif
3942 return(0);
3943}
3944//******************************************************************************
3945//******************************************************************************
3946HMONITOR WIN32API MonitorFromRect(LPRECT rect, DWORD dwFlags)
3947{
3948#ifdef DEBUG
3949 WriteLog("USER32: MonitorFromRect not correctly supported??\n");
3950#endif
3951 return(0);
3952}
3953//******************************************************************************
3954//******************************************************************************
3955HMONITOR WIN32API MonitorFromPoint(POINT point, DWORD dwflags)
3956{
3957#ifdef DEBUG
3958 WriteLog("USER32: MonitorFromPoint not correctly supported??\n");
3959#endif
3960 return(0);
3961}
3962//******************************************************************************
3963//******************************************************************************
3964BOOL WIN32API EnumDisplayMonitors(HDC,LPRECT,MONITORENUMPROC,LPARAM)
3965{
3966#ifdef DEBUG
3967 WriteLog("USER32: EnumDisplayMonitors not supported??\n");
3968#endif
3969 return(FALSE);
3970}
3971//******************************************************************************
3972//******************************************************************************
3973BOOL WIN32API EnumDisplaySettingsA(LPCSTR lpszDeviceName, DWORD iModeNum,
3974 LPDEVMODEA lpDevMode)
3975{
3976#ifdef DEBUG
3977 WriteLog("USER32: EnumDisplaySettingsA FAKED\n");
3978#endif
3979 switch(iModeNum) {
3980 case 0:
3981 lpDevMode->dmBitsPerPel = 16;
3982 lpDevMode->dmPelsWidth = 768;
3983 lpDevMode->dmPelsHeight = 1024;
3984 lpDevMode->dmDisplayFlags = 0;
3985 lpDevMode->dmDisplayFrequency = 70;
3986 break;
3987 case 1:
3988 lpDevMode->dmBitsPerPel = 16;
3989 lpDevMode->dmPelsWidth = 640;
3990 lpDevMode->dmPelsHeight = 480;
3991 lpDevMode->dmDisplayFlags = 0;
3992 lpDevMode->dmDisplayFrequency = 70;
3993 break;
3994 default:
3995 return(FALSE);
3996 }
3997 return(TRUE);
3998}
3999//******************************************************************************
4000//******************************************************************************
4001LONG WIN32API ChangeDisplaySettingsA(LPDEVMODEA lpDevMode, DWORD dwFlags)
4002{
4003#ifdef DEBUG
4004 if(lpDevMode) {
4005 WriteLog("USER32: ChangeDisplaySettingsA FAKED %X\n", dwFlags);
4006 WriteLog("USER32: ChangeDisplaySettingsA lpDevMode->dmBitsPerPel %d\n", lpDevMode->dmBitsPerPel);
4007 WriteLog("USER32: ChangeDisplaySettingsA lpDevMode->dmPelsWidth %d\n", lpDevMode->dmPelsWidth);
4008 WriteLog("USER32: ChangeDisplaySettingsA lpDevMode->dmPelsHeight %d\n", lpDevMode->dmPelsHeight);
4009 }
4010#endif
4011 return(DISP_CHANGE_SUCCESSFUL);
4012}
4013//******************************************************************************
4014//******************************************************************************
4015
4016
4017/*****************************************************************************
4018 * Name : BOOL WIN32API AnyPopup
4019 * Purpose : The AnyPopup function indicates whether an owned, visible,
4020 * top-level pop-up, or overlapped window exists on the screen. The
4021 * function searches the entire Windows screen, not just the calling
4022 * application's client area.
4023 * Parameters: VOID
4024 * Variables :
4025 * Result : If a pop-up window exists, the return value is TRUE even if the
4026 * pop-up window is completely covered by other windows. Otherwise,
4027 * it is FALSE.
4028 * Remark : AnyPopup is a Windows version 1.x function and is retained for
4029 * compatibility purposes. It is generally not useful.
4030 * Status : UNTESTED STUB
4031 *
4032 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4033 *****************************************************************************/
4034
4035BOOL WIN32API AnyPopup(VOID)
4036{
4037 dprintf(("USER32:AnyPopup() not implemented.\n"));
4038
4039 return (FALSE);
4040}
4041
4042
4043/*****************************************************************************
4044 * Name : long WIN32API BroadcastSystemMessage
4045 * Purpose : The BroadcastSystemMessage function sends a message to the given
4046 * recipients. The recipients can be applications, installable
4047 * drivers, Windows-based network drivers, system-level device
4048 * drivers, or any combination of these system components.
4049 * Parameters: DWORD dwFlags,
4050 LPDWORD lpdwRecipients,
4051 UINT uiMessage,
4052 WPARAM wParam,
4053 LPARAM lParam
4054 * Variables :
4055 * Result : If the function succeeds, the return value is a positive value.
4056 * If the function is unable to broadcast the message, the return value is -1.
4057 * If the dwFlags parameter is BSF_QUERY and at least one recipient returned FALSE to the corresponding message, the return value is zero.
4058 * Remark :
4059 * Status : UNTESTED STUB
4060 *
4061 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4062 *****************************************************************************/
4063
4064long WIN32API BroadcastSystemMessage(DWORD dwFlags,
4065 LPDWORD lpdwRecipients,
4066 UINT uiMessage,
4067 WPARAM wParam,
4068 LPARAM lParam)
4069{
4070 dprintf(("USER32:BroadcastSystemMessage(%08xh,%08xh,%08xh,%08xh,%08x) not implemented.\n",
4071 dwFlags,
4072 lpdwRecipients,
4073 uiMessage,
4074 wParam,
4075 lParam));
4076
4077 return (-1);
4078}
4079
4080
4081/*****************************************************************************
4082 * Name : WORD WIN32API CascadeWindows
4083 * Purpose : The CascadeWindows function cascades the specified windows or
4084 * the child windows of the specified parent window.
4085 * Parameters: HWND hwndParent handle of parent window
4086 * UINT wHow types of windows not to arrange
4087 * CONST RECT * lpRect rectangle to arrange windows in
4088 * UINT cKids number of windows to arrange
4089 * const HWND FAR * lpKids array of window handles
4090 * Variables :
4091 * Result : If the function succeeds, the return value is the number of windows arranged.
4092 * If the function fails, the return value is zero.
4093 * Remark :
4094 * Status : UNTESTED STUB
4095 *
4096 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4097 *****************************************************************************/
4098
4099WORD WIN32API CascadeWindows(HWND hwndParent,
4100 UINT wHow,
4101 CONST LPRECT lpRect,
4102 UINT cKids,
4103 const HWND *lpKids)
4104{
4105 dprintf(("USER32:CascadeWindows(%08xh,%u,%08xh,%u,%08x) not implemented.\n",
4106 hwndParent,
4107 wHow,
4108 lpRect,
4109 cKids,
4110 lpKids));
4111
4112 return (0);
4113}
4114
4115
4116/*****************************************************************************
4117 * Name : LONG WIN32API ChangeDisplaySettingsW
4118 * Purpose : The ChangeDisplaySettings function changes the display settings
4119 * to the specified graphics mode.
4120 * Parameters: LPDEVMODEW lpDevModeW
4121 * DWORD dwFlags
4122 * Variables :
4123 * Result : DISP_CHANGE_SUCCESSFUL The settings change was successful.
4124 * DISP_CHANGE_RESTART The computer must be restarted in order for the graphics mode to work.
4125 * DISP_CHANGE_BADFLAGS An invalid set of flags was passed in.
4126 * DISP_CHANGE_FAILED The display driver failed the specified graphics mode.
4127 * DISP_CHANGE_BADMODE The graphics mode is not supported.
4128 * DISP_CHANGE_NOTUPDATED Unable to write settings to the registry.
4129 * Remark :
4130 * Status : UNTESTED STUB
4131 *
4132 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4133 *****************************************************************************/
4134
4135LONG WIN32API ChangeDisplaySettingsW(LPDEVMODEW lpDevMode,
4136 DWORD dwFlags)
4137{
4138 dprintf(("USER32:ChangeDisplaySettingsW(%08xh,%08x) not implemented.\n",
4139 lpDevMode,
4140 dwFlags));
4141
4142 return (ChangeDisplaySettingsA((LPDEVMODEA)lpDevMode,
4143 dwFlags));
4144}
4145
4146/*****************************************************************************
4147 * Name : BOOL WIN32API CloseDesktop
4148 * Purpose : The CloseDesktop function closes an open handle of a desktop
4149 * object. A desktop is a secure object contained within a window
4150 * station object. A desktop has a logical display surface and
4151 * contains windows, menus and hooks.
4152 * Parameters: HDESK hDesktop
4153 * Variables :
4154 * Result : If the function succeeds, the return value is TRUE.
4155 * If the functions fails, the return value is FALSE. To get
4156 * extended error information, call GetLastError.
4157 * Remark :
4158 * Status : UNTESTED STUB
4159 *
4160 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4161 *****************************************************************************/
4162
4163BOOL WIN32API CloseDesktop(HDESK hDesktop)
4164{
4165 dprintf(("USER32:CloseDesktop(%08x) not implemented.\n",
4166 hDesktop));
4167
4168 return (FALSE);
4169}
4170
4171
4172/*****************************************************************************
4173 * Name : BOOL WIN32API CloseWindowStation
4174 * Purpose : The CloseWindowStation function closes an open window station handle.
4175 * Parameters: HWINSTA hWinSta
4176 * Variables :
4177 * Result :
4178 * Remark : If the function succeeds, the return value is TRUE.
4179 * If the functions fails, the return value is FALSE. To get
4180 * extended error information, call GetLastError.
4181 * Status : UNTESTED STUB
4182 *
4183 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4184 *****************************************************************************/
4185
4186BOOL WIN32API CloseWindowStation(HWINSTA hWinSta)
4187{
4188 dprintf(("USER32:CloseWindowStation(%08x) not implemented.\n",
4189 hWinSta));
4190
4191 return (FALSE);
4192}
4193
4194
4195/*****************************************************************************
4196 * Name : HDESK WIN32API CreateDesktopA
4197 * Purpose : The CreateDesktop function creates a new desktop on the window
4198 * station associated with the calling process.
4199 * Parameters: LPCTSTR lpszDesktop name of the new desktop
4200 * LPCTSTR lpszDevice name of display device to assign to the desktop
4201 * LPDEVMODE pDevMode reserved; must be NULL
4202 * DWORD dwFlags flags to control interaction with other applications
4203 * DWORD dwDesiredAccess specifies access of returned handle
4204 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the desktop
4205 * Variables :
4206 * Result : If the function succeeds, the return value is a handle of the
4207 * newly created desktop.
4208 * If the function fails, the return value is NULL. To get extended
4209 * error information, call GetLastError.
4210 * Remark :
4211 * Status : UNTESTED STUB
4212 *
4213 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4214 *****************************************************************************/
4215
4216HDESK WIN32API CreateDesktopA(LPCTSTR lpszDesktop,
4217 LPCTSTR lpszDevice,
4218 LPDEVMODEA pDevMode,
4219 DWORD dwFlags,
4220 DWORD dwDesiredAccess,
4221 LPSECURITY_ATTRIBUTES lpsa)
4222{
4223 dprintf(("USER32:CreateDesktopA(%s,%s,%08xh,%08xh,%08xh,%08x) not implemented.\n",
4224 lpszDesktop,
4225 lpszDevice,
4226 pDevMode,
4227 dwFlags,
4228 dwDesiredAccess,
4229 lpsa));
4230
4231 return (NULL);
4232}
4233
4234
4235/*****************************************************************************
4236 * Name : HDESK WIN32API CreateDesktopW
4237 * Purpose : The CreateDesktop function creates a new desktop on the window
4238 * station associated with the calling process.
4239 * Parameters: LPCTSTR lpszDesktop name of the new desktop
4240 * LPCTSTR lpszDevice name of display device to assign to the desktop
4241 * LPDEVMODE pDevMode reserved; must be NULL
4242 * DWORD dwFlags flags to control interaction with other applications
4243 * DWORD dwDesiredAccess specifies access of returned handle
4244 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the desktop
4245 * Variables :
4246 * Result : If the function succeeds, the return value is a handle of the
4247 * newly created desktop.
4248 * If the function fails, the return value is NULL. To get extended
4249 * error information, call GetLastError.
4250 * Remark :
4251 * Status : UNTESTED STUB
4252 *
4253 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4254 *****************************************************************************/
4255
4256HDESK WIN32API CreateDesktopW(LPCTSTR lpszDesktop,
4257 LPCTSTR lpszDevice,
4258 LPDEVMODEW pDevMode,
4259 DWORD dwFlags,
4260 DWORD dwDesiredAccess,
4261 LPSECURITY_ATTRIBUTES lpsa)
4262{
4263 dprintf(("USER32:CreateDesktopW(%s,%s,%08xh,%08xh,%08xh,%08x) not implemented.\n",
4264 lpszDesktop,
4265 lpszDevice,
4266 pDevMode,
4267 dwFlags,
4268 dwDesiredAccess,
4269 lpsa));
4270
4271 return (NULL);
4272}
4273
4274
4275/*****************************************************************************
4276 * Name : HWINSTA WIN32API CreateWindowStationA
4277 * Purpose : The CreateWindowStation function creates a window station object.
4278 * It returns a handle that can be used to access the window station.
4279 * A window station is a secure object that contains a set of global
4280 * atoms, a clipboard, and a set of desktop objects.
4281 * Parameters: LPTSTR lpwinsta name of the new window station
4282 * DWORD dwReserved reserved; must be NULL
4283 * DWORD dwDesiredAccess specifies access of returned handle
4284 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the window station
4285 * Variables :
4286 * Result : If the function succeeds, the return value is the handle to the
4287 * newly created window station.
4288 * If the function fails, the return value is NULL. To get extended
4289 * error information, call GetLastError.
4290 * Remark :
4291 * Status : UNTESTED STUB
4292 *
4293 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4294 *****************************************************************************/
4295
4296HWINSTA WIN32API CreateWindowStationA(LPTSTR lpWinSta,
4297 DWORD dwReserved,
4298 DWORD dwDesiredAccess,
4299 LPSECURITY_ATTRIBUTES lpsa)
4300{
4301 dprintf(("USER32:CreateWindowStationA(%s,%08xh,%08xh,%08x) not implemented.\n",
4302 lpWinSta,
4303 dwReserved,
4304 dwDesiredAccess,
4305 lpsa));
4306
4307 return (NULL);
4308}
4309
4310
4311/*****************************************************************************
4312 * Name : HWINSTA WIN32API CreateWindowStationW
4313 * Purpose : The CreateWindowStation function creates a window station object.
4314 * It returns a handle that can be used to access the window station.
4315 * A window station is a secure object that contains a set of global
4316 * atoms, a clipboard, and a set of desktop objects.
4317 * Parameters: LPTSTR lpwinsta name of the new window station
4318 * DWORD dwReserved reserved; must be NULL
4319 * DWORD dwDesiredAccess specifies access of returned handle
4320 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the window station
4321 * Variables :
4322 * Result : If the function succeeds, the return value is the handle to the
4323 * newly created window station.
4324 * If the function fails, the return value is NULL. To get extended
4325 * error information, call GetLastError.
4326 * Remark :
4327 * Status : UNTESTED STUB
4328 *
4329 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4330 *****************************************************************************/
4331
4332HWINSTA WIN32API CreateWindowStationW(LPWSTR lpWinSta,
4333 DWORD dwReserved,
4334 DWORD dwDesiredAccess,
4335 LPSECURITY_ATTRIBUTES lpsa)
4336{
4337 dprintf(("USER32:CreateWindowStationW(%s,%08xh,%08xh,%08x) not implemented.\n",
4338 lpWinSta,
4339 dwReserved,
4340 dwDesiredAccess,
4341 lpsa));
4342
4343 return (NULL);
4344}
4345
4346/*****************************************************************************
4347 * Name : BOOL WIN32API DragDetect
4348 * Purpose : The DragDetect function captures the mouse and tracks its movement
4349 * Parameters: HWND hwnd
4350 * POINT pt
4351 * Variables :
4352 * Result : If the user moved the mouse outside of the drag rectangle while
4353 * holding the left button down, the return value is TRUE.
4354 * If the user did not move the mouse outside of the drag rectangle
4355 * while holding the left button down, the return value is FALSE.
4356 * Remark :
4357 * Status : UNTESTED STUB
4358 *
4359 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4360 *****************************************************************************/
4361
4362BOOL WIN32API DragDetect(HWND hwnd,
4363 POINT pt)
4364{
4365 dprintf(("USER32:DragDetect(%08xh,...) not implemented.\n",
4366 hwnd));
4367
4368 return (FALSE);
4369}
4370
4371
4372/*****************************************************************************
4373 * Name : BOOL WIN32API DrawAnimatedRects
4374 * Purpose : The DrawAnimatedRects function draws a wire-frame rectangle
4375 * and animates it to indicate the opening of an icon or the
4376 * minimizing or maximizing of a window.
4377 * Parameters: HWND hwnd handle of clipping window
4378 * int idAni type of animation
4379 * CONST RECT * lprcFrom address of rectangle coordinates (minimized)
4380 * CONST RECT * lprcTo address of rectangle coordinates (restored)
4381 * Variables :
4382 * Result : If the function succeeds, the return value is TRUE.
4383 * If the function fails, the return value is FALSE.
4384 * Remark :
4385 * Status : UNTESTED STUB
4386 *
4387 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4388 *****************************************************************************/
4389
4390BOOL WIN32API DrawAnimatedRects(HWND hwnd,
4391 int idAni,
4392 CONST RECT *lprcFrom,
4393 CONST RECT *lprcTo)
4394{
4395 dprintf(("USER32:DrawAnimatedRects (%08xh,%u,%08xh,%08x) not implemented.\n",
4396 hwnd,
4397 idAni,
4398 lprcFrom,
4399 lprcTo));
4400
4401 return (TRUE);
4402}
4403
4404
4405/*****************************************************************************
4406 * Name : VOID WIN32API DrawCaption
4407 * Purpose : The DrawCaption function draws a window caption.
4408 * Parameters: HDC hdc handle of device context
4409 * LPRECT lprc address of bounding rectangle coordinates
4410 * HFONT hfont handle of font for caption
4411 * HICON hicon handle of icon in caption
4412 * LPSTR lpszText address of caption string
4413 * WORD wFlags drawing options
4414 * Variables :
4415 * Result :
4416 * Remark :
4417 * Status : UNTESTED STUB
4418 *
4419 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4420 *****************************************************************************/
4421
4422BOOL WIN32API DrawCaption (HWND hwnd,
4423 HDC hdc,
4424 const RECT *lprc,
4425 UINT wFlags)
4426{
4427 dprintf(("USER32:DrawCaption (%08xh,%08xh,%08xh,%08xh) not implemented.\n",
4428 hwnd,
4429 hdc,
4430 lprc,
4431 wFlags));
4432
4433 return FALSE;
4434}
4435
4436
4437/*****************************************************************************
4438 * Name :
4439 * Purpose :
4440 * Parameters:
4441 * Variables :
4442 * Result :
4443 * Remark :
4444 * Status : UNTESTED STUB
4445 *
4446 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4447 *****************************************************************************/
4448
4449BOOL WIN32API DrawStateW(HDC hdc,
4450 HBRUSH hBrush,
4451 DRAWSTATEPROC lpOutputFunc,
4452 LPARAM lParam,
4453 WPARAM wParam,
4454 int x,
4455 int y,
4456 int cx,
4457 int cy,
4458 UINT fuFlags)
4459{
4460 dprintf(("USER32:DrawStateW (%08xh,%08xh,%08xh,%08xh,%08xh,%d,%d,%d,%d,%08x) not implemented.\n",
4461 hdc,
4462 hBrush,
4463 lpOutputFunc,
4464 lParam,
4465 wParam,
4466 x,
4467 y,
4468 cx,
4469 cy,
4470 fuFlags));
4471
4472 return(DrawStateA(hdc,
4473 hBrush,
4474 lpOutputFunc,
4475 lParam,
4476 wParam,
4477 x,
4478 y,
4479 cx,
4480 cy,
4481 fuFlags));
4482}
4483
4484
4485/*****************************************************************************
4486 * Name : BOOL WIN32API EnumDesktopWindows
4487 * Purpose : The EnumDesktopWindows function enumerates all windows in a
4488 * desktop by passing the handle of each window, in turn, to an
4489 * application-defined callback function.
4490 * Parameters: HDESK hDesktop handle of desktop to enumerate
4491 * WNDENUMPROC lpfn points to application's callback function
4492 * LPARAM lParam 32-bit value to pass to the callback function
4493 * Variables :
4494 * Result : If the function succeeds, the return value is TRUE.
4495 * If the function fails, the return value is FALSE. To get
4496 * extended error information, call GetLastError.
4497 * Remark :
4498 * Status : UNTESTED STUB
4499 *
4500 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4501 *****************************************************************************/
4502
4503BOOL WIN32API EnumDesktopWindows(HDESK hDesktop,
4504 WNDENUMPROC lpfn,
4505 LPARAM lParam)
4506{
4507 dprintf(("USER32:EnumDesktopWindows (%08xh,%08xh,%08x) not implemented.\n",
4508 hDesktop,
4509 lpfn,
4510 lParam));
4511
4512 return (FALSE);
4513}
4514
4515
4516/*****************************************************************************
4517 * Name : BOOL WIN32API EnumDesktopsA
4518 * Purpose : The EnumDesktops function enumerates all desktops in the window
4519 * station assigned to the calling process. The function does so by
4520 * passing the name of each desktop, in turn, to an application-
4521 * defined callback function.
4522 * Parameters: HWINSTA hwinsta handle of window station to enumerate
4523 * DESKTOPENUMPROC lpEnumFunc points to application's callback function
4524 * LPARAM lParam 32-bit value to pass to the callback function
4525 * Variables :
4526 * Result : If the function succeeds, the return value is TRUE.
4527 * If the function fails, the return value is FALSE. To get extended
4528 * error information, call GetLastError.
4529 * Remark :
4530 * Status : UNTESTED STUB
4531 *
4532 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4533 *****************************************************************************/
4534
4535BOOL WIN32API EnumDesktopsA(HWINSTA hWinSta,
4536 DESKTOPENUMPROCA lpEnumFunc,
4537 LPARAM lParam)
4538{
4539 dprintf(("USER32:EnumDesktopsA (%08xh,%08xh,%08x) not implemented.\n",
4540 hWinSta,
4541 lpEnumFunc,
4542 lParam));
4543
4544 return (FALSE);
4545}
4546
4547
4548/*****************************************************************************
4549 * Name : BOOL WIN32API EnumDesktopsW
4550 * Purpose : The EnumDesktops function enumerates all desktops in the window
4551 * station assigned to the calling process. The function does so by
4552 * passing the name of each desktop, in turn, to an application-
4553 * defined callback function.
4554 * Parameters: HWINSTA hwinsta handle of window station to enumerate
4555 * DESKTOPENUMPROC lpEnumFunc points to application's callback function
4556 * LPARAM lParam 32-bit value to pass to the callback function
4557 * Variables :
4558 * Result : If the function succeeds, the return value is TRUE.
4559 * If the function fails, the return value is FALSE. To get extended
4560 * error information, call GetLastError.
4561 * Remark :
4562 * Status : UNTESTED STUB
4563 *
4564 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4565 *****************************************************************************/
4566
4567BOOL WIN32API EnumDesktopsW(HWINSTA hWinSta,
4568 DESKTOPENUMPROCW lpEnumFunc,
4569 LPARAM lParam)
4570{
4571 dprintf(("USER32:EnumDesktopsW (%08xh,%08xh,%08x) not implemented.\n",
4572 hWinSta,
4573 lpEnumFunc,
4574 lParam));
4575
4576 return (FALSE);
4577}
4578
4579
4580
4581/*****************************************************************************
4582 * Name : BOOL WIN32API EnumDisplaySettingsW
4583 * Purpose : The EnumDisplaySettings function obtains information about one
4584 * of a display device's graphics modes. You can obtain information
4585 * for all of a display device's graphics modes by making a series
4586 * of calls to this function.
4587 * Parameters: LPCTSTR lpszDeviceName specifies the display device
4588 * DWORD iModeNum specifies the graphics mode
4589 * LPDEVMODE lpDevMode points to structure to receive settings
4590 * Variables :
4591 * Result : If the function succeeds, the return value is TRUE.
4592 * If the function fails, the return value is FALSE.
4593 * Remark :
4594 * Status : UNTESTED STUB
4595 *
4596 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4597 *****************************************************************************/
4598
4599BOOL WIN32API EnumDisplaySettingsW(LPCSTR lpszDeviceName,
4600 DWORD iModeNum,
4601 LPDEVMODEW lpDevMode)
4602{
4603 dprintf(("USER32:EnumDisplaySettingsW (%s,%08xh,%08x) not implemented.\n",
4604 lpszDeviceName,
4605 iModeNum,
4606 lpDevMode));
4607
4608 return (EnumDisplaySettingsA(lpszDeviceName,
4609 iModeNum,
4610 (LPDEVMODEA)lpDevMode));
4611}
4612
4613
4614/*****************************************************************************
4615 * Name : BOOL WIN32API EnumWindowStationsA
4616 * Purpose : The EnumWindowStations function enumerates all windowstations
4617 * in the system by passing the name of each window station, in
4618 * turn, to an application-defined callback function.
4619 * Parameters:
4620 * Variables : WINSTAENUMPROC lpEnumFunc points to application's callback function
4621 * LPARAM lParam 32-bit value to pass to the callback function
4622 * Result : If the function succeeds, the return value is TRUE.
4623 * If the function fails the return value is FALSE. To get extended
4624 * error information, call GetLastError.
4625 * Remark :
4626 * Status : UNTESTED STUB
4627 *
4628 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4629 *****************************************************************************/
4630
4631BOOL WIN32API EnumWindowStationsA(WINSTAENUMPROCA lpEnumFunc,
4632 LPARAM lParam)
4633{
4634 dprintf(("USER32:EnumWindowStationsA (%08xh,%08x) not implemented.\n",
4635 lpEnumFunc,
4636 lParam));
4637
4638 return (FALSE);
4639}
4640
4641
4642/*****************************************************************************
4643 * Name : BOOL WIN32API EnumWindowStationsW
4644 * Purpose : The EnumWindowStations function enumerates all windowstations
4645 * in the system by passing the name of each window station, in
4646 * turn, to an application-defined callback function.
4647 * Parameters:
4648 * Variables : WINSTAENUMPROC lpEnumFunc points to application's callback function
4649 * LPARAM lParam 32-bit value to pass to the callback function
4650 * Result : If the function succeeds, the return value is TRUE.
4651 * If the function fails the return value is FALSE. To get extended
4652 * error information, call GetLastError.
4653 * Remark :
4654 * Status : UNTESTED STUB
4655 *
4656 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4657 *****************************************************************************/
4658
4659BOOL WIN32API EnumWindowStationsW(WINSTAENUMPROCW lpEnumFunc,
4660 LPARAM lParam)
4661{
4662 dprintf(("USER32:EnumWindowStationsW (%08xh,%08x) not implemented.\n",
4663 lpEnumFunc,
4664 lParam));
4665
4666 return (FALSE);
4667}
4668
4669
4670/*****************************************************************************
4671 * Name : HWND WIN32API FindWindowExW
4672 * Purpose : The FindWindowEx function retrieves the handle of a window whose
4673 * class name and window name match the specified strings. The
4674 * function searches child windows, beginning with the one following
4675 * the given child window.
4676 * Parameters: HWND hwndParent handle of parent window
4677 * HWND hwndChildAfter handle of a child window
4678 * LPCTSTR lpszClass address of class name
4679 * LPCTSTR lpszWindow address of window name
4680 * Variables :
4681 * Result : If the function succeeds, the return value is the handle of the
4682 * window that has the specified class and window names.
4683 * If the function fails, the return value is NULL. To get extended
4684 * error information, call GetLastError.
4685 * Remark :
4686 * Status : UNTESTED STUB
4687 *
4688 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4689 *****************************************************************************/
4690
4691HWND WIN32API FindWindowExW(HWND hwndParent,
4692 HWND hwndChildAfter,
4693 LPCWSTR lpszClass,
4694 LPCWSTR lpszWindow)
4695{
4696 dprintf(("USER32:FindWindowExW (%08xh,%08xh,%s,%s) not implemented.\n",
4697 hwndParent,
4698 hwndChildAfter,
4699 lpszClass,
4700 lpszWindow));
4701
4702 return (NULL);
4703}
4704
4705/*****************************************************************************
4706 * Name : BOOL WIN32API GetInputState
4707 * Purpose : The GetInputState function determines whether there are
4708 * mouse-button or keyboard messages in the calling thread's message queue.
4709 * Parameters:
4710 * Variables :
4711 * Result : If the queue contains one or more new mouse-button or keyboard
4712 * messages, the return value is TRUE.
4713 * If the function fails, the return value is FALSE.
4714 * Remark :
4715 * Status : UNTESTED STUB
4716 *
4717 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4718 *****************************************************************************/
4719
4720BOOL WIN32API GetInputState(VOID)
4721{
4722 dprintf(("USER32:GetInputState () not implemented.\n"));
4723
4724 return (FALSE);
4725}
4726
4727
4728/*****************************************************************************
4729 * Name : UINT WIN32API GetKBCodePage
4730 * Purpose : The GetKBCodePage function is provided for compatibility with
4731 * earlier versions of Windows. In the Win32 application programming
4732 * interface (API) it just calls the GetOEMCP function.
4733 * Parameters:
4734 * Variables :
4735 * Result : If the function succeeds, the return value is an OEM code-page
4736 * identifier, or it is the default identifier if the registry
4737 * value is not readable. For a list of OEM code-page identifiers,
4738 * see GetOEMCP.
4739 * Remark :
4740 * Status : UNTESTED
4741 *
4742 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4743 *****************************************************************************/
4744
4745UINT WIN32API GetKBCodePage(VOID)
4746{
4747 return (GetOEMCP());
4748}
4749
4750
4751/*****************************************************************************
4752 * Name : BOOL WIN32API GetKeyboardLayoutNameA
4753 * Purpose : The GetKeyboardLayoutName function retrieves the name of the
4754 * active keyboard layout.
4755 * Parameters: LPTSTR pwszKLID address of buffer for layout name
4756 * Variables :
4757 * Result : If the function succeeds, the return value is TRUE.
4758 * If the function fails, the return value is FALSE. To get extended
4759 * error information, call GetLastError.
4760 * Remark :
4761 * Status : UNTESTED STUB
4762 *
4763 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4764 *****************************************************************************/
4765
4766BOOL WIN32API GetKeyboardLayoutNameA(LPTSTR pwszKLID)
4767{
4768 dprintf(("USER32:GetKeyboardLayoutNameA (%08x) not implemented.",
4769 pwszKLID));
4770
4771 return(FALSE);
4772}
4773
4774
4775/*****************************************************************************
4776 * Name : BOOL WIN32API GetKeyboardLayoutNameW
4777 * Purpose : The GetKeyboardLayoutName function retrieves the name of the
4778 * active keyboard layout.
4779 * Parameters: LPTSTR pwszKLID address of buffer for layout name
4780 * Variables :
4781 * Result : If the function succeeds, the return value is TRUE.
4782 * If the function fails, the return value is FALSE. To get extended
4783 * error information, call GetLastError.
4784 * Remark :
4785 * Status : UNTESTED STUB
4786 *
4787 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4788 *****************************************************************************/
4789
4790BOOL WIN32API GetKeyboardLayoutNameW(LPWSTR pwszKLID)
4791{
4792 dprintf(("USER32:GetKeyboardLayoutNameW (%08x) not implemented.",
4793 pwszKLID));
4794
4795 return(FALSE);
4796}
4797
4798
4799
4800
4801/*****************************************************************************
4802 * Name : HWINSTA WIN32API GetProcessWindowStation
4803 * Purpose : The GetProcessWindowStation function returns a handle of the
4804 * window station associated with the calling process.
4805 * Parameters:
4806 * Variables :
4807 * Result : If the function succeeds, the return value is a handle of the
4808 * window station associated with the calling process.
4809 * If the function fails, the return value is NULL. This can occur
4810 * if the calling process is not an application written for Windows
4811 * NT. To get extended error information, call GetLastError.
4812 * Remark :
4813 * Status : UNTESTED STUB
4814 *
4815 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4816 *****************************************************************************/
4817
4818HWINSTA WIN32API GetProcessWindowStation(VOID)
4819{
4820 dprintf(("USER32:GetProcessWindowStation () not implemented.\n"));
4821
4822 return (NULL);
4823}
4824
4825
4826
4827/*****************************************************************************
4828 * Name : HDESK WIN32API GetThreadDesktop
4829 * Purpose : The GetThreadDesktop function returns a handle to the desktop
4830 * associated with a specified thread.
4831 * Parameters: DWORD dwThreadId thread identifier
4832 * Variables :
4833 * Result : If the function succeeds, the return value is the handle of the
4834 * desktop associated with the specified thread.
4835 * Remark :
4836 * Status : UNTESTED STUB
4837 *
4838 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4839 *****************************************************************************/
4840
4841HDESK WIN32API GetThreadDesktop(DWORD dwThreadId)
4842{
4843 dprintf(("USER32:GetThreadDesktop (%u) not implemented.\n",
4844 dwThreadId));
4845
4846 return (NULL);
4847}
4848
4849
4850/*****************************************************************************
4851 * Name : BOOL WIN32API GetUserObjectInformationA
4852 * Purpose : The GetUserObjectInformation function returns information about
4853 * a window station or desktop object.
4854 * Parameters: HANDLE hObj handle of object to get information for
4855 * int nIndex type of information to get
4856 * PVOID pvInfo points to buffer that receives the information
4857 * DWORD nLength size, in bytes, of pvInfo buffer
4858 * LPDWORD lpnLengthNeeded receives required size, in bytes, of pvInfo buffer
4859 * Variables :
4860 * Result : If the function succeeds, the return value is TRUE.
4861 * If the function fails, the return value is FALSE. To get extended
4862 * error information, call GetLastError.
4863 * Remark :
4864 * Status : UNTESTED STUB
4865 *
4866 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4867 *****************************************************************************/
4868
4869BOOL WIN32API GetUserObjectInformationA(HANDLE hObj,
4870 int nIndex,
4871 PVOID pvInfo,
4872 DWORD nLength,
4873 LPDWORD lpnLengthNeeded)
4874{
4875 dprintf(("USER32:GetUserObjectInformationA (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
4876 hObj,
4877 nIndex,
4878 pvInfo,
4879 nLength,
4880 lpnLengthNeeded));
4881
4882 return (FALSE);
4883}
4884
4885
4886/*****************************************************************************
4887 * Name : BOOL WIN32API GetUserObjectInformationW
4888 * Purpose : The GetUserObjectInformation function returns information about
4889 * a window station or desktop object.
4890 * Parameters: HANDLE hObj handle of object to get information for
4891 * int nIndex type of information to get
4892 * PVOID pvInfo points to buffer that receives the information
4893 * DWORD nLength size, in bytes, of pvInfo buffer
4894 * LPDWORD lpnLengthNeeded receives required size, in bytes, of pvInfo buffer
4895 * Variables :
4896 * Result : If the function succeeds, the return value is TRUE.
4897 * If the function fails, the return value is FALSE. To get extended
4898 * error information, call GetLastError.
4899 * Remark :
4900 * Status : UNTESTED STUB
4901 *
4902 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4903 *****************************************************************************/
4904
4905BOOL WIN32API GetUserObjectInformationW(HANDLE hObj,
4906 int nIndex,
4907 PVOID pvInfo,
4908 DWORD nLength,
4909 LPDWORD lpnLengthNeeded)
4910{
4911 dprintf(("USER32:GetUserObjectInformationW (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
4912 hObj,
4913 nIndex,
4914 pvInfo,
4915 nLength,
4916 lpnLengthNeeded));
4917
4918 return (FALSE);
4919}
4920
4921
4922/*****************************************************************************
4923 * Name : BOOL WIN32API GetUserObjectSecurity
4924 * Purpose : The GetUserObjectSecurity function retrieves security information
4925 * for the specified user object.
4926 * Parameters: HANDLE hObj handle of user object
4927 * SECURITY_INFORMATION * pSIRequested address of requested security information
4928 * LPSECURITY_DESCRIPTOR pSID address of security descriptor
4929 * DWORD nLength size of buffer for security descriptor
4930 * LPDWORD lpnLengthNeeded address of required size of buffer
4931 * Variables :
4932 * Result : If the function succeeds, the return value is TRUE.
4933 * If the function fails, the return value is FALSE. To get extended
4934 * error information, call GetLastError.
4935 * Remark :
4936 * Status : UNTESTED STUB
4937 *
4938 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4939 *****************************************************************************/
4940
4941BOOL WIN32API GetUserObjectSecurity(HANDLE hObj,
4942 SECURITY_INFORMATION * pSIRequested,
4943 LPSECURITY_DESCRIPTOR pSID,
4944 DWORD nLength,
4945 LPDWORD lpnLengthNeeded)
4946{
4947 dprintf(("USER32:GetUserObjectSecurity (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
4948 hObj,
4949 pSIRequested,
4950 pSID,
4951 nLength,
4952 lpnLengthNeeded));
4953
4954 return (FALSE);
4955}
4956
4957
4958
4959/*****************************************************************************
4960 * Name : int WIN32API GetWindowRgn
4961 * Purpose : The GetWindowRgn function obtains a copy of the window region of a window.
4962 * Parameters: HWND hWnd handle to window whose window region is to be obtained
4963 * HRGN hRgn handle to region that receives a copy of the window region
4964 * Variables :
4965 * Result : NULLREGION, SIMPLEREGION, COMPLEXREGION, ERROR
4966 * Remark :
4967 * Status : UNTESTED STUB
4968 *
4969 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4970 *****************************************************************************/
4971
4972int WIN32API GetWindowRgn (HWND hWnd,
4973 HRGN hRgn)
4974{
4975 dprintf(("USER32:GetWindowRgn (%08xh,%08x) not implemented.\n",
4976 hWnd,
4977 hRgn));
4978
4979 return (NULLREGION);
4980}
4981
4982
4983
4984/*****************************************************************************
4985 * Name : HCURSOR WIN32API LoadCursorFromFileA
4986 * Purpose : The LoadCursorFromFile function creates a cursor based on data
4987 * contained in a file. The file is specified by its name or by a
4988 * system cursor identifier. The function returns a handle to the
4989 * newly created cursor. Files containing cursor data may be in
4990 * either cursor (.CUR) or animated cursor (.ANI) format.
4991 * Parameters: LPCTSTR lpFileName pointer to cursor file, or system cursor id
4992 * Variables :
4993 * Result : If the function is successful, the return value is a handle to
4994 * the new cursor.
4995 * If the function fails, the return value is NULL. To get extended
4996 * error information, call GetLastError. GetLastError may return
4997 * the following
4998 * Remark :
4999 * Status : UNTESTED STUB
5000 *
5001 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5002 *****************************************************************************/
5003
5004HCURSOR WIN32API LoadCursorFromFileA(LPCTSTR lpFileName)
5005{
5006 dprintf(("USER32:LoadCursorFromFileA (%s) not implemented.\n",
5007 lpFileName));
5008
5009 return (NULL);
5010}
5011
5012
5013/*****************************************************************************
5014 * Name : HCURSOR WIN32API LoadCursorFromFileW
5015 * Purpose : The LoadCursorFromFile function creates a cursor based on data
5016 * contained in a file. The file is specified by its name or by a
5017 * system cursor identifier. The function returns a handle to the
5018 * newly created cursor. Files containing cursor data may be in
5019 * either cursor (.CUR) or animated cursor (.ANI) format.
5020 * Parameters: LPCTSTR lpFileName pointer to cursor file, or system cursor id
5021 * Variables :
5022 * Result : If the function is successful, the return value is a handle to
5023 * the new cursor.
5024 * If the function fails, the return value is NULL. To get extended
5025 * error information, call GetLastError. GetLastError may return
5026 * the following
5027 * Remark :
5028 * Status : UNTESTED STUB
5029 *
5030 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5031 *****************************************************************************/
5032
5033HCURSOR WIN32API LoadCursorFromFileW(LPCWSTR lpFileName)
5034{
5035 dprintf(("USER32:LoadCursorFromFileW (%s) not implemented.\n",
5036 lpFileName));
5037
5038 return (NULL);
5039}
5040
5041
5042/*****************************************************************************
5043 * Name : HLK WIN32API LoadKeyboardLayoutA
5044 * Purpose : The LoadKeyboardLayout function loads a new keyboard layout into
5045 * the system. Several keyboard layouts can be loaded at a time, but
5046 * only one per process is active at a time. Loading multiple keyboard
5047 * layouts makes it possible to rapidly switch between layouts.
5048 * Parameters:
5049 * Variables :
5050 * Result : If the function succeeds, the return value is the handle of the
5051 * keyboard layout.
5052 * If the function fails, the return value is NULL. To get extended
5053 * error information, call GetLastError.
5054 * Remark :
5055 * Status : UNTESTED STUB
5056 *
5057 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5058 *****************************************************************************/
5059
5060HKL WIN32API LoadKeyboardLayoutA(LPCTSTR pwszKLID,
5061 UINT Flags)
5062{
5063 dprintf(("USER32:LeadKeyboardLayoutA (%s,%u) not implemented.\n",
5064 pwszKLID,
5065 Flags));
5066
5067 return (NULL);
5068}
5069
5070
5071/*****************************************************************************
5072 * Name : HLK WIN32API LoadKeyboardLayoutW
5073 * Purpose : The LoadKeyboardLayout function loads a new keyboard layout into
5074 * the system. Several keyboard layouts can be loaded at a time, but
5075 * only one per process is active at a time. Loading multiple keyboard
5076 * layouts makes it possible to rapidly switch between layouts.
5077 * Parameters:
5078 * Variables :
5079 * Result : If the function succeeds, the return value is the handle of the
5080 * keyboard layout.
5081 * If the function fails, the return value is NULL. To get extended
5082 * error information, call GetLastError.
5083 * Remark :
5084 * Status : UNTESTED STUB
5085 *
5086 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5087 *****************************************************************************/
5088
5089HKL WIN32API LoadKeyboardLayoutW(LPCWSTR pwszKLID,
5090 UINT Flags)
5091{
5092 dprintf(("USER32:LeadKeyboardLayoutW (%s,%u) not implemented.\n",
5093 pwszKLID,
5094 Flags));
5095
5096 return (NULL);
5097}
5098
5099
5100/*****************************************************************************
5101 * Name : UINT WIN32API MapVirtualKeyExA
5102 * Purpose : The MapVirtualKeyEx function translates (maps) a virtual-key
5103 * code into a scan code or character value, or translates a scan
5104 * code into a virtual-key code. The function translates the codes
5105 * using the input language and physical keyboard layout identified
5106 * by the given keyboard layout handle.
5107 * Parameters:
5108 * Variables :
5109 * Result : The return value is either a scan code, a virtual-key code, or
5110 * a character value, depending on the value of uCode and uMapType.
5111 * If there is no translation, the return value is zero.
5112 * Remark :
5113 * Status : UNTESTED STUB
5114 *
5115 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5116 *****************************************************************************/
5117
5118UINT WIN32API MapVirtualKeyExA(UINT uCode,
5119 UINT uMapType,
5120 HKL dwhkl)
5121{
5122 dprintf(("USER32:MapVirtualKeyExA (%u,%u,%08x) not implemented.\n",
5123 uCode,
5124 uMapType,
5125 dwhkl));
5126
5127 return (0);
5128}
5129
5130
5131/*****************************************************************************
5132 * Name : UINT WIN32API MapVirtualKeyExW
5133 * Purpose : The MapVirtualKeyEx function translates (maps) a virtual-key
5134 * code into a scan code or character value, or translates a scan
5135 * code into a virtual-key code. The function translates the codes
5136 * using the input language and physical keyboard layout identified
5137 * by the given keyboard layout handle.
5138 * Parameters:
5139 * Variables :
5140 * Result : The return value is either a scan code, a virtual-key code, or
5141 * a character value, depending on the value of uCode and uMapType.
5142 * If there is no translation, the return value is zero.
5143 * Remark :
5144 * Status : UNTESTED STUB
5145 *
5146 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5147 *****************************************************************************/
5148
5149UINT WIN32API MapVirtualKeyExW(UINT uCode,
5150 UINT uMapType,
5151 HKL dwhkl)
5152{
5153 dprintf(("USER32:MapVirtualKeyExW (%u,%u,%08x) not implemented.\n",
5154 uCode,
5155 uMapType,
5156 dwhkl));
5157
5158 return (0);
5159}
5160
5161
5162/*****************************************************************************
5163 * Name : int WIN32API MessageBoxExA
5164 * Purpose : The MessageBoxEx function creates, displays, and operates a message box.
5165 * Parameters: HWND hWnd handle of owner window
5166 * LPCTSTR lpText address of text in message box
5167 * LPCTSTR lpCaption address of title of message box
5168 * UINT uType style of message box
5169 * WORD wLanguageId language identifier
5170 * Variables :
5171 * Result : If the function succeeds, the return value is a nonzero menu-item
5172 * value returned by the dialog box.
5173 * Remark :
5174 * Status : UNTESTED STUB
5175 *
5176 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5177 *****************************************************************************/
5178
5179int WIN32API MessageBoxExA(HWND hWnd,
5180 LPCTSTR lpText,
5181 LPCTSTR lpCaption,
5182 UINT uType,
5183 WORD wLanguageId)
5184{
5185 dprintf(("USER32:MessageBoxExA (%08xh,%s,%s,%u,%08w) not implemented.\n",
5186 hWnd,
5187 lpText,
5188 lpCaption,
5189 uType,
5190 wLanguageId));
5191
5192 return (MessageBoxA(hWnd,
5193 lpText,
5194 lpCaption,
5195 uType));
5196}
5197
5198
5199/*****************************************************************************
5200 * Name : int WIN32API MessageBoxExW
5201 * Purpose : The MessageBoxEx function creates, displays, and operates a message box.
5202 * Parameters: HWND hWnd handle of owner window
5203 * LPCTSTR lpText address of text in message box
5204 * LPCTSTR lpCaption address of title of message box
5205 * UINT uType style of message box
5206 * WORD wLanguageId language identifier
5207 * Variables :
5208 * Result : If the function succeeds, the return value is a nonzero menu-item
5209 * value returned by the dialog box.
5210 * Remark :
5211 * Status : UNTESTED STUB
5212 *
5213 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5214 *****************************************************************************/
5215
5216int WIN32API MessageBoxExW(HWND hWnd,
5217 LPCWSTR lpText,
5218 LPCWSTR lpCaption,
5219 UINT uType,
5220 WORD wLanguageId)
5221{
5222
5223 dprintf(("USER32:MessageBoxExW (%08xh,%x,%x,%u,%08w) not implemented.\n",
5224 hWnd,
5225 lpText,
5226 lpCaption,
5227 uType,
5228 wLanguageId));
5229
5230 return MessageBoxW(hWnd, lpText, lpCaption, uType);
5231}
5232
5233
5234/*****************************************************************************
5235 * Name : BOOL WIN32API MessageBoxIndirectW
5236 * Purpose : The MessageBoxIndirect function creates, displays, and operates
5237 * a message box. The message box contains application-defined
5238 * message text and title, any icon, and any combination of
5239 * predefined push buttons.
5240 * Parameters:
5241 * Variables :
5242 * Result :
5243 * Remark :
5244 * Status : UNTESTED STUB
5245 *
5246 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5247 *****************************************************************************/
5248
5249BOOL WIN32API MessageBoxIndirectW(LPMSGBOXPARAMSW lpMsgBoxParams)
5250{
5251 dprintf(("USER32:MessageBoxIndirectW (%08x) not implemented.\n",
5252 lpMsgBoxParams));
5253
5254 return (FALSE);
5255}
5256
5257
5258/*****************************************************************************
5259 * Name : BOOL WIN32API MessageBoxIndirectA
5260 * Purpose : The MessageBoxIndirect function creates, displays, and operates
5261 * a message box. The message box contains application-defined
5262 * message text and title, any icon, and any combination of
5263 * predefined push buttons.
5264 * Parameters:
5265 * Variables :
5266 * Result :
5267 * Remark :
5268 * Status : UNTESTED STUB
5269 *
5270 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5271 *****************************************************************************/
5272
5273BOOL WIN32API MessageBoxIndirectA(LPMSGBOXPARAMSA lpMsgBoxParams)
5274{
5275 dprintf(("USER32:MessageBoxIndirectA (%08x) not implemented.\n",
5276 lpMsgBoxParams));
5277
5278 return (FALSE);
5279}
5280
5281
5282/*****************************************************************************
5283 * Name : DWORD WIN32API OemKeyScan
5284 * Purpose : The OemKeyScan function maps OEM ASCII codes 0 through 0x0FF
5285 * into the OEM scan codes and shift states. The function provides
5286 * information that allows a program to send OEM text to another
5287 * program by simulating keyboard input.
5288 * Parameters:
5289 * Variables :
5290 * Result :
5291 * Remark :
5292 * Status : UNTESTED STUB
5293 *
5294 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5295 *****************************************************************************/
5296
5297DWORD WIN32API OemKeyScan(WORD wOemChar)
5298{
5299 dprintf(("USER32:OemKeyScan (%u) not implemented.\n",
5300 wOemChar));
5301
5302 return (wOemChar);
5303}
5304
5305
5306/*****************************************************************************
5307 * Name : HDESK WIN32API OpenDesktopA
5308 * Purpose : The OpenDesktop function returns a handle to an existing desktop.
5309 * A desktop is a secure object contained within a window station
5310 * object. A desktop has a logical display surface and contains
5311 * windows, menus and hooks.
5312 * Parameters: LPCTSTR lpszDesktopName name of the desktop to open
5313 * DWORD dwFlags flags to control interaction with other applications
5314 * BOOL fInherit specifies whether returned handle is inheritable
5315 * DWORD dwDesiredAccess specifies access of returned handle
5316 * Variables :
5317 * Result : If the function succeeds, the return value is the handle to the
5318 * opened desktop.
5319 * If the function fails, the return value is NULL. To get extended
5320 * error information, call GetLastError.
5321 * Remark :
5322 * Status : UNTESTED STUB
5323 *
5324 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5325 *****************************************************************************/
5326
5327HDESK WIN32API OpenDesktopA(LPCTSTR lpszDesktopName,
5328 DWORD dwFlags,
5329 BOOL fInherit,
5330 DWORD dwDesiredAccess)
5331{
5332 dprintf(("USER32:OpenDesktopA (%s,%08xh,%08xh,%08x) not implemented.\n",
5333 lpszDesktopName,
5334 dwFlags,
5335 fInherit,
5336 dwDesiredAccess));
5337
5338 return (NULL);
5339}
5340
5341
5342/*****************************************************************************
5343 * Name : HDESK WIN32API OpenDesktopW
5344 * Purpose : The OpenDesktop function returns a handle to an existing desktop.
5345 * A desktop is a secure object contained within a window station
5346 * object. A desktop has a logical display surface and contains
5347 * windows, menus and hooks.
5348 * Parameters: LPCTSTR lpszDesktopName name of the desktop to open
5349 * DWORD dwFlags flags to control interaction with other applications
5350 * BOOL fInherit specifies whether returned handle is inheritable
5351 * DWORD dwDesiredAccess specifies access of returned handle
5352 * Variables :
5353 * Result : If the function succeeds, the return value is the handle to the
5354 * opened desktop.
5355 * If the function fails, the return value is NULL. To get extended
5356 * error information, call GetLastError.
5357 * Remark :
5358 * Status : UNTESTED STUB
5359 *
5360 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5361 *****************************************************************************/
5362
5363HDESK WIN32API OpenDesktopW(LPCTSTR lpszDesktopName,
5364 DWORD dwFlags,
5365 BOOL fInherit,
5366 DWORD dwDesiredAccess)
5367{
5368 dprintf(("USER32:OpenDesktopW (%s,%08xh,%08xh,%08x) not implemented.\n",
5369 lpszDesktopName,
5370 dwFlags,
5371 fInherit,
5372 dwDesiredAccess));
5373
5374 return (NULL);
5375}
5376
5377
5378/*****************************************************************************
5379 * Name : HDESK WIN32API OpenInputDesktop
5380 * Purpose : The OpenInputDesktop function returns a handle to the desktop
5381 * that receives user input. The input desktop is a desktop on the
5382 * window station associated with the logged-on user.
5383 * Parameters: DWORD dwFlags flags to control interaction with other applications
5384 * BOOL fInherit specifies whether returned handle is inheritable
5385 * DWORD dwDesiredAccess specifies access of returned handle
5386 * Variables :
5387 * Result : If the function succeeds, the return value is a handle of the
5388 * desktop that receives user input.
5389 * If the function fails, the return value is NULL. To get extended
5390 * error information, call GetLastError.
5391 * Remark :
5392 * Status : UNTESTED STUB
5393 *
5394 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5395 *****************************************************************************/
5396
5397HDESK WIN32API OpenInputDesktop(DWORD dwFlags,
5398 BOOL fInherit,
5399 DWORD dwDesiredAccess)
5400{
5401 dprintf(("USER32:OpenInputDesktop (%08xh,%08xh,%08x) not implemented.\n",
5402 dwFlags,
5403 fInherit,
5404 dwDesiredAccess));
5405
5406 return (NULL);
5407}
5408
5409
5410/*****************************************************************************
5411 * Name : HWINSTA WIN32API OpenWindowStationA
5412 * Purpose : The OpenWindowStation function returns a handle to an existing
5413 * window station.
5414 * Parameters: LPCTSTR lpszWinStaName name of the window station to open
5415 * BOOL fInherit specifies whether returned handle is inheritable
5416 * DWORD dwDesiredAccess specifies access of returned handle
5417 * Variables :
5418 * Result : If the function succeeds, the return value is the handle to the
5419 * specified window station.
5420 * If the function fails, the return value is NULL. To get extended
5421 * error information, call GetLastError.
5422 * Remark :
5423 * Status : UNTESTED STUB
5424 *
5425 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5426 *****************************************************************************/
5427
5428HWINSTA WIN32API OpenWindowStationA(LPCTSTR lpszWinStaName,
5429 BOOL fInherit,
5430 DWORD dwDesiredAccess)
5431{
5432 dprintf(("USER32:OpenWindowStatieonA (%s,%08xh,%08x) not implemented.\n",
5433 lpszWinStaName,
5434 fInherit,
5435 dwDesiredAccess));
5436
5437 return (NULL);
5438}
5439
5440
5441/*****************************************************************************
5442 * Name : HWINSTA WIN32API OpenWindowStationW
5443 * Purpose : The OpenWindowStation function returns a handle to an existing
5444 * window station.
5445 * Parameters: LPCTSTR lpszWinStaName name of the window station to open
5446 * BOOL fInherit specifies whether returned handle is inheritable
5447 * DWORD dwDesiredAccess specifies access of returned handle
5448 * Variables :
5449 * Result : If the function succeeds, the return value is the handle to the
5450 * specified window station.
5451 * If the function fails, the return value is NULL. To get extended
5452 * error information, call GetLastError.
5453
5454 * Remark :
5455 * Status : UNTESTED STUB
5456 *
5457 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5458 *****************************************************************************/
5459
5460HWINSTA WIN32API OpenWindowStationW(LPCTSTR lpszWinStaName,
5461 BOOL fInherit,
5462 DWORD dwDesiredAccess)
5463{
5464 dprintf(("USER32:OpenWindowStatieonW (%s,%08xh,%08x) not implemented.\n",
5465 lpszWinStaName,
5466 fInherit,
5467 dwDesiredAccess));
5468
5469 return (NULL);
5470}
5471
5472
5473/*****************************************************************************
5474 * Name : BOOL WIN32API PaintDesktop
5475 * Purpose : The PaintDesktop function fills the clipping region in the
5476 * specified device context with the desktop pattern or wallpaper.
5477 * The function is provided primarily for shell desktops.
5478 * Parameters:
5479 * Variables :
5480 * Result : If the function succeeds, the return value is TRUE.
5481 * If the function fails, the return value is FALSE.
5482 * Remark :
5483 * Status : UNTESTED STUB
5484 *
5485 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5486 *****************************************************************************/
5487
5488BOOL WIN32API PaintDesktop(HDC hdc)
5489{
5490 dprintf(("USER32:PaintDesktop (%08x) not implemented.\n",
5491 hdc));
5492
5493 return (FALSE);
5494}
5495
5496
5497/*****************************************************************************
5498 * Name : BOOL WIN32API SendMessageCallbackA
5499 * Purpose : The SendMessageCallback function sends the specified message to
5500 * a window or windows. The function calls the window procedure for
5501 * the specified window and returns immediately. After the window
5502 * procedure processes the message, the system calls the specified
5503 * callback function, passing the result of the message processing
5504 * and an application-defined value to the callback function.
5505 * Parameters: HWND hwnd handle of destination window
5506 * UINT uMsg message to send
5507 * WPARAM wParam first message parameter
5508 * LPARAM lParam second message parameter
5509 * SENDASYNCPROC lpResultCallBack function to receive message value
5510 * DWORD dwData value to pass to callback function
5511 * Variables :
5512 * Result : If the function succeeds, the return value is TRUE.
5513 * If the function fails, the return value is FALSE. To get extended
5514 * error information, call GetLastError.
5515 * Remark :
5516 * Status : UNTESTED STUB
5517 *
5518 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5519 *****************************************************************************/
5520
5521BOOL WIN32API SendMessageCallbackA(HWND hWnd,
5522 UINT uMsg,
5523 WPARAM wParam,
5524 LPARAM lParam,
5525 SENDASYNCPROC lpResultCallBack,
5526 DWORD dwData)
5527{
5528 dprintf(("USER32:SendMessageCallBackA (%08xh,%08xh,%08xh,%08xh,%08xh,%08x) not implemented.\n",
5529 hWnd,
5530 uMsg,
5531 wParam,
5532 lParam,
5533 lpResultCallBack,
5534 dwData));
5535
5536 return (FALSE);
5537}
5538
5539
5540/*****************************************************************************
5541 * Name : BOOL WIN32API SendMessageCallbackW
5542 * Purpose : The SendMessageCallback function sends the specified message to
5543 * a window or windows. The function calls the window procedure for
5544 * the specified window and returns immediately. After the window
5545 * procedure processes the message, the system calls the specified
5546 * callback function, passing the result of the message processing
5547 * and an application-defined value to the callback function.
5548 * Parameters: HWND hwnd handle of destination window
5549 * UINT uMsg message to send
5550 * WPARAM wParam first message parameter
5551 * LPARAM lParam second message parameter
5552 * SENDASYNCPROC lpResultCallBack function to receive message value
5553 * DWORD dwData value to pass to callback function
5554 * Variables :
5555 * Result : If the function succeeds, the return value is TRUE.
5556 * If the function fails, the return value is FALSE. To get extended
5557 * error information, call GetLastError.
5558 * Remark :
5559 * Status : UNTESTED STUB
5560 *
5561 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5562 *****************************************************************************/
5563
5564BOOL WIN32API SendMessageCallbackW(HWND hWnd,
5565 UINT uMsg,
5566 WPARAM wParam,
5567 LPARAM lParam,
5568 SENDASYNCPROC lpResultCallBack,
5569 DWORD dwData)
5570{
5571 dprintf(("USER32:SendMessageCallBackW (%08xh,%08xh,%08xh,%08xh,%08xh,%08x) not implemented.\n",
5572 hWnd,
5573 uMsg,
5574 wParam,
5575 lParam,
5576 lpResultCallBack,
5577 dwData));
5578
5579 return (FALSE);
5580}
5581
5582
5583/*****************************************************************************
5584 * Name : VOID WIN32API SetDebugErrorLevel
5585 * Purpose : The SetDebugErrorLevel function sets the minimum error level at
5586 * which Windows will generate debugging events and pass them to a debugger.
5587 * Parameters: DWORD dwLevel debugging error level
5588 * Variables :
5589 * Result :
5590 * Remark :
5591 * Status : UNTESTED STUB
5592 *
5593 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5594 *****************************************************************************/
5595
5596VOID WIN32API SetDebugErrorLevel(DWORD dwLevel)
5597{
5598 dprintf(("USER32:SetDebugErrorLevel (%08x) not implemented.\n",
5599 dwLevel));
5600}
5601
5602
5603/*****************************************************************************
5604 * Name : BOOL WIN32API SetProcessWindowStation
5605 * Purpose : The SetProcessWindowStation function assigns a window station
5606 * to the calling process. This enables the process to access
5607 * objects in the window station such as desktops, the clipboard,
5608 * and global atoms. All subsequent operations on the window station
5609 * use the access rights granted to hWinSta.
5610 * Parameters:
5611 * Variables :
5612 * Result : If the function succeeds, the return value is TRUE.
5613 * If the function fails, the return value is FALSE. To get extended
5614 * error information, call GetLastError.
5615 * Remark :
5616 * Status : UNTESTED STUB
5617 *
5618 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5619 *****************************************************************************/
5620
5621BOOL WIN32API SetProcessWindowStation(HWINSTA hWinSta)
5622{
5623 dprintf(("USER32:SetProcessWindowStation (%08x) not implemented.\n",
5624 hWinSta));
5625
5626 return (FALSE);
5627}
5628
5629
5630/*****************************************************************************
5631 * Name : BOOL WIN32API SetSystemCursor
5632 * Purpose : The SetSystemCursor function replaces the contents of the system
5633 * cursor specified by dwCursorId with the contents of the cursor
5634 * specified by hCursor, and then destroys hCursor. This function
5635 * lets an application customize the system cursors.
5636 * Parameters: HCURSOR hCursor set specified system cursor to this cursor's
5637 * contents, then destroy this
5638 * DWORD dwCursorID system cursor specified by its identifier
5639 * Variables :
5640 * Result : If the function succeeds, the return value is TRUE.
5641 * If the function fails, the return value is FALSE. To get extended
5642 * error information, call GetLastError.
5643 * Remark :
5644 * Status : UNTESTED STUB
5645 *
5646 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5647 *****************************************************************************/
5648
5649BOOL WIN32API SetSystemCursor(HCURSOR hCursor,
5650 DWORD dwCursorId)
5651{
5652 dprintf(("USER32:SetSystemCursor (%08xh,%08x) not implemented.\n",
5653 hCursor,
5654 dwCursorId));
5655
5656 return (FALSE);
5657}
5658
5659
5660/*****************************************************************************
5661 * Name : BOOL WIN32API SetThreadDesktop
5662 * Purpose : The SetThreadDesktop function assigns a desktop to the calling
5663 * thread. All subsequent operations on the desktop use the access
5664 * rights granted to hDesk.
5665 * Parameters: HDESK hDesk handle of the desktop to assign to this thread
5666 * Variables :
5667 * Result : If the function succeeds, the return value is TRUE.
5668 * If the function fails, the return value is FALSE. To get extended
5669 * error information, call GetLastError.
5670 * Remark :
5671 * Status : UNTESTED STUB
5672 *
5673 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5674 *****************************************************************************/
5675
5676BOOL WIN32API SetThreadDesktop(HDESK hDesktop)
5677{
5678 dprintf(("USER32:SetThreadDesktop (%08x) not implemented.\n",
5679 hDesktop));
5680
5681 return (FALSE);
5682}
5683
5684
5685/*****************************************************************************
5686 * Name : BOOL WIN32API SetUserObjectInformationA
5687 * Purpose : The SetUserObjectInformation function sets information about a
5688 * window station or desktop object.
5689 * Parameters: HANDLE hObject handle of the object for which to set information
5690 * int nIndex type of information to set
5691 * PVOID lpvInfo points to a buffer that contains the information
5692 * DWORD cbInfo size, in bytes, of lpvInfo buffer
5693 * Variables :
5694 * Result : If the function succeeds, the return value is TRUE.
5695 * If the function fails the return value is FALSE. To get extended
5696 * error information, call GetLastError.
5697 * Remark :
5698 * Status : UNTESTED STUB
5699 *
5700 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5701 *****************************************************************************/
5702
5703BOOL WIN32API SetUserObjectInformationA(HANDLE hObject,
5704 int nIndex,
5705 PVOID lpvInfo,
5706 DWORD cbInfo)
5707{
5708 dprintf(("USER32:SetUserObjectInformationA (%08xh,%u,%08xh,%08x) not implemented.\n",
5709 hObject,
5710 nIndex,
5711 lpvInfo,
5712 cbInfo));
5713
5714 return (FALSE);
5715}
5716
5717
5718/*****************************************************************************
5719 * Name : BOOL WIN32API SetUserObjectInformationW
5720 * Purpose : The SetUserObjectInformation function sets information about a
5721 * window station or desktop object.
5722 * Parameters: HANDLE hObject handle of the object for which to set information
5723 * int nIndex type of information to set
5724 * PVOID lpvInfo points to a buffer that contains the information
5725 * DWORD cbInfo size, in bytes, of lpvInfo buffer
5726 * Variables :
5727 * Result : If the function succeeds, the return value is TRUE.
5728 * If the function fails the return value is FALSE. To get extended
5729 * error information, call GetLastError.
5730 * Remark :
5731 * Status : UNTESTED STUB
5732 *
5733 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5734 *****************************************************************************/
5735
5736BOOL WIN32API SetUserObjectInformationW(HANDLE hObject,
5737 int nIndex,
5738 PVOID lpvInfo,
5739 DWORD cbInfo)
5740{
5741 dprintf(("USER32:SetUserObjectInformationW (%08xh,%u,%08xh,%08x) not implemented.\n",
5742 hObject,
5743 nIndex,
5744 lpvInfo,
5745 cbInfo));
5746
5747 return (FALSE);
5748}
5749
5750
5751/*****************************************************************************
5752 * Name : BOOL WIN32API SetUserObjectSecurity
5753 * Purpose : The SetUserObjectSecurity function sets the security of a user
5754 * object. This can be, for example, a window or a DDE conversation
5755 * Parameters: HANDLE hObject handle of user object
5756 * SECURITY_INFORMATION * psi address of security information
5757 * LPSECURITY_DESCRIPTOR psd address of security descriptor
5758 * Variables :
5759 * Result : If the function succeeds, the return value is TRUE.
5760 * If the function fails, the return value is FALSE. To get extended
5761 * error information, call GetLastError.
5762 * Remark :
5763 * Status : UNTESTED STUB
5764 *
5765 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5766 *****************************************************************************/
5767
5768BOOL WIN32API SetUserObjectSecurity(HANDLE hObject,
5769 SECURITY_INFORMATION * psi,
5770 LPSECURITY_DESCRIPTOR psd)
5771{
5772 dprintf(("USER32:SetUserObjectSecuroty (%08xh,%08xh,%08x) not implemented.\n",
5773 hObject,
5774 psi,
5775 psd));
5776
5777 return (FALSE);
5778}
5779
5780
5781/*****************************************************************************
5782 * Name : int WIN32API SetWindowRgn
5783 * Purpose : The SetWindowRgn function sets the window region of a window. The
5784 * window region determines the area within the window where the
5785 * operating system permits drawing. The operating system does not
5786 * display any portion of a window that lies outside of the window region
5787 * Parameters: HWND hWnd handle to window whose window region is to be set
5788 * HRGN hRgn handle to region
5789 * BOOL bRedraw window redraw flag
5790 * Variables :
5791 * Result : If the function succeeds, the return value is non-zero.
5792 * If the function fails, the return value is zero.
5793 * Remark :
5794 * Status : UNTESTED STUB
5795 *
5796 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5797 *****************************************************************************/
5798
5799int WIN32API SetWindowRgn(HWND hWnd,
5800 HRGN hRgn,
5801 BOOL bRedraw)
5802{
5803 dprintf(("USER32:SetWindowRgn (%08xh,%08xh,%u) not implemented.\n",
5804 hWnd,
5805 hRgn,
5806 bRedraw));
5807
5808 return (0);
5809}
5810
5811
5812/*****************************************************************************
5813 * Name : BOOL WIN32API SetWindowsHookW
5814 * Purpose : The SetWindowsHook function is not implemented in the Win32 API.
5815 * Win32-based applications should use the SetWindowsHookEx function.
5816 * Parameters:
5817 * Variables :
5818 * Result :
5819 * Remark : ARGH ! MICROSOFT !
5820 * Status : UNTESTED STUB
5821 *
5822 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5823 *****************************************************************************/
5824
5825HHOOK WIN32API SetWindowsHookW(int nFilterType, HOOKPROC pfnFilterProc)
5826
5827{
5828 return (FALSE);
5829}
5830
5831
5832/*****************************************************************************
5833 * Name : BOOL WIN32API ShowWindowAsync
5834 * Purpose : The ShowWindowAsync function sets the show state of a window
5835 * created by a different thread.
5836 * Parameters: HWND hwnd handle of window
5837 * int nCmdShow show state of window
5838 * Variables :
5839 * Result : If the window was previously visible, the return value is TRUE.
5840 * If the window was previously hidden, the return value is FALSE.
5841 * Remark :
5842 * Status : UNTESTED STUB
5843 *
5844 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5845 *****************************************************************************/
5846
5847BOOL WIN32API ShowWindowAsync (HWND hWnd,
5848 int nCmdShow)
5849{
5850 dprintf(("USER32:ShowWindowAsync (%08xh,%08x) not implemented.\n",
5851 hWnd,
5852 nCmdShow));
5853
5854 return (FALSE);
5855}
5856
5857
5858/*****************************************************************************
5859 * Name : BOOL WIN32API SwitchDesktop
5860 * Purpose : The SwitchDesktop function makes a desktop visible and activates
5861 * it. This enables the desktop to receive input from the user. The
5862 * calling process must have DESKTOP_SWITCHDESKTOP access to the
5863 * desktop for the SwitchDesktop function to succeed.
5864 * Parameters:
5865 * Variables :
5866 * Result : If the function succeeds, the return value is TRUE.
5867 * If the function fails, the return value is FALSE. To get extended
5868 * error information, call GetLastError.
5869 * Remark :
5870 * Status : UNTESTED STUB
5871 *
5872 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5873 *****************************************************************************/
5874
5875BOOL WIN32API SwitchDesktop(HDESK hDesktop)
5876{
5877 dprintf(("USER32:SwitchDesktop (%08x) not implemented.\n",
5878 hDesktop));
5879
5880 return (FALSE);
5881}
5882
5883
5884/*****************************************************************************
5885 * Name : WORD WIN32API TileWindows
5886 * Purpose : The TileWindows function tiles the specified windows, or the child
5887 * windows of the specified parent window.
5888 * Parameters: HWND hwndParent handle of parent window
5889 * WORD wFlags types of windows not to arrange
5890 * LPCRECT lpRect rectangle to arrange windows in
5891 * WORD cChildrenb number of windows to arrange
5892 * const HWND *ahwndChildren array of window handles
5893 * Variables :
5894 * Result : If the function succeeds, the return value is the number of
5895 * windows arranged.
5896 * If the function fails, the return value is zero.
5897 * Remark :
5898 * Status : UNTESTED STUB
5899 *
5900 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5901 *****************************************************************************/
5902
5903WORD WIN32API TileWindows(HWND hwndParent,
5904 UINT wFlags,
5905 const LPRECT lpRect,
5906 UINT cChildrenb,
5907 const HWND *ahwndChildren)
5908{
5909 dprintf(("USER32:TileWindows (%08xh,%08xh,%08xh,%08xh,%08x) not implemented.\n",
5910 hwndParent,
5911 wFlags,
5912 lpRect,
5913 cChildrenb,
5914 ahwndChildren));
5915
5916 return (0);
5917}
5918
5919
5920/*****************************************************************************
5921 * Name : int WIN32API ToAscii
5922 * Purpose : The ToAscii function translates the specified virtual-key code
5923 * and keyboard state to the corresponding Windows character or characters.
5924 * Parameters: UINT uVirtKey virtual-key code
5925 * UINT uScanCode scan code
5926 * PBYTE lpbKeyState address of key-state array
5927 * LPWORD lpwTransKey buffer for translated key
5928 * UINT fuState active-menu flag
5929 * Variables :
5930 * Result : 0 The specified virtual key has no translation for the current
5931 * state of the keyboard.
5932 * 1 One Windows character was copied to the buffer.
5933 * 2 Two characters were copied to the buffer. This usually happens
5934 * when a dead-key character (accent or diacritic) stored in the
5935 * keyboard layout cannot be composed with the specified virtual
5936 * key to form a single character.
5937 * Remark :
5938 * Status : UNTESTED STUB
5939 *
5940 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5941 *****************************************************************************/
5942
5943int WIN32API ToAscii(UINT uVirtKey,
5944 UINT uScanCode,
5945 PBYTE lpbKeyState,
5946 LPWORD lpwTransKey,
5947 UINT fuState)
5948{
5949 dprintf(("USER32:ToAscii (%u,%u,%08xh,%08xh,%u) not implemented.\n",
5950 uVirtKey,
5951 uScanCode,
5952 lpbKeyState,
5953 lpwTransKey,
5954 fuState));
5955
5956 return (0);
5957}
5958
5959
5960/*****************************************************************************
5961 * Name : int WIN32API ToAsciiEx
5962 * Purpose : The ToAscii function translates the specified virtual-key code
5963 * and keyboard state to the corresponding Windows character or characters.
5964 * Parameters: UINT uVirtKey virtual-key code
5965 * UINT uScanCode scan code
5966 * PBYTE lpbKeyState address of key-state array
5967 * LPWORD lpwTransKey buffer for translated key
5968 * UINT fuState active-menu flag
5969 * HLK hlk keyboard layout handle
5970 * Variables :
5971 * Result : 0 The specified virtual key has no translation for the current
5972 * state of the keyboard.
5973 * 1 One Windows character was copied to the buffer.
5974 * 2 Two characters were copied to the buffer. This usually happens
5975 * when a dead-key character (accent or diacritic) stored in the
5976 * keyboard layout cannot be composed with the specified virtual
5977 * key to form a single character.
5978 * Remark :
5979 * Status : UNTESTED STUB
5980 *
5981 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5982 *****************************************************************************/
5983
5984int WIN32API ToAsciiEx(UINT uVirtKey,
5985 UINT uScanCode,
5986 PBYTE lpbKeyState,
5987 LPWORD lpwTransKey,
5988 UINT fuState,
5989 HKL hkl)
5990{
5991 dprintf(("USER32:ToAsciiEx (%u,%u,%08xh,%08xh,%u,%08x) not implemented.\n",
5992 uVirtKey,
5993 uScanCode,
5994 lpbKeyState,
5995 lpwTransKey,
5996 fuState,
5997 hkl));
5998
5999 return (0);
6000}
6001
6002
6003/*****************************************************************************
6004 * Name : int WIN32API ToUnicode
6005 * Purpose : The ToUnicode function translates the specified virtual-key code
6006 * and keyboard state to the corresponding Unicode character or characters.
6007 * Parameters: UINT wVirtKey virtual-key code
6008 * UINT wScanCode scan code
6009 * PBYTE lpKeyState address of key-state array
6010 * LPWSTR pwszBuff buffer for translated key
6011 * int cchBuff size of translated key buffer
6012 * UINT wFlags set of function-conditioning flags
6013 * Variables :
6014 * Result : - 1 The specified virtual key is a dead-key character (accent or
6015 * diacritic). This value is returned regardless of the keyboard
6016 * layout, even if several characters have been typed and are
6017 * stored in the keyboard state. If possible, even with Unicode
6018 * keyboard layouts, the function has written a spacing version of
6019 * the dead-key character to the buffer specified by pwszBuffer.
6020 * For example, the function writes the character SPACING ACUTE
6021 * (0x00B4), rather than the character NON_SPACING ACUTE (0x0301).
6022 * 0 The specified virtual key has no translation for the current
6023 * state of the keyboard. Nothing was written to the buffer
6024 * specified by pwszBuffer.
6025 * 1 One character was written to the buffer specified by pwszBuffer.
6026 * 2 or more Two or more characters were written to the buffer specified by
6027 * pwszBuff. The most common cause for this is that a dead-key
6028 * character (accent or diacritic) stored in the keyboard layout
6029 * could not be combined with the specified virtual key to form a
6030 * single character.
6031 * Remark :
6032 * Status : UNTESTED STUB
6033 *
6034 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
6035 *****************************************************************************/
6036
6037int WIN32API ToUnicode(UINT uVirtKey,
6038 UINT uScanCode,
6039 PBYTE lpKeyState,
6040 LPWSTR pwszBuff,
6041 int cchBuff,
6042 UINT wFlags)
6043{
6044 dprintf(("USER32:ToUnicode (%u,%u,%08xh,%08xh,%u,%08x) not implemented.\n",
6045 uVirtKey,
6046 uScanCode,
6047 lpKeyState,
6048 pwszBuff,
6049 cchBuff,
6050 wFlags));
6051
6052 return (0);
6053}
6054
6055
6056/*****************************************************************************
6057 * Name : BOOL WIN32API UnloadKeyboardLayout
6058 * Purpose : The UnloadKeyboardLayout function removes a keyboard layout.
6059 * Parameters: HKL hkl handle of keyboard layout
6060 * Variables :
6061 * Result : If the function succeeds, the return value is the handle of the
6062 * keyboard layout; otherwise, it is NULL. To get extended error
6063 * information, use the GetLastError function.
6064 * Remark :
6065 * Status : UNTESTED STUB
6066 *
6067 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
6068 *****************************************************************************/
6069
6070BOOL WIN32API UnloadKeyboardLayout (HKL hkl)
6071{
6072 dprintf(("USER32:UnloadKeyboardLayout (%08x) not implemented.\n",
6073 hkl));
6074
6075 return (0);
6076}
6077
6078
6079/*****************************************************************************
6080 * Name : SHORT WIN32API VkKeyScanExW
6081 * Purpose : The VkKeyScanEx function translates a character to the
6082 * corresponding virtual-key code and shift state. The function
6083 * translates the character using the input language and physical
6084 * keyboard layout identified by the given keyboard layout handle.
6085 * Parameters: UINT uChar character to translate
6086 * HKL hkl keyboard layout handle
6087 * Variables :
6088 * Result : see docs
6089 * Remark :
6090 * Status : UNTESTED STUB
6091 *
6092 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
6093 *****************************************************************************/
6094
6095WORD WIN32API VkKeyScanExW(WCHAR uChar,
6096 HKL hkl)
6097{
6098 dprintf(("USER32:VkKeyScanExW (%u,%08x) not implemented.\n",
6099 uChar,
6100 hkl));
6101
6102 return (uChar);
6103}
6104
6105
6106/*****************************************************************************
6107 * Name : SHORT WIN32API VkKeyScanExA
6108 * Purpose : The VkKeyScanEx function translates a character to the
6109 * corresponding virtual-key code and shift state. The function
6110 * translates the character using the input language and physical
6111 * keyboard layout identified by the given keyboard layout handle.
6112 * Parameters: UINT uChar character to translate
6113 * HKL hkl keyboard layout handle
6114 * Variables :
6115 * Result : see docs
6116 * Remark :
6117 * Status : UNTESTED STUB
6118 *
6119 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
6120 *****************************************************************************/
6121
6122WORD WIN32API VkKeyScanExA(CHAR uChar,
6123 HKL hkl)
6124{
6125 dprintf(("USER32:VkKeyScanExA (%u,%08x) not implemented.\n",
6126 uChar,
6127 hkl));
6128
6129 return (uChar);
6130}
6131
6132
6133/*****************************************************************************
6134 * Name : VOID WIN32API keybd_event
6135 * Purpose : The keybd_event function synthesizes a keystroke. The system
6136 * can use such a synthesized keystroke to generate a WM_KEYUP or
6137 * WM_KEYDOWN message. The keyboard driver's interrupt handler calls
6138 * the keybd_event function.
6139 * Parameters: BYTE bVk virtual-key code
6140
6141 * BYTE bScan hardware scan code
6142 * DWORD dwFlags flags specifying various function options
6143 * DWORD dwExtraInfo additional data associated with keystroke
6144 * Variables :
6145 * Result :
6146 * Remark :
6147 * Status : UNTESTED STUB
6148 *
6149 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
6150 *****************************************************************************/
6151
6152VOID WIN32API keybd_event (BYTE bVk,
6153 BYTE bScan,
6154 DWORD dwFlags,
6155 DWORD dwExtraInfo)
6156{
6157 dprintf(("USER32:keybd_event (%u,%u,%08xh,%08x) not implemented.\n",
6158 bVk,
6159 bScan,
6160 dwFlags,
6161 dwExtraInfo));
6162}
6163
6164
6165/*****************************************************************************
6166 * Name : VOID WIN32API mouse_event
6167 * Purpose : The mouse_event function synthesizes mouse motion and button clicks.
6168 * Parameters: DWORD dwFlags flags specifying various motion/click variants
6169 * DWORD dx horizontal mouse position or position change
6170 * DWORD dy vertical mouse position or position change
6171 * DWORD cButtons unused, reserved for future use, set to zero
6172 * DWORD dwExtraInfo 32 bits of application-defined information
6173 * Variables :
6174 * Result :
6175 * Remark :
6176 * Status : UNTESTED STUB
6177 *
6178 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
6179 *****************************************************************************/
6180
6181VOID WIN32API mouse_event(DWORD dwFlags,
6182 DWORD dx,
6183 DWORD dy,
6184 DWORD cButtons,
6185 DWORD dwExtraInfo)
6186{
6187 dprintf(("USER32:mouse_event (%08xh,%u,%u,%u,%08x) not implemented.\n",
6188 dwFlags,
6189 dx,
6190 dy,
6191 cButtons,
6192 dwExtraInfo));
6193}
6194
6195
6196/*****************************************************************************
6197 * Name : BOOL WIN32API SetShellWindow
6198 * Purpose : Unknown
6199 * Parameters: Unknown
6200 * Variables :
6201 * Result :
6202 * Remark :
6203 * Status : UNTESTED UNKNOWN STUB
6204 *
6205 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6206 *****************************************************************************/
6207
6208BOOL WIN32API SetShellWindow(DWORD x1)
6209{
6210 dprintf(("USER32: SetShellWindow(%08x) not implemented.\n",
6211 x1));
6212
6213 return (FALSE); /* default */
6214}
6215
6216
6217/*****************************************************************************
6218 * Name : BOOL WIN32API PlaySoundEvent
6219 * Purpose : Unknown
6220 * Parameters: Unknown
6221 * Variables :
6222 * Result :
6223 * Remark :
6224 * Status : UNTESTED UNKNOWN STUB
6225 *
6226 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6227 *****************************************************************************/
6228
6229BOOL WIN32API PlaySoundEvent(DWORD x1)
6230{
6231 dprintf(("USER32: PlaySoundEvent(%08x) not implemented.\n",
6232 x1));
6233
6234 return (FALSE); /* default */
6235}
6236
6237
6238/*****************************************************************************
6239 * Name : BOOL WIN32API TileChildWindows
6240 * Purpose : Unknown
6241 * Parameters: Unknown
6242 * Variables :
6243 * Result :
6244 * Remark :
6245 * Status : UNTESTED UNKNOWN STUB
6246 *
6247 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6248 *****************************************************************************/
6249
6250BOOL WIN32API TileChildWindows(DWORD x1,
6251 DWORD x2)
6252{
6253 dprintf(("USER32: TileChildWindows(%08xh,%08xh) not implemented.\n",
6254 x1,
6255 x2));
6256
6257 return (FALSE); /* default */
6258}
6259
6260
6261/*****************************************************************************
6262 * Name : BOOL WIN32API SetSysColorsTemp
6263 * Purpose : Unknown
6264 * Parameters: Unknown
6265 * Variables :
6266 * Result :
6267 * Remark :
6268 * Status : UNTESTED UNKNOWN STUB
6269 *
6270 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6271 *****************************************************************************/
6272
6273BOOL WIN32API SetSysColorsTemp(void)
6274{
6275 dprintf(("USER32: SetSysColorsTemp() not implemented.\n"));
6276
6277 return (FALSE); /* default */
6278}
6279
6280
6281/*****************************************************************************
6282 * Name : BOOL WIN32API RegisterNetworkCapabilities
6283 * Purpose : Unknown
6284 * Parameters: Unknown
6285 * Variables :
6286 * Result :
6287 * Remark :
6288 * Status : UNTESTED UNKNOWN STUB
6289 *
6290 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6291 *****************************************************************************/
6292
6293BOOL WIN32API RegisterNetworkCapabilities(DWORD x1,
6294 DWORD x2)
6295{
6296 dprintf(("USER32: RegisterNetworkCapabilities(%08xh,%08xh) not implemented.\n",
6297 x1,
6298 x2));
6299
6300 return (FALSE); /* default */
6301}
6302
6303
6304/*****************************************************************************
6305 * Name : BOOL WIN32API EndTask
6306 * Purpose : Unknown
6307 * Parameters: Unknown
6308 * Variables :
6309 * Result :
6310 * Remark :
6311 * Status : UNTESTED UNKNOWN STUB
6312 *
6313 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6314 *****************************************************************************/
6315
6316BOOL WIN32API EndTask(DWORD x1,
6317 DWORD x2,
6318 DWORD x3)
6319{
6320 dprintf(("USER32: EndTask(%08xh,%08xh,%08xh) not implemented.\n",
6321 x1,
6322 x2,
6323 x3));
6324
6325 return (FALSE); /* default */
6326}
6327
6328
6329/*****************************************************************************
6330 * Name : BOOL WIN32API SwitchToThisWindow
6331 * Purpose : Unknown
6332 * Parameters: Unknown
6333 * Variables :
6334 * Result :
6335 * Remark :
6336 * Status : UNTESTED UNKNOWN STUB
6337 *
6338 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6339 *****************************************************************************/
6340
6341BOOL WIN32API SwitchToThisWindow(HWND hwnd,
6342 BOOL x2)
6343{
6344 dprintf(("USER32: SwitchToThisWindow(%08xh,%08xh) not implemented.\n",
6345 hwnd,
6346 x2));
6347
6348 return (FALSE); /* default */
6349}
6350
6351
6352/*****************************************************************************
6353 * Name : BOOL WIN32API GetNextQueueWindow
6354 * Purpose : Unknown
6355 * Parameters: Unknown
6356 * Variables :
6357 * Result :
6358 * Remark :
6359 * Status : UNTESTED UNKNOWN STUB
6360 *
6361 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6362 *****************************************************************************/
6363
6364BOOL WIN32API GetNextQueueWindow(DWORD x1,
6365 DWORD x2)
6366{
6367 dprintf(("USER32: GetNextQueueWindow(%08xh,%08xh) not implemented.\n",
6368 x1,
6369 x2));
6370
6371 return (FALSE); /* default */
6372}
6373
6374
6375/*****************************************************************************
6376 * Name : BOOL WIN32API YieldTask
6377 * Purpose : Unknown
6378 * Parameters: Unknown
6379 * Variables :
6380 * Result :
6381 * Remark :
6382 * Status : UNTESTED UNKNOWN STUB
6383 *
6384 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6385 *****************************************************************************/
6386
6387BOOL WIN32API YieldTask(void)
6388{
6389 dprintf(("USER32: YieldTask() not implemented.\n"));
6390
6391 return (FALSE); /* default */
6392}
6393
6394
6395/*****************************************************************************
6396 * Name : BOOL WIN32API WinOldAppHackoMatic
6397 * Purpose : Unknown
6398 * Parameters: Unknown
6399 * Variables :
6400 * Result :
6401 * Remark :
6402 * Status : UNTESTED UNKNOWN STUB
6403 *
6404 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6405 *****************************************************************************/
6406
6407BOOL WIN32API WinOldAppHackoMatic(DWORD x1)
6408{
6409 dprintf(("USER32: WinOldAppHackoMatic(%08x) not implemented.\n",
6410 x1));
6411
6412 return (FALSE); /* default */
6413}
6414
6415
6416/*****************************************************************************
6417 * Name : BOOL WIN32API DragObject
6418 * Purpose : Unknown
6419 * Parameters: Unknown
6420 * Variables :
6421 * Result :
6422 * Remark :
6423 * Status : UNTESTED UNKNOWN STUB
6424 *
6425 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6426 *****************************************************************************/
6427
6428DWORD WIN32API DragObject(HWND x1,HWND x2,UINT x3,DWORD x4,HCURSOR x5)
6429{
6430 dprintf(("USER32: DragObject(%08x,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
6431 x1,
6432 x2,
6433 x3,
6434 x4,
6435 x5));
6436
6437 return (FALSE); /* default */
6438}
6439
6440
6441/*****************************************************************************
6442 * Name : BOOL WIN32API CascadeChildWindows
6443 * Purpose : Unknown
6444 * Parameters: Unknown
6445 * Variables :
6446 * Result :
6447 * Remark :
6448 * Status : UNTESTED UNKNOWN STUB
6449 *
6450 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6451 *****************************************************************************/
6452
6453BOOL WIN32API CascadeChildWindows(DWORD x1,
6454 DWORD x2)
6455{
6456 dprintf(("USER32: CascadeChildWindows(%08xh,%08xh) not implemented.\n",
6457 x1,
6458 x2));
6459
6460 return (FALSE); /* default */
6461}
6462
6463
6464/*****************************************************************************
6465 * Name : BOOL WIN32API RegisterSystemThread
6466 * Purpose : Unknown
6467 * Parameters: Unknown
6468 * Variables :
6469 * Result :
6470 * Remark :
6471 * Status : UNTESTED UNKNOWN STUB
6472 *
6473 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6474 *****************************************************************************/
6475
6476BOOL WIN32API RegisterSystemThread(DWORD x1,
6477 DWORD x2)
6478{
6479 dprintf(("USER32: RegisterSystemThread(%08xh,%08xh) not implemented.\n",
6480 x1,
6481 x2));
6482
6483 return (FALSE); /* default */
6484}
6485
6486
6487/*****************************************************************************
6488 * Name : BOOL WIN32API IsHungThread
6489 * Purpose : Unknown
6490 * Parameters: Unknown
6491 * Variables :
6492 * Result :
6493 * Remark :
6494 * Status : UNTESTED UNKNOWN STUB
6495 *
6496 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6497 *****************************************************************************/
6498
6499BOOL WIN32API IsHungThread(DWORD x1)
6500{
6501 dprintf(("USER32: IsHungThread(%08xh) not implemented.\n",
6502 x1));
6503
6504 return (FALSE); /* default */
6505}
6506
6507
6508/*****************************************************************************
6509 * Name : BOOL WIN32API SysErrorBox
6510 * Purpose : Unknown
6511 * Parameters: Unknown
6512 * Variables :
6513 * Result :
6514 * Remark : HARDERR like ?
6515 * Status : UNTESTED UNKNOWN STUB
6516 *
6517 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6518 *****************************************************************************/
6519
6520BOOL WIN32API SysErrorBox(DWORD x1,
6521 DWORD x2,
6522 DWORD x3)
6523{
6524 dprintf(("USER32: SysErrorBox(%08xh,%08xh,%08xh) not implemented.\n",
6525 x1,
6526 x2,
6527 x3));
6528
6529 return (FALSE); /* default */
6530}
6531
6532
6533/*****************************************************************************
6534 * Name : BOOL WIN32API UserSignalProc
6535 * Purpose : Unknown
6536 * Parameters: Unknown
6537 * Variables :
6538 * Result :
6539 * Remark :
6540 * Status : UNTESTED UNKNOWN STUB
6541 *
6542 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6543 *****************************************************************************/
6544
6545BOOL WIN32API UserSignalProc(DWORD x1,
6546 DWORD x2,
6547 DWORD x3,
6548 DWORD x4)
6549{
6550 dprintf(("USER32: SysErrorBox(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
6551 x1,
6552 x2,
6553 x3,
6554 x4));
6555
6556 return (FALSE); /* default */
6557}
6558
6559
6560/*****************************************************************************
6561 * Name : BOOL WIN32API GetShellWindow
6562 * Purpose : Unknown
6563 * Parameters: Unknown
6564 * Variables :
6565 * Result :
6566 * Remark :
6567 * Status : UNTESTED UNKNOWN STUB
6568 *
6569 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6570 *****************************************************************************/
6571
6572HWND WIN32API GetShellWindow(void)
6573{
6574 dprintf(("USER32: GetShellWindow() not implemented.\n"));
6575
6576 return (0); /* default */
6577}
6578
6579
6580/***********************************************************************
6581 * RegisterTasklist32 [USER32.436]
6582 */
6583DWORD WIN32API RegisterTasklist (DWORD x)
6584{
6585 dprintf(("USER32: RegisterTasklist(%08xh) not implemented.\n",
6586 x));
6587
6588 return TRUE;
6589}
6590
6591
6592/***********************************************************************
6593 * DrawCaptionTemp32A [USER32.599]
6594 *
6595 * PARAMS
6596 *
6597 * RETURNS
6598 * Success:
6599 * Failure:
6600 */
6601
6602BOOL WIN32API DrawCaptionTempA(HWND hwnd,
6603 HDC hdc,
6604 const RECT *rect,
6605 HFONT hFont,
6606 HICON hIcon,
6607 LPCSTR str,
6608 UINT uFlags)
6609{
6610 RECT rc = *rect;
6611
6612 dprintf(("USER32: DrawCaptionTempA(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh)\n",
6613 hwnd,
6614 hdc,
6615 rect,
6616 hFont,
6617 hIcon,
6618 str,
6619 uFlags));
6620
6621 /* drawing background */
6622 if (uFlags & DC_INBUTTON)
6623 {
6624 O32_FillRect (hdc,
6625 &rc,
6626 GetSysColorBrush (COLOR_3DFACE));
6627
6628 if (uFlags & DC_ACTIVE)
6629 {
6630 HBRUSH hbr = O32_SelectObject (hdc,
6631 GetSysColorBrush (COLOR_ACTIVECAPTION));
6632 O32_PatBlt (hdc,
6633 rc.left,
6634 rc.top,
6635 rc.right - rc.left,
6636 rc.bottom - rc.top,
6637 0xFA0089);
6638
6639 O32_SelectObject (hdc,
6640 hbr);
6641 }
6642 }
6643 else
6644 {
6645 O32_FillRect (hdc,
6646 &rc,
6647 GetSysColorBrush ((uFlags & DC_ACTIVE) ?
6648 COLOR_ACTIVECAPTION : COLOR_INACTIVECAPTION));
6649 }
6650
6651
6652 /* drawing icon */
6653 if ((uFlags & DC_ICON) && !(uFlags & DC_SMALLCAP))
6654 {
6655 POINT pt;
6656
6657 pt.x = rc.left + 2;
6658 pt.y = (rc.bottom + rc.top - O32_GetSystemMetrics(SM_CYSMICON)) / 2;
6659
6660 if (hIcon)
6661 {
6662 DrawIconEx (hdc,
6663 pt.x,
6664 pt.y,
6665 hIcon,
6666 O32_GetSystemMetrics(SM_CXSMICON),
6667 O32_GetSystemMetrics(SM_CYSMICON),
6668 0,
6669 0,
6670 DI_NORMAL);
6671 }
6672 else
6673 {
6674 /* @@@PH 1999/06/08 not ported yet, just don't draw any icon
6675 WND *wndPtr = WIN_FindWndPtr(hwnd);
6676 HICON hAppIcon = 0;
6677
6678 if (wndPtr->class->hIconSm)
6679 hAppIcon = wndPtr->class->hIconSm;
6680 else
6681 if (wndPtr->class->hIcon)
6682 hAppIcon = wndPtr->class->hIcon;
6683
6684 DrawIconEx (hdc,
6685 pt.x,
6686 pt.y,
6687 hAppIcon,
6688 GetSystemMetrics(SM_CXSMICON),
6689 GetSystemMetrics(SM_CYSMICON),
6690 0,
6691 0,
6692 DI_NORMAL);
6693
6694 WIN_ReleaseWndPtr(wndPtr);
6695 */
6696 }
6697
6698 rc.left += (rc.bottom - rc.top);
6699 }
6700
6701 /* drawing text */
6702 if (uFlags & DC_TEXT)
6703 {
6704 HFONT hOldFont;
6705
6706 if (uFlags & DC_INBUTTON)
6707 O32_SetTextColor (hdc,
6708 O32_GetSysColor (COLOR_BTNTEXT));
6709 else
6710 if (uFlags & DC_ACTIVE)
6711 O32_SetTextColor (hdc,
6712 O32_GetSysColor (COLOR_CAPTIONTEXT));
6713 else
6714 O32_SetTextColor (hdc,
6715 O32_GetSysColor (COLOR_INACTIVECAPTIONTEXT));
6716
6717 O32_SetBkMode (hdc,
6718 TRANSPARENT);
6719
6720 if (hFont)
6721 hOldFont = O32_SelectObject (hdc,
6722 hFont);
6723 else
6724 {
6725 NONCLIENTMETRICSA nclm;
6726 HFONT hNewFont;
6727
6728 nclm.cbSize = sizeof(NONCLIENTMETRICSA);
6729 O32_SystemParametersInfo (SPI_GETNONCLIENTMETRICS,
6730 0,
6731 &nclm,
6732 0);
6733 hNewFont = O32_CreateFontIndirect ((uFlags & DC_SMALLCAP) ?
6734 &nclm.lfSmCaptionFont : &nclm.lfCaptionFont);
6735 hOldFont = O32_SelectObject (hdc,
6736 hNewFont);
6737 }
6738
6739 if (str)
6740 O32_DrawText (hdc,
6741 str,
6742 -1,
6743 &rc,
6744 DT_SINGLELINE | DT_VCENTER | DT_NOPREFIX | DT_LEFT);
6745 else
6746 {
6747 CHAR szText[128];
6748 INT nLen;
6749
6750 nLen = O32_GetWindowText (hwnd,
6751 szText,
6752 128);
6753
6754 O32_DrawText (hdc,
6755 szText,
6756 nLen,
6757 &rc,
6758 DT_SINGLELINE | DT_VCENTER | DT_NOPREFIX | DT_LEFT);
6759 }
6760
6761 if (hFont)
6762 O32_SelectObject (hdc,
6763 hOldFont);
6764 else
6765 O32_DeleteObject (O32_SelectObject (hdc,
6766 hOldFont));
6767 }
6768
6769 /* drawing focus ??? */
6770 if (uFlags & 0x2000)
6771 {
6772 dprintf(("USER32: DrawCaptionTempA undocumented flag (0x2000)!\n"));
6773 }
6774
6775 return 0;
6776}
6777
6778
6779/***********************************************************************
6780 * DrawCaptionTemp32W [USER32.602]
6781 *
6782 * PARAMS
6783 *
6784 * RETURNS
6785 * Success:
6786 * Failure:
6787 */
6788
6789BOOL WIN32API DrawCaptionTempW (HWND hwnd,
6790 HDC hdc,
6791 const RECT *rect,
6792 HFONT hFont,
6793 HICON hIcon,
6794 LPCWSTR str,
6795 UINT uFlags)
6796{
6797 LPSTR strAscii = UnicodeToAsciiString((LPWSTR)str);
6798
6799 BOOL res = DrawCaptionTempA (hwnd,
6800 hdc,
6801 rect,
6802 hFont,
6803 hIcon,
6804 strAscii,
6805 uFlags);
6806
6807 FreeAsciiString(strAscii);
6808
6809 return res;
6810}
Note: See TracBrowser for help on using the repository browser.