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

Last change on this file since 158 was 158, checked in by achimha, 26 years ago

Ported latest DrawEdge from WINE, moved everything to new src/user32/uitools.cpp

File size: 235.4 KB
Line 
1/* $Id: user32.cpp,v 1.13 1999-06-22 20:00:04 achimha Exp $ */
2
3/*
4 * Win32 misc user32 API functions for OS/2
5 *
6 * Copyright 1998 Sander van Leeuwen
7 * Copyright 1998 Patrick Haller
8 * Copyright 1998 Peter Fitzsimmons
9 * Copyright 1999 Christoph Bratschi
10 *
11 *
12 * Project Odin Software License can be found in LICENSE.TXT
13 *
14 */
15/*****************************************************************************
16 * Name : USER32.CPP
17 * Purpose : This module maps all Win32 functions contained in USER32.DLL
18 * to their OS/2-specific counterparts as far as possible.
19 *****************************************************************************/
20
21#include <os2win.h>
22#include "misc.h"
23
24#include "user32.h"
25#include "wndproc.h"
26#include "wndsubproc.h"
27#include "wndclass.h"
28#include "icon.h"
29#include "usrcall.h"
30#include "syscolor.h"
31
32#include <wchar.h>
33#include <stdlib.h>
34#include <string.h>
35
36//undocumented stuff
37// WIN32API CalcChildScroll
38// WIN32API CascadeChildWindows
39// WIN32API ClientThreadConnect
40// WIN32API DragObject
41// WIN32API DrawFrame
42// WIN32API EditWndProc
43// WIN32API EndTask
44// WIN32API GetInputDesktop
45// WIN32API GetNextQueueWindow
46// WIN32API GetShellWindow
47// WIN32API InitSharedTable
48// WIN32API InitTask
49// WIN32API IsHungThread
50// WIN32API LockWindowStation
51// WIN32API ModifyAccess
52// WIN32API PlaySoundEvent
53// WIN32API RegisterLogonProcess
54// WIN32API RegisterNetworkCapabilities
55// WIN32API RegisterSystemThread
56// WIN32API SetDeskWallpaper
57// WIN32API SetDesktopBitmap
58// WIN32API SetInternalWindowPos
59// WIN32API SetLogonNotifyWindow
60// WIN32API SetShellWindow
61// WIN32API SetSysColorsTemp
62// WIN32API SetWindowFullScreenState
63// WIN32API SwitchToThisWindow
64// WIN32API SysErrorBox
65// WIN32API TileChildWindows
66// WIN32API UnlockWindowStation
67// WIN32API UserClientDllInitialize
68// WIN32API UserSignalProc
69// WIN32API WinOldAppHackoMatic
70// WIN32API WNDPROC_CALLBACK
71// WIN32API YieldTask
72
73
74
75
76//******************************************************************************
77//******************************************************************************
78HWND WIN32API GetActiveWindow()
79{
80 return(O32_GetActiveWindow());
81}
82//******************************************************************************
83//******************************************************************************
84int __cdecl wsprintfA(char *lpOut, LPCSTR lpFmt, ...)
85{
86 int rc;
87 va_list argptr;
88
89#ifdef DEBUG
90 WriteLog("USER32: wsprintfA\n");
91 WriteLog("USER32: %s\n", lpFmt);
92#endif
93 va_start(argptr, lpFmt);
94 rc = O32_wvsprintf(lpOut, (char *)lpFmt, argptr);
95 va_end(argptr);
96#ifdef DEBUG
97 WriteLog("USER32: %s\n", lpOut);
98#endif
99 return(rc);
100}
101//******************************************************************************
102//******************************************************************************
103int __cdecl wsprintfW(LPWSTR lpOut, LPCWSTR lpFmt, ...)
104{
105 int rc;
106 char *lpFmtA;
107 char szOut[512];
108 va_list argptr;
109
110 dprintf(("USER32: wsprintfW(%08xh,%08xh).\n",
111 lpOut,
112 lpFmt));
113
114 lpFmtA = UnicodeToAsciiString((LPWSTR)lpFmt);
115
116 /* @@@PH 98/07/13 transform "%s" to "%ls" does the unicode magic */
117 {
118 PSZ pszTemp;
119 PSZ pszTemp1;
120 ULONG ulStrings;
121 ULONG ulIndex; /* temporary string counter */
122
123 for (ulStrings = 0, /* determine number of placeholders */
124 pszTemp = lpFmtA;
125
126 (pszTemp != NULL) &&
127 (*pszTemp != 0);
128
129 ulStrings++)
130 {
131 pszTemp = strstr(pszTemp,
132 "%s");
133 if (pszTemp != NULL) /* skip 2 characters */
134 {
135 pszTemp++;
136 pszTemp++;
137 }
138 else
139 break; /* leave loop immediately */
140 }
141
142 if (ulStrings != 0) /* transformation required ? */
143 {
144 /* now reallocate lpFmt */
145 ulStrings += strlen(lpFmtA); /* calculate total string length */
146 pszTemp = lpFmtA; /* save string pointer */
147 pszTemp1 = lpFmtA; /* save string pointer */
148
149 /* @@@PH allocation has to be compatible to FreeAsciiString !!! */
150 lpFmtA = (char *)malloc(ulStrings + 1);
151 if (lpFmtA == NULL) /* check proper allocation */
152 return (0); /* raise error condition */
153
154 for (ulIndex = 0;
155 ulIndex <= ulStrings;
156 ulIndex++,
157 pszTemp++)
158 {
159 if ((pszTemp[0] == '%') &&
160 (pszTemp[1] == 's') )
161 {
162 /* replace %s by %ls */
163 lpFmtA[ulIndex++] = '%';
164 lpFmtA[ulIndex ] = 'l';
165 lpFmtA[ulIndex+1] = 's';
166 }
167 else
168 lpFmtA[ulIndex] = *pszTemp; /* just copy over the character */
169 }
170
171 lpFmtA[ulStrings] = 0; /* string termination */
172
173 FreeAsciiString(pszTemp1); /* the original string is obsolete */
174 }
175 }
176
177 dprintf(("USER32: wsprintfW (%s).\n",
178 lpFmt));
179
180 va_start(argptr,
181 lpFmt);
182
183 rc = O32_wvsprintf(szOut,
184 lpFmtA,
185 argptr);
186
187 AsciiToUnicode(szOut,
188 lpOut);
189
190 FreeAsciiString(lpFmtA);
191 return(rc);
192}
193//******************************************************************************
194//******************************************************************************
195int WIN32API MessageBoxA(HWND hwndOwner, LPCTSTR lpszText, LPCTSTR lpszTitle, UINT fuStyle)
196{
197 dprintf(("USER32: MessageBoxA %s %s\n", lpszText, lpszTitle));
198 return(O32_MessageBox(hwndOwner, lpszText, lpszTitle, fuStyle));
199}
200//******************************************************************************
201//******************************************************************************
202BOOL WIN32API MessageBeep( UINT arg1)
203{
204#ifdef DEBUG
205 WriteLog("USER32: MessageBeep\n");
206#endif
207 return O32_MessageBeep(arg1);
208}
209//******************************************************************************
210//******************************************************************************
211LONG WIN32API SendDlgItemMessageA( HWND arg1, int arg2, UINT arg3, WPARAM arg4, LPARAM arg5)
212{
213#ifdef DEBUG
214 WriteLog("USER32: SendDlgItemMessageA\n");
215#endif
216 return O32_SendDlgItemMessage(arg1, arg2, arg3, arg4, arg5);
217}
218//******************************************************************************
219//******************************************************************************
220VOID WIN32API PostQuitMessage( int arg1)
221{
222 dprintf(("USER32: PostQuitMessage\n"));
223 O32_PostQuitMessage(arg1);
224}
225//******************************************************************************
226// Not implemented by Open32 (31-5-99 Christoph Bratschi)
227//******************************************************************************
228BOOL WIN32API IsDlgButtonChecked( HWND arg1, UINT arg2)
229{
230#ifdef DEBUG
231 WriteLog("USER32: IsDlgButtonChecked\n");
232#endif
233// return O32_IsDlgButtonChecked(arg1, arg2);
234 return (BOOL)SendDlgItemMessageA(arg1,arg2,BM_GETCHECK,0,0);
235}
236//******************************************************************************
237//******************************************************************************
238int WIN32API GetWindowTextLengthA( HWND arg1)
239{
240 dprintf(("USER32: GetWindowTextLength\n"));
241 return O32_GetWindowTextLength(arg1);
242}
243//******************************************************************************
244//******************************************************************************
245int WIN32API GetWindowTextA( HWND arg1, LPSTR arg2, int arg3)
246{
247 dprintf(("USER32: GetWindowTextA\n"));
248 return O32_GetWindowText(arg1, arg2, arg3);
249}
250//******************************************************************************
251
252/*******************************************************************
253 * InternalGetWindowText (USER32.326)
254 */
255int WIN32API InternalGetWindowText(HWND hwnd,
256 LPWSTR lpString,
257 INT nMaxCount )
258{
259 dprintf(("USER32: InternalGetWindowText(%08xh,%08xh,%08xh) not properly implemented.\n",
260 hwnd,
261 lpString,
262 nMaxCount));
263
264 return GetWindowTextW(hwnd,lpString,nMaxCount);
265}
266
267
268//******************************************************************************
269BOOL WIN32API GetWindowRect( HWND arg1, PRECT arg2)
270{
271 BOOL rc;
272
273 rc = O32_GetWindowRect(arg1, arg2);
274 dprintf(("USER32: GetWindowRect %X returned %d\n", arg1, rc));
275 return(rc);
276}
277//******************************************************************************
278//******************************************************************************
279HWND WIN32API GetNextDlgTabItem( HWND arg1, HWND arg2, BOOL arg3)
280{
281 dprintf(("USER32: GetNextDlgTabItem\n"));
282 return O32_GetNextDlgTabItem(arg1, arg2, arg3);
283}
284//******************************************************************************
285//******************************************************************************
286BOOL WIN32API GetMessageA( LPMSG arg1, HWND arg2, UINT arg3, UINT arg4)
287{
288//// dprintf(("USER32: GetMessage\n"));
289 return O32_GetMessage(arg1, arg2, arg3, arg4);
290}
291//******************************************************************************
292//******************************************************************************
293HWND WIN32API GetFocus(void)
294{
295 dprintf(("USER32: GetFocus\n"));
296 return O32_GetFocus();
297}
298//******************************************************************************
299//******************************************************************************
300HWND WIN32API GetDlgItem(HWND arg1, int arg2)
301{
302 HWND rc;
303
304 rc = O32_GetDlgItem(arg1, arg2);
305 dprintf(("USER32: GetDlgItem %d returned %d\n", arg2, rc));
306 return(rc);
307}
308//******************************************************************************
309//******************************************************************************
310int WIN32API GetDlgCtrlID( HWND arg1)
311{
312 dprintf(("USER32: GetDlgCtrlID\n"));
313 return O32_GetDlgCtrlID(arg1);
314}
315//******************************************************************************
316//******************************************************************************
317HWND WIN32API GetDesktopWindow(void)
318{
319 dprintf(("USER32: GetDesktopWindow\n"));
320 return O32_GetDesktopWindow();
321}
322//******************************************************************************
323//******************************************************************************
324BOOL WIN32API EnumThreadWindows(DWORD dwThreadId, WNDENUMPROC lpfn, LPARAM lParam)
325{
326 BOOL rc;
327 EnumWindowCallback *callback = new EnumWindowCallback(lpfn, lParam);
328
329 dprintf(("USER32: EnumThreadWindows\n"));
330 rc = O32_EnumThreadWindows(dwThreadId, callback->GetOS2Callback(), (LPARAM)callback);
331 if(callback)
332 delete callback;
333 return(rc);
334}
335//******************************************************************************
336//******************************************************************************
337BOOL WIN32API EndDialog( HWND arg1, int arg2)
338{
339 BOOL rc;
340
341 dprintf(("USER32: EndDialog\n"));
342 rc = O32_EndDialog(arg1, arg2);
343 return(rc);
344}
345//******************************************************************************
346//******************************************************************************
347LONG WIN32API DispatchMessageA( const MSG * arg1)
348{
349//// dprintf(("USER32: DispatchMessage\n"));
350 return O32_DispatchMessage(arg1);
351}
352//******************************************************************************
353//******************************************************************************
354BOOL WIN32API OffsetRect( PRECT arg1, int arg2, int arg3)
355{
356#ifdef DEBUG
357//// WriteLog("USER32: OffsetRect\n");
358#endif
359 return O32_OffsetRect(arg1, arg2, arg3);
360}
361//******************************************************************************
362//******************************************************************************
363BOOL WIN32API CopyRect( PRECT arg1, const RECT * arg2)
364{
365// ddprintf(("USER32: CopyRect\n"));
366 return O32_CopyRect(arg1, arg2);
367}
368//******************************************************************************
369// Not implemented by Open32 (5-31-99 Christoph Bratschi)
370//******************************************************************************
371BOOL WIN32API CheckDlgButton( HWND arg1, int arg2, UINT arg3)
372{
373#ifdef DEBUG
374 WriteLog("USER32: CheckDlgButton\n");
375#endif
376// return O32_CheckDlgButton(arg1, arg2, arg3);
377 return (BOOL)SendDlgItemMessageA(arg1,arg2,BM_SETCHECK,arg3,0);
378}
379//******************************************************************************
380//******************************************************************************
381HWND WIN32API SetFocus( HWND arg1)
382{
383 dprintf(("USER32: SetFocus\n"));
384 return O32_SetFocus(arg1);
385}
386//******************************************************************************
387//******************************************************************************
388BOOL WIN32API TranslateMessage( const MSG * arg1)
389{
390#ifdef DEBUG
391//// WriteLog("USER32: TranslateMessage\n");
392#endif
393 return O32_TranslateMessage(arg1);
394}
395//******************************************************************************
396//******************************************************************************
397BOOL WIN32API SetWindowPos( HWND arg1, HWND arg2, int arg3, int arg4, int arg5, int arg6, UINT arg7)
398{
399#ifdef DEBUG
400 WriteLog("USER32: SetWindowPos\n");
401#endif
402 return O32_SetWindowPos(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
403}
404//******************************************************************************
405//******************************************************************************
406BOOL WIN32API ShowWindow(HWND arg1, int arg2)
407{
408#ifdef DEBUG
409 WriteLog("USER32: ShowWindow %X %d\n", arg1, arg2);
410#endif
411 return O32_ShowWindow(arg1, arg2);
412}
413//******************************************************************************
414//******************************************************************************
415BOOL WIN32API SetWindowTextA(HWND arg1, LPCSTR arg2)
416{
417#ifdef DEBUG
418 WriteLog("USER32: SetWindowText %s\n", arg2);
419#endif
420 return O32_SetWindowText(arg1, arg2);
421}
422//******************************************************************************
423//******************************************************************************
424BOOL WIN32API SetForegroundWindow(HWND arg1)
425{
426#ifdef DEBUG
427 WriteLog("USER32: SetForegroundWindow\n");
428#endif
429 return O32_SetForegroundWindow(arg1);
430}
431//******************************************************************************
432//******************************************************************************
433int WIN32API ReleaseDC( HWND arg1, HDC arg2)
434{
435#ifdef DEBUG
436 WriteLog("USER32: ReleaseDC\n");
437#endif
438 return O32_ReleaseDC(arg1, arg2);
439}
440//******************************************************************************
441//******************************************************************************
442BOOL WIN32API InvalidateRect(HWND arg1, const RECT *arg2, BOOL arg3)
443{
444#ifdef DEBUG
445 if(arg2)
446 WriteLog("USER32: InvalidateRect for window %X (%d,%d)(%d,%d) %d\n", arg1, arg2->left, arg2->top, arg2->right, arg2->bottom, arg3);
447 else WriteLog("USER32: InvalidateRect for window %X NULL, %d\n", arg1, arg3);
448#endif
449 return O32_InvalidateRect(arg1, arg2, arg3);
450}
451//******************************************************************************
452//******************************************************************************
453BOOL WIN32API GetUpdateRect( HWND arg1, PRECT arg2, BOOL arg3)
454{
455#ifdef DEBUG
456 WriteLog("USER32: GetUpdateRect\n");
457#endif
458 return O32_GetUpdateRect(arg1, arg2, arg3);
459}
460//******************************************************************************
461//******************************************************************************
462HDC WIN32API GetDC( HWND arg1)
463{
464 HDC hdc;
465
466 hdc = O32_GetDC(arg1);
467#ifdef DEBUG
468 WriteLog("USER32: GetDC of %X returns %X\n", arg1, hdc);
469#endif
470 return(hdc);
471}
472//******************************************************************************
473//******************************************************************************
474HDC WIN32API GetDCEx(HWND arg1, HRGN arg2, DWORD arg3)
475{
476#ifdef DEBUG
477 WriteLog("USER32: GetDCEx\n");
478#endif
479 return O32_GetDCEx(arg1, arg2, arg3);
480}
481//******************************************************************************
482//******************************************************************************
483BOOL WIN32API GetClientRect( HWND arg1, PRECT arg2)
484{
485#ifdef DEBUG
486 WriteLog("USER32: GetClientRect of %X\n", arg1);
487#endif
488
489 return O32_GetClientRect(arg1, arg2);
490}
491//******************************************************************************
492//******************************************************************************
493HWND WIN32API FindWindowA(LPCSTR arg1, LPCSTR arg2)
494{
495#ifdef DEBUG
496 WriteLog("USER32: FindWindow\n");
497#endif
498 return O32_FindWindow(arg1, arg2);
499}
500//******************************************************************************
501//******************************************************************************
502HWND WIN32API FindWindowExA(HWND arg1, HWND arg2, LPCSTR arg3, LPCSTR arg4)
503{
504#ifdef DEBUG
505 WriteLog("USER32: FindWindowExA, not completely implemented\n");
506#endif
507 return O32_FindWindow(arg3, arg4);
508}
509//******************************************************************************
510//******************************************************************************
511BOOL WIN32API FlashWindow( HWND arg1, BOOL arg2)
512{
513#ifdef DEBUG
514 WriteLog("USER32: FlashWindow\n");
515#endif
516 return O32_FlashWindow(arg1, arg2);
517}
518//******************************************************************************
519//******************************************************************************
520BOOL WIN32API EndPaint( HWND arg1, const PAINTSTRUCT * arg2)
521{
522#ifdef DEBUG
523 WriteLog("USER32: EndPaint\n");
524#endif
525 return O32_EndPaint(arg1, arg2);
526}
527//******************************************************************************
528//******************************************************************************
529BOOL WIN32API MoveWindow(HWND arg1, int arg2, int arg3, int arg4, int arg5, BOOL arg6)
530{
531 BOOL rc;
532
533 rc = O32_MoveWindow(arg1, arg2, arg3, arg4, arg5, arg6);
534 dprintf(("USER32: MoveWindow %X to (%d,%d) size (%d,%d), repaint = %d returned %d\n", arg1, arg2, arg3, arg4, arg5, arg6, rc));
535 return(rc);
536}
537//******************************************************************************
538//******************************************************************************
539HWND WIN32API CreateWindowExA(DWORD dwExStyle,
540 LPCSTR arg2,
541 LPCSTR arg3,
542 DWORD dwStyle,
543 int x,
544 int y,
545 int nWidth,
546 int nHeight,
547 HWND parent,
548 HMENU arg10,
549 HINSTANCE arg11,
550 PVOID arg12)
551{
552 HWND hwnd;
553 Win32WindowProc *window = NULL;
554
555 /* @@@PH 98/06/12 CreateWindow crashes somewhere in Open32 */
556 if(arg3 == NULL)
557 arg3 = (LPCSTR)"CRASH, CRASH";
558
559 // 6-12-99 CB: WS_CLIPCHILDREN not set -> controls not redrawn
560 // Problems with group boxes
561 //SvL: Not necessary anymore (EB's fixes)
562// dwStyle |= WS_CLIPCHILDREN;
563
564 //SvL: Correct window style (like Wine does)
565 if(dwStyle & WS_CHILD) {
566 dwStyle |= WS_CLIPSIBLINGS;
567 if(!(dwStyle & WS_POPUP)) {
568 dwStyle |= WS_CAPTION;
569 }
570 }
571 if(dwExStyle & WS_EX_DLGMODALFRAME)
572 {
573 dwStyle &= ~WS_THICKFRAME;
574 }
575
576#ifdef DEBUG
577 WriteLog("USER32: CreateWindow: dwExStyle = %X\n", dwExStyle);
578 if((int)arg2 >> 16 != 0)
579 WriteLog("USER32: CreateWindow: classname = %s\n", arg2);
580 else WriteLog("USER32: CreateWindow: classname = %X\n", arg2);
581 WriteLog("USER32: CreateWindow: windowname= %s\n", arg3);
582 WriteLog("USER32: CreateWindow: dwStyle = %X\n", dwStyle);
583 WriteLog("USER32: CreateWindow: x = %d\n", x);
584 WriteLog("USER32: CreateWindow: y = %d\n", y);
585 WriteLog("USER32: CreateWindow: nWidth = %d\n", nWidth);
586 WriteLog("USER32: CreateWindow: nHeight = %d\n", nHeight);
587 WriteLog("USER32: CreateWindow: parent = %X\n", parent);
588 WriteLog("USER32: CreateWindow: hwmenu = %X\n", arg10);
589 WriteLog("USER32: CreateWindow: hinstance = %X\n", arg11);
590 WriteLog("USER32: CreateWindow: param = %X\n", arg12);
591 #endif
592
593 if((int) arg2 >> 16 != 0 && strcmp(arg2, "COMBOBOX") == 0)
594 {
595 dprintf(("COMBOBOX creation"));
596 //TODO: #%@#%$ Open32 doesn't support this
597 dwStyle &= ~(CBS_OWNERDRAWFIXED | CBS_OWNERDRAWVARIABLE);
598
599 /* @@@PH 98/06/12 drop down combos are problematic too */
600 /* so we translate the styles to OS/2 style */
601 dwStyle |= CBS_DROPDOWN | CBS_DROPDOWNLIST;
602 }
603
604 //Classname might be name of system class, in which case we don't
605 //need to use our own callback
606// if(Win32WindowClass::FindClass((LPSTR)arg2) != NULL) {
607 window = new Win32WindowProc(arg11, arg2);
608// }
609
610 hwnd = O32_CreateWindowEx(dwExStyle,
611 arg2,
612 arg3,
613 dwStyle,
614 x,
615 y,
616 nWidth,
617 nHeight,
618 parent,
619 arg10,
620 arg11,
621 arg12);
622
623 //SvL: 16-11-'97: window can be already destroyed if hwnd == 0
624 if(hwnd == 0 && window != 0 && Win32WindowProc::FindWindowProc(window)) {
625 delete(window);
626 window = 0;
627 }
628 if(window) {
629 window->SetWindowHandle(hwnd);
630 }
631
632 dprintf(("USER32: ************CreateWindowExA %s (%d,%d,%d,%d), hwnd = %X\n", arg2, x, y, nWidth, nHeight, hwnd));
633 return(hwnd);
634}
635//******************************************************************************
636//******************************************************************************
637LRESULT WIN32API SendMessageA(HWND arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
638{
639 LRESULT rc;
640
641#ifdef DEBUG
642 WriteLog("USER32: SendMessage....\n");
643#endif
644 rc = O32_SendMessage(arg1, arg2, arg3, arg4);
645#ifdef DEBUG
646 WriteLog("USER32: *****SendMessage %X %X %X %X returned %d\n", arg1, arg2, arg3, arg4, rc);
647#endif
648 return(rc);
649}
650//******************************************************************************
651//******************************************************************************
652HWND WIN32API SetActiveWindow( HWND arg1)
653{
654#ifdef DEBUG
655 WriteLog("USER32: SetActiveWindow\n");
656#endif
657 return O32_SetActiveWindow(arg1);
658}
659//******************************************************************************
660//******************************************************************************
661HDC WIN32API BeginPaint(HWND arg1, PPAINTSTRUCT arg2)
662{
663 dprintf(("USER32: BeginPaint %X\n", arg2));
664 return O32_BeginPaint(arg1, arg2);
665}
666//******************************************************************************
667//******************************************************************************
668BOOL WIN32API IsDialogMessageA( HWND arg1, LPMSG arg2)
669{
670#ifdef DEBUG
671//// WriteLog("USER32: IsDialogMessage\n");
672#endif
673 return O32_IsDialogMessage(arg1, arg2);
674}
675//******************************************************************************
676//******************************************************************************
677int WIN32API DrawTextA(HDC arg1, LPCSTR arg2, int arg3, PRECT arg4, UINT arg5)
678{
679#ifdef DEBUG
680 WriteLog("USER32: DrawTextA %s", arg2);
681#endif
682 return O32_DrawText(arg1, arg2, arg3, arg4, arg5);
683}
684//******************************************************************************
685//******************************************************************************
686int WIN32API DrawTextExA(HDC arg1, LPCSTR arg2, int arg3, PRECT arg4, UINT arg5, LPDRAWTEXTPARAMS lpDTParams)
687{
688#ifdef DEBUG
689 WriteLog("USER32: DrawTextExA (not completely implemented) %s", arg2);
690#endif
691 return O32_DrawText(arg1, arg2, arg3, arg4, arg5);
692}
693//******************************************************************************
694//******************************************************************************
695int WIN32API GetSystemMetrics(int arg1)
696{
697 int rc;
698
699 switch(arg1) {
700 case SM_CXICONSPACING: //TODO: size of grid cell for large icons
701 rc = O32_GetSystemMetrics(SM_CXICON);
702 break;
703 case SM_CYICONSPACING:
704 rc = O32_GetSystemMetrics(SM_CYICON);
705 break;
706 case SM_PENWINDOWS:
707 rc = FALSE;
708 break;
709 case SM_DBCSENABLED:
710 rc = FALSE;
711 break;
712 case SM_CXEDGE: //size of 3D window edge (not supported)
713 rc = 1;
714 break;
715 case SM_CYEDGE:
716 rc = 1;
717 break;
718 case SM_CXMINSPACING: //can be SM_CXMINIMIZED or larger
719 rc = O32_GetSystemMetrics(SM_CXMINIMIZED);
720 break;
721 case SM_CYMINSPACING:
722 rc = GetSystemMetrics(SM_CYMINIMIZED);
723 break;
724 case SM_CXSMICON: //recommended size of small icons (TODO: adjust to screen res.)
725 rc = 16;
726 break;
727 case SM_CYSMICON:
728 rc = 16;
729 break;
730 case SM_CYSMCAPTION: //size in pixels of a small caption (TODO: ????)
731 rc = 8;
732 break;
733 case SM_CXSMSIZE: //size of small caption buttons (pixels) (TODO: implement properly)
734 rc = 16;
735 break;
736 case SM_CYSMSIZE:
737 rc = 16;
738 break;
739 case SM_CXMENUSIZE: //TODO: size of menu bar buttons (such as MDI window close)
740 rc = 16;
741 break;
742 case SM_CYMENUSIZE:
743 rc = 16;
744 break;
745 case SM_ARRANGE:
746 rc = ARW_BOTTOMLEFT | ARW_LEFT;
747 break;
748 case SM_CXMINIMIZED:
749 break;
750 case SM_CYMINIMIZED:
751 break;
752 case SM_CXMAXTRACK: //max window size
753 case SM_CXMAXIMIZED: //max toplevel window size
754 rc = O32_GetSystemMetrics(SM_CXSCREEN);
755 break;
756 case SM_CYMAXTRACK:
757 case SM_CYMAXIMIZED:
758 rc = O32_GetSystemMetrics(SM_CYSCREEN);
759 break;
760 case SM_NETWORK:
761 rc = 0x01; //TODO: default = yes
762 break;
763 case SM_CLEANBOOT:
764 rc = 0; //normal boot
765 break;
766 case SM_CXDRAG: //nr of pixels before drag becomes a real one
767 rc = 2;
768 break;
769 case SM_CYDRAG:
770 rc = 2;
771 break;
772 case SM_SHOWSOUNDS: //show instead of play sound
773 rc = FALSE;
774 break;
775 case SM_CXMENUCHECK:
776 rc = 4; //TODO
777 break;
778 case SM_CYMENUCHECK:
779 rc = O32_GetSystemMetrics(SM_CYMENU);
780 break;
781 case SM_SLOWMACHINE:
782 rc = FALSE; //even a slow machine is fast with OS/2 :)
783 break;
784 case SM_MIDEASTENABLED:
785 rc = FALSE;
786 break;
787 case SM_CMETRICS:
788 rc = O32_GetSystemMetrics(44); //Open32 changed this one
789 break;
790 default:
791 rc = O32_GetSystemMetrics(arg1);
792 break;
793 }
794#ifdef DEBUG
795 WriteLog("USER32: GetSystemMetrics %d returned %d\n", arg1, rc);
796#endif
797 return(rc);
798}
799//******************************************************************************
800//******************************************************************************
801UINT WIN32API SetTimer( HWND arg1, UINT arg2, UINT arg3, TIMERPROC arg4)
802{
803#ifdef DEBUG
804 WriteLog("USER32: SetTimer INCORRECT CALLING CONVENTION FOR HANDLER!!!!!\n");
805#endif
806 //SvL: Write callback handler class for this one
807 return O32_SetTimer(arg1, arg2, arg3, (TIMERPROC_O32)arg4);
808}
809//******************************************************************************
810//******************************************************************************
811BOOL WIN32API KillTimer(HWND arg1, UINT arg2)
812{
813#ifdef DEBUG
814 WriteLog("USER32: KillTimer\n");
815#endif
816 return O32_KillTimer(arg1, arg2);
817}
818//******************************************************************************
819//******************************************************************************
820BOOL WIN32API DestroyWindow(HWND arg1)
821{
822#ifdef DEBUG
823 WriteLog("USER32: DestroyWindow\n");
824#endif
825 return O32_DestroyWindow(arg1);
826}
827//******************************************************************************
828//******************************************************************************
829BOOL WIN32API PostMessageA( HWND arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
830{
831#ifdef DEBUG
832 WriteLog("USER32: PostMessageA %X %X %X %X\n", arg1, arg2, arg3, arg4);
833#endif
834 return O32_PostMessage(arg1, arg2, arg3, arg4);
835}
836//******************************************************************************
837//******************************************************************************
838BOOL WIN32API InflateRect( PRECT arg1, int arg2, int arg3)
839{
840#ifdef DEBUG
841 WriteLog("USER32: InflateRect\n");
842#endif
843 return O32_InflateRect(arg1, arg2, arg3);
844}
845//******************************************************************************
846//TODO:How can we emulate this one in OS/2???
847//******************************************************************************
848DWORD WIN32API WaitForInputIdle(HANDLE hProcess, DWORD dwTimeOut)
849{
850#ifdef DEBUG
851 WriteLog("USER32: WaitForInputIdle (Not Implemented) %d\n", dwTimeOut);
852#endif
853
854 if(dwTimeOut == INFINITE) return(0);
855
856// DosSleep(dwTimeOut/16);
857 return(0);
858}
859//******************************************************************************
860//******************************************************************************
861UINT WIN32API GetDlgItemTextA(HWND arg1, int arg2, LPSTR arg3, UINT arg4)
862{
863 UINT rc;
864
865 rc = O32_GetDlgItemText(arg1, arg2, arg3, arg4);
866#ifdef DEBUG
867 if(rc)
868 WriteLog("USER32: GetDlgItemTextA returned %s\n", arg3);
869 else WriteLog("USER32: GetDlgItemTextA returned 0 (%d)\n", GetLastError());
870#endif
871 return(rc);
872}
873//******************************************************************************
874//******************************************************************************
875BOOL WIN32API PeekMessageA(LPMSG arg1, HWND arg2, UINT arg3, UINT arg4, UINT arg5)
876{
877#ifdef DEBUG
878// WriteLog("USER32: PeekMessage\n");
879#endif
880 return O32_PeekMessage(arg1, arg2, arg3, arg4, arg5);
881}
882//******************************************************************************
883//******************************************************************************
884int WIN32API ShowCursor( BOOL arg1)
885{
886#ifdef DEBUG
887 WriteLog("USER32: ShowCursor\n");
888#endif
889 return O32_ShowCursor(arg1);
890}
891//******************************************************************************
892//BUGBUG: UpdateWindow sends a WM_ERASEBKGRND when it shouldn't!
893// So we just do it manually
894//******************************************************************************
895BOOL WIN32API UpdateWindow(HWND hwnd)
896{
897 RECT rect;
898
899#ifdef DEBUG
900 WriteLog("USER32: UpdateWindow\n");
901#endif
902
903#if 0 // EB: ->>> doesn't work. No correct update of Winhlp32 scrolling area.
904 if(O32_GetUpdateRect(hwnd, &rect, FALSE) != FALSE) {//update region empty?
905 WndCallback(hwnd, WM_PAINT, 0, 0);
906// O32_PostMessage(hwnd, WM_PAINT, 0, 0);
907 }
908#ifdef DEBUG
909 else WriteLog("USER32: Update region empty!\n");
910#endif
911 return(TRUE);
912#endif
913
914 return O32_UpdateWindow(hwnd);
915}
916//******************************************************************************
917//******************************************************************************
918BOOL WIN32API AdjustWindowRect( PRECT arg1, DWORD arg2, BOOL arg3)
919{
920#ifdef DEBUG
921 WriteLog("USER32: AdjustWindowRect\n");
922#endif
923 return O32_AdjustWindowRect(arg1, arg2, arg3);
924}
925//******************************************************************************
926//******************************************************************************
927BOOL WIN32API AdjustWindowRectEx( PRECT arg1, DWORD arg2, BOOL arg3, DWORD arg4)
928{
929#ifdef DEBUG
930 WriteLog("USER32: AdjustWindowRectEx\n");
931#endif
932 return O32_AdjustWindowRectEx(arg1, arg2, arg3, arg4);
933}
934//******************************************************************************
935//******************************************************************************
936BOOL WIN32API ClientToScreen( HWND arg1, PPOINT arg2)
937{
938#ifdef DEBUG
939//// WriteLog("USER32: ClientToScreen\n");
940#endif
941 return O32_ClientToScreen(arg1, arg2);
942}
943//******************************************************************************
944//******************************************************************************
945BOOL WIN32API SetRect( PRECT arg1, int arg2, int arg3, int arg4, int arg5)
946{
947#ifdef DEBUG
948 WriteLog("USER32: SetRect\n");
949#endif
950 return O32_SetRect(arg1, arg2, arg3, arg4, arg5);
951}
952//******************************************************************************
953//******************************************************************************
954LONG WIN32API GetWindowLongA(HWND hwnd, int nIndex)
955{
956 LONG rc;
957
958 if(nIndex == GWL_WNDPROC || nIndex == DWL_DLGPROC) {
959#ifdef DEBUG
960 WriteLog("USER32: GetWindowLong %X %d\n", hwnd, nIndex);
961#endif
962 Win32WindowProc *window = Win32WindowProc::FindProc(hwnd);
963 if(window && !(nIndex == DWL_DLGPROC && window->IsWindow() == TRUE)) {
964 return (LONG)window->GetWin32Callback();
965 }
966 }
967 rc = O32_GetWindowLong(hwnd, nIndex);
968 return(rc);
969}
970//******************************************************************************
971//******************************************************************************
972BOOL WIN32API SetDlgItemInt( HWND arg1, int arg2, UINT arg3, BOOL arg4)
973{
974#ifdef DEBUG
975 WriteLog("USER32: SetDlgItemInt\n");
976#endif
977 return O32_SetDlgItemInt(arg1, arg2, arg3, arg4);
978}
979//******************************************************************************
980//******************************************************************************
981BOOL WIN32API SetDlgItemTextA( HWND arg1, int arg2, LPCSTR arg3)
982{
983#ifdef DEBUG
984 WriteLog("USER32: SetDlgItemText to %s\n", arg3);
985#endif
986 return O32_SetDlgItemText(arg1, arg2, arg3);
987}
988//******************************************************************************
989//******************************************************************************
990BOOL WIN32API WinHelpA( HWND arg1, LPCSTR arg2, UINT arg3, DWORD arg4)
991{
992#ifdef DEBUG
993 WriteLog("USER32: WinHelp not implemented %s\n", arg2);
994#endif
995// return O32_WinHelp(arg1, arg2, arg3, arg4);
996 return(TRUE);
997}
998//******************************************************************************
999//******************************************************************************
1000BOOL WIN32API IsIconic( HWND arg1)
1001{
1002#ifdef DEBUG
1003 WriteLog("USER32: IsIconic\n");
1004#endif
1005 return O32_IsIconic(arg1);
1006}
1007//******************************************************************************
1008//******************************************************************************
1009int WIN32API TranslateAcceleratorA(HWND arg1, HACCEL arg2, LPMSG arg3)
1010{
1011#ifdef DEBUG
1012//// WriteLog("USER32: TranslateAccelerator\n");
1013#endif
1014 return O32_TranslateAccelerator(arg1, arg2, arg3);
1015}
1016//******************************************************************************
1017//******************************************************************************
1018HWND WIN32API GetWindow(HWND arg1, UINT arg2)
1019{
1020 HWND rc;
1021
1022 rc = O32_GetWindow(arg1, arg2);
1023#ifdef DEBUG
1024 WriteLog("USER32: GetWindow %X %d returned %d\n", arg1, arg2, rc);
1025#endif
1026 return(rc);
1027}
1028//******************************************************************************
1029//******************************************************************************
1030HDC WIN32API GetWindowDC(HWND arg1)
1031{
1032#ifdef DEBUG
1033 WriteLog("USER32: GetWindowDC\n");
1034#endif
1035 return O32_GetWindowDC(arg1);
1036}
1037//******************************************************************************
1038//******************************************************************************
1039BOOL WIN32API SubtractRect( PRECT arg1, const RECT * arg2, const RECT * arg3)
1040{
1041#ifdef DEBUG
1042 WriteLog("USER32: SubtractRect");
1043#endif
1044 return O32_SubtractRect(arg1, arg2, arg3);
1045}
1046//******************************************************************************
1047//SvL: 24-6-'97 - Added
1048//******************************************************************************
1049BOOL WIN32API ClipCursor(const RECT * arg1)
1050{
1051#ifdef DEBUG
1052 WriteLog("USER32: ClipCursor\n");
1053#endif
1054 return O32_ClipCursor(arg1);
1055}
1056//******************************************************************************
1057//SvL: 24-6-'97 - Added
1058//TODO: Not implemented
1059//******************************************************************************
1060WORD WIN32API GetAsyncKeyState(INT nVirtKey)
1061{
1062#ifdef DEBUG
1063//// WriteLog("USER32: GetAsyncKeyState Not implemented\n");
1064#endif
1065 return 0;
1066}
1067//******************************************************************************
1068//SvL: 24-6-'97 - Added
1069//******************************************************************************
1070HCURSOR WIN32API GetCursor(void)
1071{
1072#ifdef DEBUG
1073//// WriteLog("USER32: GetCursor\n");
1074#endif
1075 return O32_GetCursor();
1076}
1077//******************************************************************************
1078//SvL: 24-6-'97 - Added
1079//******************************************************************************
1080BOOL WIN32API GetCursorPos( PPOINT arg1)
1081{
1082#ifdef DEBUG
1083//// WriteLog("USER32: GetCursorPos\n");
1084#endif
1085 return O32_GetCursorPos(arg1);
1086}
1087//******************************************************************************
1088//SvL: 24-6-'97 - Added
1089//******************************************************************************
1090UINT WIN32API RegisterWindowMessageA(LPCSTR arg1)
1091{
1092 UINT rc;
1093
1094 rc = O32_RegisterWindowMessage(arg1);
1095#ifdef DEBUG
1096 WriteLog("USER32: RegisterWindowMessageA %s returned %X\n", arg1, rc);
1097#endif
1098 return(rc);
1099}
1100//******************************************************************************
1101//SvL: 24-6-'97 - Added
1102//******************************************************************************
1103WORD WIN32API VkKeyScanA( char arg1)
1104{
1105#ifdef DEBUG
1106 WriteLog("USER32: VkKeyScanA\n");
1107#endif
1108 return O32_VkKeyScan(arg1);
1109}
1110//******************************************************************************
1111//SvL: 24-6-'97 - Added
1112//******************************************************************************
1113SHORT WIN32API GetKeyState( int arg1)
1114{
1115#ifdef DEBUG
1116 WriteLog("USER32: GetKeyState %d\n", arg1);
1117#endif
1118 return O32_GetKeyState(arg1);
1119}
1120//******************************************************************************
1121//******************************************************************************
1122HCURSOR WIN32API SetCursor( HCURSOR arg1)
1123{
1124#ifdef DEBUG
1125 WriteLog("USER32: SetCursor\n");
1126#endif
1127 return O32_SetCursor(arg1);
1128}
1129//******************************************************************************
1130//******************************************************************************
1131BOOL WIN32API SetCursorPos( int arg1, int arg2)
1132{
1133#ifdef DEBUG
1134 WriteLog("USER32: SetCursorPos\n");
1135#endif
1136 return O32_SetCursorPos(arg1, arg2);
1137}
1138//******************************************************************************
1139//******************************************************************************
1140BOOL WIN32API EnableScrollBar( HWND arg1, INT arg2, UINT arg3)
1141{
1142#ifdef DEBUG
1143 WriteLog("USER32: EnableScrollBar\n");
1144#endif
1145 return O32_EnableScrollBar(arg1, arg2, arg3);
1146}
1147//******************************************************************************
1148//******************************************************************************
1149BOOL WIN32API EnableWindow( HWND arg1, BOOL arg2)
1150{
1151#ifdef DEBUG
1152 WriteLog("USER32: EnableWindow\n");
1153#endif
1154 return O32_EnableWindow(arg1, arg2);
1155}
1156//******************************************************************************
1157//******************************************************************************
1158HWND WIN32API SetCapture( HWND arg1)
1159{
1160#ifdef DEBUG
1161 WriteLog("USER32: SetCapture\n");
1162#endif
1163 return O32_SetCapture(arg1);
1164}
1165//******************************************************************************
1166//******************************************************************************
1167BOOL WIN32API ReleaseCapture(void)
1168{
1169#ifdef DEBUG
1170 WriteLog("USER32: ReleaseCapture\n");
1171#endif
1172 return O32_ReleaseCapture();
1173}
1174//******************************************************************************
1175//******************************************************************************
1176DWORD WIN32API MsgWaitForMultipleObjects( DWORD arg1, LPHANDLE arg2, BOOL arg3, DWORD arg4, DWORD arg5)
1177{
1178#ifdef DEBUG
1179 WriteLog("USER32: MsgWaitForMultipleObjects\n");
1180#endif
1181 return O32_MsgWaitForMultipleObjects(arg1, arg2, arg3, arg4, arg5);
1182}
1183//******************************************************************************
1184//******************************************************************************
1185HDWP WIN32API BeginDeferWindowPos( int arg1)
1186{
1187#ifdef DEBUG
1188 WriteLog("USER32: BeginDeferWindowPos\n");
1189#endif
1190 return O32_BeginDeferWindowPos(arg1);
1191}
1192//******************************************************************************
1193//******************************************************************************
1194BOOL WIN32API BringWindowToTop( HWND arg1)
1195{
1196#ifdef DEBUG
1197 WriteLog("USER32: BringWindowToTop\n");
1198#endif
1199 return O32_BringWindowToTop(arg1);
1200}
1201//******************************************************************************
1202//******************************************************************************
1203BOOL WIN32API CallMsgFilterA( LPMSG arg1, int arg2)
1204{
1205#ifdef DEBUG
1206 WriteLog("USER32: CallMsgFilterA\n");
1207#endif
1208 return O32_CallMsgFilter(arg1, arg2);
1209}
1210//******************************************************************************
1211//******************************************************************************
1212BOOL WIN32API CallMsgFilterW( LPMSG arg1, int arg2)
1213{
1214#ifdef DEBUG
1215 WriteLog("USER32: CallMsgFilterW\n");
1216#endif
1217 // NOTE: This will not work as is (needs UNICODE support)
1218 return O32_CallMsgFilter(arg1, arg2);
1219}
1220//******************************************************************************
1221//******************************************************************************
1222LRESULT WIN32API CallWindowProcA(WNDPROC wndprcPrev,
1223 HWND arg2,
1224 UINT arg3,
1225 WPARAM arg4,
1226 LPARAM arg5)
1227{
1228#ifdef DEBUG
1229//// WriteLog("USER32: CallWindowProcA %X hwnd=%X, msg = %X\n", wndprcPrev, arg2, arg3);
1230#endif
1231
1232 if(Win32WindowSubProc::FindSubProc((WNDPROC_O32)wndprcPrev) != NULL) {
1233 WNDPROC_O32 orgprc = (WNDPROC_O32)wndprcPrev; //is original Open32 system class callback (_System)
1234 return orgprc(arg2, arg3, arg4, arg5);
1235 }
1236 else return wndprcPrev(arg2, arg3, arg4, arg5); //win32 callback (__stdcall)
1237}
1238//******************************************************************************
1239//******************************************************************************
1240LRESULT WIN32API CallWindowProcW(WNDPROC arg1,
1241 HWND arg2,
1242 UINT arg3,
1243 WPARAM arg4,
1244 LPARAM arg5)
1245{
1246 dprintf(("USER32: CallWindowProcW(%08xh,%08xh,%08xh,%08xh,%08xh) not properly implemented.\n",
1247 arg1,
1248 arg2,
1249 arg3,
1250 arg4,
1251 arg5));
1252
1253 return CallWindowProcA(arg1,
1254 arg2,
1255 arg3,
1256 arg4,
1257 arg5);
1258}
1259//******************************************************************************
1260//******************************************************************************
1261BOOL WIN32API ChangeClipboardChain( HWND arg1, HWND arg2)
1262{
1263#ifdef DEBUG
1264 WriteLog("USER32: ChangeClipboardChain\n");
1265#endif
1266 return O32_ChangeClipboardChain(arg1, arg2);
1267}
1268//******************************************************************************
1269//******************************************************************************
1270UINT WIN32API ArrangeIconicWindows( HWND arg1)
1271{
1272#ifdef DEBUG
1273 WriteLog("USER32: ArrangeIconicWindows\n");
1274#endif
1275 return O32_ArrangeIconicWindows(arg1);
1276}
1277//******************************************************************************
1278// Not implemented by Open32 (5-31-99 Christoph Bratschi)
1279//******************************************************************************
1280BOOL WIN32API CheckRadioButton( HWND arg1, UINT arg2, UINT arg3, UINT arg4)
1281{
1282#ifdef DEBUG
1283 WriteLog("USER32: CheckRadioButton\n");
1284#endif
1285// return O32_CheckRadioButton(arg1, arg2, arg3, arg4);
1286 if (arg2 > arg3) return (FALSE);
1287 for (UINT x=arg2;x <= arg3;x++)
1288 {
1289 SendDlgItemMessageA(arg1,x,BM_SETCHECK,(x == arg4) ? BST_CHECKED : BST_UNCHECKED,0);
1290 }
1291 return (TRUE);
1292}
1293//******************************************************************************
1294//******************************************************************************
1295HWND WIN32API ChildWindowFromPoint( HWND arg1, POINT arg2)
1296{
1297#ifdef DEBUG
1298 WriteLog("USER32: ChildWindowFromPoint\n");
1299#endif
1300 return O32_ChildWindowFromPoint(arg1, arg2);
1301}
1302//******************************************************************************
1303//******************************************************************************
1304HWND WIN32API ChildWindowFromPointEx(HWND arg1, POINT arg2, UINT uFlags)
1305{
1306#ifdef DEBUG
1307 WriteLog("USER32: ChildWindowFromPointEx, not completely supported!\n");
1308#endif
1309 return O32_ChildWindowFromPoint(arg1, arg2);
1310}
1311//******************************************************************************
1312//******************************************************************************
1313BOOL WIN32API CloseClipboard(void)
1314{
1315#ifdef DEBUG
1316 WriteLog("USER32: CloseClipboard\n");
1317#endif
1318 return O32_CloseClipboard();
1319}
1320//******************************************************************************
1321//******************************************************************************
1322BOOL WIN32API CloseWindow( HWND arg1)
1323{
1324#ifdef DEBUG
1325 WriteLog("USER32: CloseWindow\n");
1326#endif
1327 return O32_CloseWindow(arg1);
1328}
1329//******************************************************************************
1330//******************************************************************************
1331HICON WIN32API CopyIcon( HICON arg1)
1332{
1333#ifdef DEBUG
1334 WriteLog("USER32: CopyIcon\n");
1335#endif
1336 return O32_CopyIcon(arg1);
1337}
1338//******************************************************************************
1339//******************************************************************************
1340int WIN32API CountClipboardFormats(void)
1341{
1342#ifdef DEBUG
1343 WriteLog("USER32: CountClipboardFormats\n");
1344#endif
1345 return O32_CountClipboardFormats();
1346}
1347//******************************************************************************
1348//******************************************************************************
1349HACCEL WIN32API CreateAcceleratorTableA( LPACCEL arg1, int arg2)
1350{
1351#ifdef DEBUG
1352 WriteLog("USER32: CreateAcceleratorTableA\n");
1353#endif
1354 return O32_CreateAcceleratorTable(arg1, arg2);
1355}
1356//******************************************************************************
1357//******************************************************************************
1358HACCEL WIN32API CreateAcceleratorTableW( LPACCEL arg1, int arg2)
1359{
1360#ifdef DEBUG
1361 WriteLog("USER32: CreateAcceleratorTableW\n");
1362#endif
1363 // NOTE: This will not work as is (needs UNICODE support)
1364 return O32_CreateAcceleratorTable(arg1, arg2);
1365}
1366//******************************************************************************
1367//******************************************************************************
1368BOOL WIN32API CreateCaret( HWND arg1, HBITMAP arg2, int arg3, int arg4)
1369{
1370#ifdef DEBUG
1371 WriteLog("USER32: CreateCaret\n");
1372#endif
1373 return O32_CreateCaret(arg1, arg2, arg3, arg4);
1374}
1375//******************************************************************************
1376//******************************************************************************
1377HCURSOR WIN32API CreateCursor( HINSTANCE arg1, int arg2, int arg3, int arg4, int arg5, const VOID * arg6, const VOID * arg7)
1378{
1379#ifdef DEBUG
1380 WriteLog("USER32: CreateCursor\n");
1381#endif
1382 return O32_CreateCursor(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
1383}
1384//******************************************************************************
1385//******************************************************************************
1386HICON WIN32API CreateIcon( HINSTANCE arg1, INT arg2, INT arg3, BYTE arg4, BYTE arg5, LPCVOID arg6, LPCVOID arg7)
1387{
1388#ifdef DEBUG
1389 WriteLog("USER32: CreateIcon\n");
1390#endif
1391 return O32_CreateIcon(arg1, arg2, arg3, arg4, arg5, (const BYTE *)arg6, (const BYTE *)arg7);
1392}
1393//******************************************************************************
1394//ASSERT dwVer == win31 (ok according to SDK docs)
1395//******************************************************************************
1396HICON WIN32API CreateIconFromResource(PBYTE presbits, UINT dwResSize,
1397 BOOL fIcon, DWORD dwVer)
1398{
1399 HICON hicon;
1400 DWORD OS2ResSize = 0;
1401 PBYTE OS2Icon = ConvertWin32Icon(presbits, dwResSize, &OS2ResSize);
1402
1403 hicon = O32_CreateIconFromResource(OS2Icon, OS2ResSize, fIcon, dwVer);
1404#ifdef DEBUG
1405 WriteLog("USER32: CreateIconFromResource returned %X (%X)\n", hicon, GetLastError());
1406#endif
1407 if(OS2Icon)
1408 FreeIcon(OS2Icon);
1409
1410 return(hicon);
1411}
1412//******************************************************************************
1413//******************************************************************************
1414HICON WIN32API CreateIconFromResourceEx(PBYTE presbits, UINT dwResSize,
1415 BOOL fIcon, DWORD dwVer,
1416 int cxDesired, int cyDesired,
1417 UINT Flags)
1418{
1419#ifdef DEBUG
1420 WriteLog("USER32: CreateIconFromResourceEx %X %d %d %X %d %d %X, not completely supported!\n", presbits, dwResSize, fIcon, dwVer, cxDesired, cyDesired, Flags);
1421#endif
1422 return CreateIconFromResource(presbits, dwResSize, fIcon, dwVer);
1423}
1424//******************************************************************************
1425//******************************************************************************
1426HICON WIN32API CreateIconIndirect(LPICONINFO arg1)
1427{
1428#ifdef DEBUG
1429 WriteLog("USER32: CreateIconIndirect\n");
1430#endif
1431 return O32_CreateIconIndirect(arg1);
1432}
1433//******************************************************************************
1434//******************************************************************************
1435HWND WIN32API CreateMDIWindowA(LPCSTR arg1, LPCSTR arg2, DWORD arg3,
1436 int arg4, int arg5, int arg6, int arg7,
1437 HWND arg8, HINSTANCE arg9, LPARAM arg10)
1438{
1439 HWND hwnd;
1440
1441#ifdef DEBUG
1442 WriteLog("USER32: CreateMDIWindowA\n");
1443#endif
1444 Win32WindowProc *window = new Win32WindowProc(arg9, arg1);
1445 hwnd = O32_CreateMDIWindow((LPSTR)arg1, (LPSTR)arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
1446 //SvL: 16-11-'97: window can be already destroyed if hwnd == 0
1447 if(hwnd == 0 && window != 0 && Win32WindowProc::FindWindowProc(window)) {
1448 delete(window);
1449 window = 0;
1450 }
1451
1452#ifdef DEBUG
1453 WriteLog("USER32: CreateMDIWindowA returned %X\n", hwnd);
1454#endif
1455 return hwnd;
1456}
1457//******************************************************************************
1458//******************************************************************************
1459HWND WIN32API CreateMDIWindowW(LPCWSTR arg1, LPCWSTR arg2, DWORD arg3, int arg4,
1460 int arg5, int arg6, int arg7, HWND arg8, HINSTANCE arg9,
1461 LPARAM arg10)
1462{
1463 HWND hwnd;
1464 char *astring1 = NULL, *astring2 = NULL;
1465 Win32WindowProc *window = NULL;
1466
1467 if((int)arg1 >> 16 != 0) {
1468 astring1 = UnicodeToAsciiString((LPWSTR)arg1);
1469 }
1470 else astring1 = (char *)arg2;
1471
1472 astring2 = UnicodeToAsciiString((LPWSTR)arg2);
1473
1474 //Classname might be name of system class, in which case we don't
1475 //need to use our own callback
1476// if(Win32WindowClass::FindClass((LPSTR)astring1) != NULL) {
1477 window = new Win32WindowProc(arg9, astring1);
1478// }
1479 hwnd = O32_CreateMDIWindow(astring1, astring2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
1480 //SvL: 16-11-'97: window can be already destroyed if hwnd == 0
1481 if(hwnd == 0 && window != 0 && Win32WindowProc::FindWindowProc(window)) {
1482 delete(window);
1483 window = 0;
1484 }
1485 if(window) {
1486 window->SetWindowHandle(hwnd);
1487 }
1488
1489 if(astring1) FreeAsciiString(astring1);
1490 FreeAsciiString(astring2);
1491#ifdef DEBUG
1492 WriteLog("USER32: CreateMDIWindowW hwnd = %X\n", hwnd);
1493#endif
1494 return(hwnd);
1495}
1496//******************************************************************************
1497//******************************************************************************
1498HWND WIN32API CreateWindowExW(DWORD arg1,
1499 LPCWSTR arg2,
1500 LPCWSTR arg3,
1501 DWORD dwStyle,
1502 int arg5,
1503 int arg6,
1504 int arg7,
1505 int arg8,
1506 HWND arg9,
1507 HMENU arg10,
1508 HINSTANCE arg11,
1509 PVOID arg12)
1510{
1511 HWND hwnd;
1512 char *astring1 = NULL,
1513 *astring2 = NULL;
1514 Win32WindowProc *window = NULL;
1515
1516 /* @@@PH 98/06/21 changed to call OS2CreateWindowExA */
1517 if((int)arg2 >> 16 != 0)
1518 astring1 = UnicodeToAsciiString((LPWSTR)arg2);
1519 else
1520 astring1 = (char *)arg2;
1521
1522 astring2 = UnicodeToAsciiString((LPWSTR)arg3);
1523
1524#ifdef DEBUG
1525 WriteLog("USER32: CreateWindowExW: dwExStyle = %X\n", arg1);
1526 if((int)arg2 >> 16 != 0)
1527 WriteLog("USER32: CreateWindow: classname = %s\n", astring1);
1528 else WriteLog("USER32: CreateWindow: classname = %X\n", arg2);
1529 WriteLog("USER32: CreateWindow: windowname= %s\n", astring2);
1530 WriteLog("USER32: CreateWindow: dwStyle = %X\n", dwStyle);
1531 WriteLog("USER32: CreateWindow: x = %d\n", arg5);
1532 WriteLog("USER32: CreateWindow: y = %d\n", arg6);
1533 WriteLog("USER32: CreateWindow: nWidth = %d\n", arg7);
1534 WriteLog("USER32: CreateWindow: nHeight = %d\n", arg8);
1535 WriteLog("USER32: CreateWindow: parent = %X\n", arg9);
1536 WriteLog("USER32: CreateWindow: hwmenu = %X\n", arg10);
1537 WriteLog("USER32: CreateWindow: hinstance = %X\n", arg11);
1538 WriteLog("USER32: CreateWindow: param = %X\n", arg12);
1539 #endif
1540
1541 hwnd = CreateWindowExA(arg1,
1542 astring1,
1543 astring2,
1544 dwStyle,
1545 arg5,
1546 arg6,
1547 arg7,
1548 arg8,
1549 arg9,
1550 arg10,
1551 arg11,
1552 arg12);
1553
1554 if(astring1)
1555 FreeAsciiString(astring1);
1556
1557 FreeAsciiString(astring2);
1558
1559#ifdef DEBUG
1560 WriteLog("USER32: ************CreateWindowExW hwnd = %X (%X)\n", hwnd, GetLastError());
1561#endif
1562 return(hwnd);
1563}
1564//******************************************************************************
1565//******************************************************************************
1566HDWP WIN32API DeferWindowPos( HDWP arg1, HWND arg2, HWND arg3, int arg4, int arg5, int arg6, int arg7, UINT arg8)
1567{
1568#ifdef DEBUG
1569 WriteLog("USER32: DeferWindowPos\n");
1570#endif
1571 return O32_DeferWindowPos(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
1572}
1573//******************************************************************************
1574//******************************************************************************
1575BOOL WIN32API DestroyAcceleratorTable( HACCEL arg1)
1576{
1577#ifdef DEBUG
1578 WriteLog("USER32: DestroyAcceleratorTable\n");
1579#endif
1580 return O32_DestroyAcceleratorTable(arg1);
1581}
1582//******************************************************************************
1583//******************************************************************************
1584BOOL WIN32API DestroyCaret(void)
1585{
1586#ifdef DEBUG
1587 WriteLog("USER32: DestroyCaret\n");
1588#endif
1589 return O32_DestroyCaret();
1590}
1591//******************************************************************************
1592//******************************************************************************
1593BOOL WIN32API DestroyCursor( HCURSOR arg1)
1594{
1595#ifdef DEBUG
1596 WriteLog("USER32: DestroyCursor\n");
1597#endif
1598 return O32_DestroyCursor(arg1);
1599}
1600//******************************************************************************
1601//******************************************************************************
1602BOOL WIN32API DestroyIcon( HICON arg1)
1603{
1604#ifdef DEBUG
1605 WriteLog("USER32: DestroyIcon\n");
1606#endif
1607 return O32_DestroyIcon(arg1);
1608}
1609//******************************************************************************
1610//******************************************************************************
1611LONG WIN32API DispatchMessageW( const MSG * arg1)
1612{
1613#ifdef DEBUG
1614 WriteLog("USER32: DispatchMessageW\n");
1615#endif
1616 // NOTE: This will not work as is (needs UNICODE support)
1617 return O32_DispatchMessage(arg1);
1618}
1619//******************************************************************************
1620//******************************************************************************
1621int WIN32API DlgDirListA( HWND arg1, LPSTR arg2, int arg3, int arg4, UINT arg5)
1622{
1623#ifdef DEBUG
1624 WriteLog("USER32: DlgDirListA\n");
1625#endif
1626 return O32_DlgDirList(arg1, arg2, arg3, arg4, arg5);
1627}
1628//******************************************************************************
1629//******************************************************************************
1630int WIN32API DlgDirListComboBoxA( HWND arg1, LPSTR arg2, int arg3, int arg4, UINT arg5)
1631{
1632#ifdef DEBUG
1633 WriteLog("USER32: DlgDirListComboBoxA\n");
1634#endif
1635 return O32_DlgDirListComboBox(arg1, arg2, arg3, arg4, arg5);
1636}
1637//******************************************************************************
1638//******************************************************************************
1639int WIN32API DlgDirListComboBoxW( HWND arg1, LPWSTR arg2, int arg3, int arg4, UINT arg5)
1640{
1641#ifdef DEBUG
1642 WriteLog("USER32: DlgDirListComboBoxW NOT WORKING\n");
1643#endif
1644 // NOTE: This will not work as is (needs UNICODE support)
1645 return 0;
1646// return O32_DlgDirListComboBox(arg1, arg2, arg3, arg4, arg5);
1647}
1648//******************************************************************************
1649//******************************************************************************
1650int WIN32API DlgDirListW( HWND arg1, LPWSTR arg2, int arg3, int arg4, UINT arg5)
1651{
1652#ifdef DEBUG
1653 WriteLog("USER32: DlgDirListW NOT WORKING\n");
1654#endif
1655 // NOTE: This will not work as is (needs UNICODE support)
1656 return 0;
1657// return O32_DlgDirList(arg1, arg2, arg3, arg4, arg5);
1658}
1659//******************************************************************************
1660//******************************************************************************
1661BOOL WIN32API DlgDirSelectComboBoxExA( HWND arg1, LPSTR arg2, int arg3, int arg4)
1662{
1663#ifdef DEBUG
1664 WriteLog("USER32: DlgDirSelectComboBoxExA\n");
1665#endif
1666 return O32_DlgDirSelectComboBoxEx(arg1, arg2, arg3, arg4);
1667}
1668//******************************************************************************
1669//******************************************************************************
1670BOOL WIN32API DlgDirSelectComboBoxExW( HWND arg1, LPWSTR arg2, int arg3, int arg4)
1671{
1672#ifdef DEBUG
1673 WriteLog("USER32: DlgDirSelectComboBoxExW NOT WORKING\n");
1674#endif
1675 // NOTE: This will not work as is (needs UNICODE support)
1676 return 0;
1677// return O32_DlgDirSelectComboBoxEx(arg1, arg2, arg3, arg4);
1678}
1679//******************************************************************************
1680//******************************************************************************
1681BOOL WIN32API DlgDirSelectExA( HWND arg1, LPSTR arg2, int arg3, int arg4)
1682{
1683#ifdef DEBUG
1684 WriteLog("USER32: DlgDirSelectExA\n");
1685#endif
1686 return O32_DlgDirSelectEx(arg1, arg2, arg3, arg4);
1687}
1688//******************************************************************************
1689//******************************************************************************
1690BOOL WIN32API DlgDirSelectExW( HWND arg1, LPWSTR arg2, int arg3, int arg4)
1691{
1692#ifdef DEBUG
1693 WriteLog("USER32: DlgDirSelectExW NOT WORKING\n");
1694#endif
1695 // NOTE: This will not work as is (needs UNICODE support)
1696 return 0;
1697// return O32_DlgDirSelectEx(arg1, arg2, arg3, arg4);
1698}
1699//******************************************************************************
1700//******************************************************************************
1701BOOL WIN32API DrawFocusRect( HDC arg1, const RECT * arg2)
1702{
1703#ifdef DEBUG
1704 WriteLog("USER32: DrawFocusRect\n");
1705#endif
1706 return O32_DrawFocusRect(arg1, arg2);
1707}
1708//******************************************************************************
1709//******************************************************************************
1710BOOL WIN32API DrawIcon( HDC arg1, int arg2, int arg3, HICON arg4)
1711{
1712#ifdef DEBUG
1713 WriteLog("USER32: DrawIcon\n");
1714#endif
1715 return O32_DrawIcon(arg1, arg2, arg3, arg4);
1716}
1717//******************************************************************************
1718//******************************************************************************
1719BOOL WIN32API DrawIconEx(HDC hdc, int xLeft, int xRight, HICON hIcon,
1720 int cxWidth, int cyWidth, UINT istepIfAniCur,
1721 HBRUSH hbrFlickerFreeDraw, UINT diFlags)
1722{
1723#ifdef DEBUG
1724 WriteLog("USER32: DrawIcon, partially implemented\n");
1725#endif
1726 return O32_DrawIcon(hdc, xLeft, xRight, hIcon);
1727}
1728//******************************************************************************
1729//******************************************************************************
1730BOOL WIN32API DrawMenuBar( HWND arg1)
1731{
1732#ifdef DEBUG
1733 WriteLog("USER32: DrawMenuBar\n");
1734#endif
1735 return O32_DrawMenuBar(arg1);
1736}
1737//******************************************************************************
1738//******************************************************************************
1739int WIN32API DrawTextW( HDC arg1, LPCWSTR arg2, int arg3, PRECT arg4, UINT arg5)
1740{
1741 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
1742 int rc;
1743
1744#ifdef DEBUG
1745 WriteLog("USER32: DrawTextW %s\n", astring);
1746#endif
1747 rc = O32_DrawText(arg1, astring, arg3, arg4, arg5);
1748 FreeAsciiString(astring);
1749 return(rc);
1750}
1751//******************************************************************************
1752//******************************************************************************
1753int WIN32API DrawTextExW(HDC arg1, LPCWSTR arg2, int arg3, PRECT arg4, UINT arg5, LPDRAWTEXTPARAMS lpDTParams)
1754{
1755 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
1756 int rc;
1757
1758#ifdef DEBUG
1759 WriteLog("USER32: DrawTextExW (not completely supported) %s\n", astring);
1760#endif
1761 rc = O32_DrawText(arg1, astring, arg3, arg4, arg5);
1762 FreeAsciiString(astring);
1763 return(rc);
1764}
1765//******************************************************************************
1766//******************************************************************************
1767BOOL WIN32API EmptyClipboard(void)
1768{
1769#ifdef DEBUG
1770 WriteLog("USER32: EmptyClipboard\n");
1771#endif
1772 return O32_EmptyClipboard();
1773}
1774//******************************************************************************
1775//******************************************************************************
1776BOOL WIN32API EndDeferWindowPos( HDWP arg1)
1777{
1778#ifdef DEBUG
1779 WriteLog("USER32: EndDeferWindowPos\n");
1780#endif
1781 return O32_EndDeferWindowPos(arg1);
1782}
1783//******************************************************************************
1784//******************************************************************************
1785BOOL WIN32API EnumChildWindows(HWND hwnd, WNDENUMPROC lpfn, LPARAM lParam)
1786{
1787 BOOL rc;
1788 EnumWindowCallback *callback = new EnumWindowCallback(lpfn, lParam);
1789
1790#ifdef DEBUG
1791 WriteLog("USER32: EnumChildWindows\n");
1792#endif
1793 rc = O32_EnumChildWindows(hwnd, callback->GetOS2Callback(), (LPARAM)callback);
1794 if(callback)
1795 delete callback;
1796 return(rc);
1797}
1798//******************************************************************************
1799//******************************************************************************
1800UINT WIN32API EnumClipboardFormats(UINT arg1)
1801{
1802#ifdef DEBUG
1803 WriteLog("USER32: EnumClipboardFormats\n");
1804#endif
1805 return O32_EnumClipboardFormats(arg1);
1806}
1807//******************************************************************************
1808//******************************************************************************
1809int WIN32API EnumPropsA(HWND arg1, PROPENUMPROCA arg2)
1810{
1811#ifdef DEBUG
1812 WriteLog("USER32: EnumPropsA DOES NOT WORK\n");
1813#endif
1814 //calling convention problems
1815 return 0;
1816// return O32_EnumProps(arg1, (PROPENUMPROC_O32)arg2);
1817}
1818//******************************************************************************
1819//******************************************************************************
1820int WIN32API EnumPropsExA( HWND arg1, PROPENUMPROCEXA arg2, LPARAM arg3)
1821{
1822#ifdef DEBUG
1823 WriteLog("USER32: EnumPropsExA DOES NOT WORK\n");
1824#endif
1825 //calling convention problems
1826 return 0;
1827// return O32_EnumPropsEx(arg1, arg2, (PROPENUMPROCEX_O32)arg3);
1828}
1829//******************************************************************************
1830//******************************************************************************
1831int WIN32API EnumPropsExW( HWND arg1, PROPENUMPROCEXW arg2, LPARAM arg3)
1832{
1833#ifdef DEBUG
1834 WriteLog("USER32: EnumPropsExW\n");
1835#endif
1836 // NOTE: This will not work as is (needs UNICODE support)
1837 //calling convention problems
1838 return 0;
1839// return O32_EnumPropsEx(arg1, arg2, arg3);
1840}
1841//******************************************************************************
1842//******************************************************************************
1843int WIN32API EnumPropsW( HWND arg1, PROPENUMPROCW arg2)
1844{
1845#ifdef DEBUG
1846 WriteLog("USER32: EnumPropsW\n");
1847#endif
1848 // NOTE: This will not work as is (needs UNICODE support)
1849 //calling convention problems
1850 return 0;
1851// return O32_EnumProps(arg1, arg2);
1852}
1853//******************************************************************************
1854//******************************************************************************
1855BOOL WIN32API EnumWindows(WNDENUMPROC lpfn, LPARAM lParam)
1856{
1857 BOOL rc;
1858 EnumWindowCallback *callback = new EnumWindowCallback(lpfn, lParam);
1859
1860#ifdef DEBUG
1861 WriteLog("USER32: EnumWindows\n");
1862#endif
1863 rc = O32_EnumWindows(callback->GetOS2Callback(), (LPARAM)callback);
1864 if(callback)
1865 delete callback;
1866 return(rc);
1867}
1868//******************************************************************************
1869//******************************************************************************
1870BOOL WIN32API EqualRect( const RECT * arg1, const RECT * arg2)
1871{
1872#ifdef DEBUG
1873 WriteLog("USER32: EqualRect\n");
1874#endif
1875 return O32_EqualRect(arg1, arg2);
1876}
1877//******************************************************************************
1878//******************************************************************************
1879BOOL WIN32API ExcludeUpdateRgn( HDC arg1, HWND arg2)
1880{
1881#ifdef DEBUG
1882 WriteLog("USER32: ExcludeUpdateRgn\n");
1883#endif
1884 return O32_ExcludeUpdateRgn(arg1, arg2);
1885}
1886//******************************************************************************
1887//******************************************************************************
1888BOOL WIN32API ExitWindowsEx( UINT arg1, DWORD arg2)
1889{
1890#ifdef DEBUG
1891 WriteLog("USER32: ExitWindowsEx\n");
1892#endif
1893 return O32_ExitWindowsEx(arg1, arg2);
1894}
1895//******************************************************************************
1896//******************************************************************************
1897int WIN32API FillRect(HDC arg1, const RECT * arg2, HBRUSH arg3)
1898{
1899#ifdef DEBUG
1900 WriteLog("USER32: FillRect (%d,%d)(%d,%d) brush %X\n", arg2->left, arg2->top, arg2->right, arg2->bottom, arg3);
1901#endif
1902 return O32_FillRect(arg1, arg2, arg3);
1903}
1904//******************************************************************************
1905//******************************************************************************
1906HWND WIN32API FindWindowW( LPCWSTR arg1, LPCWSTR arg2)
1907{
1908 char *astring1 = UnicodeToAsciiString((LPWSTR)arg1);
1909 char *astring2 = UnicodeToAsciiString((LPWSTR)arg2);
1910 HWND rc;
1911
1912#ifdef DEBUG
1913 WriteLog("USER32: FindWindowW\n");
1914#endif
1915 rc = O32_FindWindow(astring1, astring2);
1916 FreeAsciiString(astring1);
1917 FreeAsciiString(astring2);
1918 return rc;
1919}
1920//******************************************************************************
1921//******************************************************************************
1922int WIN32API FrameRect( HDC arg1, const RECT * arg2, HBRUSH arg3)
1923{
1924#ifdef DEBUG
1925 WriteLog("USER32: FrameRect\n");
1926#endif
1927 return O32_FrameRect(arg1, arg2, arg3);
1928}
1929//******************************************************************************
1930//******************************************************************************
1931HWND WIN32API GetCapture(void)
1932{
1933#ifdef DEBUG
1934 WriteLog("USER32: GetCapture\n");
1935#endif
1936 return O32_GetCapture();
1937}
1938//******************************************************************************
1939//******************************************************************************
1940UINT WIN32API GetCaretBlinkTime(void)
1941{
1942#ifdef DEBUG
1943 WriteLog("USER32: GetCaretBlinkTime\n");
1944#endif
1945 return O32_GetCaretBlinkTime();
1946}
1947//******************************************************************************
1948//******************************************************************************
1949BOOL WIN32API GetCaretPos( PPOINT arg1)
1950{
1951#ifdef DEBUG
1952 WriteLog("USER32: GetCaretPos\n");
1953#endif
1954 return O32_GetCaretPos(arg1);
1955}
1956//******************************************************************************
1957//******************************************************************************
1958BOOL WIN32API GetClipCursor( PRECT arg1)
1959{
1960#ifdef DEBUG
1961 WriteLog("USER32: GetClipCursor\n");
1962#endif
1963 return O32_GetClipCursor(arg1);
1964}
1965//******************************************************************************
1966//******************************************************************************
1967HANDLE WIN32API GetClipboardData( UINT arg1)
1968{
1969#ifdef DEBUG
1970 WriteLog("USER32: GetClipboardData\n");
1971#endif
1972 return O32_GetClipboardData(arg1);
1973}
1974//******************************************************************************
1975//******************************************************************************
1976int WIN32API GetClipboardFormatNameA( UINT arg1, LPSTR arg2, int arg3)
1977{
1978#ifdef DEBUG
1979 WriteLog("USER32: GetClipboardFormatNameA %s\n", arg2);
1980#endif
1981 return O32_GetClipboardFormatName(arg1, arg2, arg3);
1982}
1983//******************************************************************************
1984//******************************************************************************
1985int WIN32API GetClipboardFormatNameW(UINT arg1, LPWSTR arg2, int arg3)
1986{
1987 int rc;
1988 char *astring = UnicodeToAsciiString(arg2);
1989
1990#ifdef DEBUG
1991 WriteLog("USER32: GetClipboardFormatNameW %s\n", astring);
1992#endif
1993 rc = O32_GetClipboardFormatName(arg1, astring, arg3);
1994 FreeAsciiString(astring);
1995 return(rc);
1996}
1997//******************************************************************************
1998//******************************************************************************
1999HWND WIN32API GetClipboardOwner(void)
2000{
2001#ifdef DEBUG
2002 WriteLog("USER32: GetClipboardOwner\n");
2003#endif
2004 return O32_GetClipboardOwner();
2005}
2006//******************************************************************************
2007//******************************************************************************
2008HWND WIN32API GetClipboardViewer(void)
2009{
2010#ifdef DEBUG
2011 WriteLog("USER32: GetClipboardViewer\n");
2012#endif
2013 return O32_GetClipboardViewer();
2014}
2015//******************************************************************************
2016//******************************************************************************
2017DWORD WIN32API GetDialogBaseUnits(void)
2018{
2019#ifdef DEBUG
2020 WriteLog("USER32: GetDialogBaseUnits\n");
2021#endif
2022 return O32_GetDialogBaseUnits();
2023}
2024//******************************************************************************
2025//******************************************************************************
2026UINT WIN32API GetDlgItemInt( HWND arg1, int arg2, PBOOL arg3, BOOL arg4)
2027{
2028#ifdef DEBUG
2029 WriteLog("USER32: GetDlgItemInt\n");
2030#endif
2031 return O32_GetDlgItemInt(arg1, arg2, arg3, arg4);
2032}
2033
2034
2035/*****************************************************************************
2036 * Name : UINT WIN32API GetDlgItemTextW
2037 * Purpose : Determine the text of a window control
2038 * Parameters: HWND arg1
2039 * int arg2
2040 * LPWSTR arg3
2041 * UINT arg4
2042 * Variables :
2043 * Result :
2044 * Remark :
2045 * Status : UNTESTED UNKNOWN STUB
2046 *
2047 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2048 *****************************************************************************/
2049
2050UINT WIN32API GetDlgItemTextW(HWND arg1,
2051 int arg2,
2052 LPWSTR arg3,
2053 UINT arg4)
2054{
2055 LPSTR lpBuffer; /* temporary buffer for the ascii result */
2056 UINT uiResult; /* return value of the ascii variant */
2057
2058 dprintf(("USER32: GetDlgItemTextW(%08xh,%08xh,%08xh,%08xh)\n",
2059 arg1,
2060 arg2,
2061 arg3,
2062 arg4));
2063
2064
2065 lpBuffer = (LPSTR)malloc(arg4); /* allocate temporary buffer */
2066 uiResult = GetDlgItemTextA(arg1, /* call ascii variant */
2067 arg2,
2068 lpBuffer,
2069 arg4);
2070
2071 AsciiToUnicodeN(lpBuffer, /* now convert result to unicode */
2072 arg3,
2073 arg4);
2074
2075 free(lpBuffer); /* free the temporary buffer */
2076
2077 return (uiResult); /* OK, that's it */
2078}
2079
2080
2081//******************************************************************************
2082//******************************************************************************
2083UINT WIN32API GetDoubleClickTime(void)
2084{
2085#ifdef DEBUG
2086 WriteLog("USER32: GetDoubleClickTime\n");
2087#endif
2088 return O32_GetDoubleClickTime();
2089}
2090//******************************************************************************
2091//******************************************************************************
2092HWND WIN32API GetForegroundWindow(void)
2093{
2094#ifdef DEBUG
2095 WriteLog("USER32: GetForegroundWindow\n");
2096#endif
2097 return O32_GetForegroundWindow();
2098}
2099//******************************************************************************
2100//******************************************************************************
2101BOOL WIN32API GetIconInfo( HICON arg1, LPICONINFO arg2)
2102{
2103#ifdef DEBUG
2104 WriteLog("USER32: GetIconInfo\n");
2105#endif
2106 return O32_GetIconInfo(arg1, arg2);
2107}
2108//******************************************************************************
2109//******************************************************************************
2110int WIN32API GetKeyNameTextA( LPARAM arg1, LPSTR arg2, int arg3)
2111{
2112#ifdef DEBUG
2113 WriteLog("USER32: GetKeyNameTextA\n");
2114#endif
2115 return O32_GetKeyNameText(arg1, arg2, arg3);
2116}
2117//******************************************************************************
2118//******************************************************************************
2119int WIN32API GetKeyNameTextW( LPARAM arg1, LPWSTR arg2, int arg3)
2120{
2121#ifdef DEBUG
2122 WriteLog("USER32: GetKeyNameTextW DOES NOT WORK\n");
2123#endif
2124 // NOTE: This will not work as is (needs UNICODE support)
2125 return 0;
2126// return O32_GetKeyNameText(arg1, arg2, arg3);
2127}
2128//******************************************************************************
2129//******************************************************************************
2130int WIN32API GetKeyboardType( int arg1)
2131{
2132#ifdef DEBUG
2133 WriteLog("USER32: GetKeyboardType\n");
2134#endif
2135 return O32_GetKeyboardType(arg1);
2136}
2137//******************************************************************************
2138//******************************************************************************
2139HWND WIN32API GetLastActivePopup( HWND arg1)
2140{
2141#ifdef DEBUG
2142 WriteLog("USER32: GetLastActivePopup\n");
2143#endif
2144 return O32_GetLastActivePopup(arg1);
2145}
2146//******************************************************************************
2147//******************************************************************************
2148LONG WIN32API GetMessageExtraInfo(void)
2149{
2150 dprintf(("USER32: GetMessageExtraInfo\n"));
2151 return O32_GetMessageExtraInfo();
2152}
2153//******************************************************************************
2154//******************************************************************************
2155DWORD WIN32API GetMessagePos(void)
2156{
2157 dprintf(("USER32: GetMessagePos\n"));
2158 return O32_GetMessagePos();
2159}
2160//******************************************************************************
2161//******************************************************************************
2162LONG WIN32API GetMessageTime(void)
2163{
2164 dprintf(("USER32: GetMessageTime\n"));
2165 return O32_GetMessageTime();
2166}
2167//******************************************************************************
2168//******************************************************************************
2169BOOL WIN32API GetMessageW(LPMSG arg1, HWND arg2, UINT arg3, UINT arg4)
2170{
2171 BOOL rc;
2172
2173 // NOTE: This will not work as is (needs UNICODE support)
2174 rc = O32_GetMessage(arg1, arg2, arg3, arg4);
2175 dprintf(("USER32: GetMessageW %X returned %d\n", arg2, rc));
2176 return(rc);
2177}
2178//******************************************************************************
2179//******************************************************************************
2180HWND WIN32API GetNextDlgGroupItem( HWND arg1, HWND arg2, BOOL arg3)
2181{
2182#ifdef DEBUG
2183 WriteLog("USER32: GetNextDlgGroupItem\n");
2184#endif
2185 return O32_GetNextDlgGroupItem(arg1, arg2, arg3);
2186}
2187//******************************************************************************
2188//******************************************************************************
2189HWND WIN32API GetOpenClipboardWindow(void)
2190{
2191#ifdef DEBUG
2192 WriteLog("USER32: GetOpenClipboardWindow\n");
2193#endif
2194 return O32_GetOpenClipboardWindow();
2195}
2196//******************************************************************************
2197//******************************************************************************
2198HWND WIN32API GetParent( HWND arg1)
2199{
2200#ifdef DEBUG
2201//// WriteLog("USER32: GetParent\n");
2202#endif
2203 return O32_GetParent(arg1);
2204}
2205//******************************************************************************
2206//******************************************************************************
2207int WIN32API GetPriorityClipboardFormat( PUINT arg1, int arg2)
2208{
2209#ifdef DEBUG
2210 WriteLog("USER32: GetPriorityClipboardFormat\n");
2211#endif
2212 return O32_GetPriorityClipboardFormat(arg1, arg2);
2213}
2214//******************************************************************************
2215//******************************************************************************
2216HANDLE WIN32API GetPropA( HWND arg1, LPCSTR arg2)
2217{
2218#ifdef DEBUG
2219 if((int)arg2 >> 16 != 0)
2220 WriteLog("USER32: GetPropA %s\n", arg2);
2221 else WriteLog("USER32: GetPropA %X\n", arg2);
2222#endif
2223 return O32_GetProp(arg1, arg2);
2224}
2225//******************************************************************************
2226//******************************************************************************
2227HANDLE WIN32API GetPropW(HWND arg1, LPCWSTR arg2)
2228{
2229 BOOL handle;
2230 char *astring;
2231
2232 if((int)arg2 >> 16 != 0)
2233 astring = UnicodeToAsciiString((LPWSTR)arg2);
2234 else astring = (char *)arg2;
2235#ifdef DEBUG
2236 if((int)arg2 >> 16 != 0)
2237 WriteLog("USER32: GetPropW %s\n", astring);
2238 else WriteLog("USER32: GetPropW %X\n", astring);
2239#endif
2240 handle = GetPropA(arg1, (LPCSTR)astring);
2241 if((int)arg2 >> 16 != 0)
2242 FreeAsciiString(astring);
2243
2244 return(handle);
2245}
2246//******************************************************************************
2247//******************************************************************************
2248DWORD WIN32API GetQueueStatus( UINT arg1)
2249{
2250#ifdef DEBUG
2251 WriteLog("USER32: GetQueueStatus\n");
2252#endif
2253 return O32_GetQueueStatus(arg1);
2254}
2255//******************************************************************************
2256//******************************************************************************
2257int WIN32API GetScrollPos(HWND hwnd, int fnBar)
2258{
2259 int pos;
2260
2261 pos = O32_GetScrollPos(hwnd, fnBar);
2262#ifdef DEBUG
2263 WriteLog("USER32: GetScrollPos of %X type %d returned %d\n", hwnd, fnBar, pos);
2264#endif
2265 return(pos);
2266}
2267//******************************************************************************
2268//******************************************************************************
2269BOOL WIN32API GetScrollRange( HWND arg1, int arg2, int * arg3, int * arg4)
2270{
2271#ifdef DEBUG
2272 WriteLog("USER32: GetScrollRange\n");
2273#endif
2274 return O32_GetScrollRange(arg1, arg2, arg3, arg4);
2275}
2276//******************************************************************************
2277//******************************************************************************
2278DWORD WIN32API GetTabbedTextExtentA( HDC arg1, LPCSTR arg2, int arg3, int arg4, int * arg5)
2279{
2280#ifdef DEBUG
2281 WriteLog("USER32: GetTabbedTextExtentA\n");
2282#endif
2283 return O32_GetTabbedTextExtent(arg1, arg2, arg3, arg4, arg5);
2284}
2285//******************************************************************************
2286//******************************************************************************
2287DWORD WIN32API GetTabbedTextExtentW( HDC arg1, LPCWSTR arg2, int arg3, int arg4, int * arg5)
2288{
2289 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
2290 DWORD rc;
2291
2292#ifdef DEBUG
2293 WriteLog("USER32: GetTabbedTextExtentW\n");
2294#endif
2295 rc = O32_GetTabbedTextExtent(arg1, astring, arg3, arg4, arg5);
2296 FreeAsciiString(astring);
2297 return rc;
2298}
2299//******************************************************************************
2300//******************************************************************************
2301HWND WIN32API GetTopWindow( HWND arg1)
2302{
2303#ifdef DEBUG
2304//// WriteLog("USER32: GetTopWindow\n");
2305#endif
2306 return O32_GetTopWindow(arg1);
2307}
2308//******************************************************************************
2309//******************************************************************************
2310int WIN32API GetUpdateRgn( HWND arg1, HRGN arg2, BOOL arg3)
2311{
2312#ifdef DEBUG
2313 WriteLog("USER32: GetUpdateRgn\n");
2314#endif
2315 return O32_GetUpdateRgn(arg1, arg2, arg3);
2316}
2317//******************************************************************************
2318//******************************************************************************
2319LONG WIN32API GetWindowLongW( HWND arg1, int arg2)
2320{
2321#ifdef DEBUG
2322 WriteLog("USER32: GetWindowLongW\n");
2323#endif
2324 return GetWindowLongA(arg1, arg2); //class procedures..
2325}
2326//******************************************************************************
2327//******************************************************************************
2328BOOL WIN32API GetWindowPlacement( HWND arg1, LPWINDOWPLACEMENT arg2)
2329{
2330#ifdef DEBUG
2331 WriteLog("USER32: GetWindowPlacement\n");
2332#endif
2333 return O32_GetWindowPlacement(arg1, arg2);
2334}
2335//******************************************************************************
2336
2337/***********************************************************************
2338 * GetInternalWindowPos (USER32.245)
2339 */
2340UINT WIN32API GetInternalWindowPos(HWND hwnd,
2341 LPRECT rectWnd,
2342 LPPOINT ptIcon )
2343{
2344 WINDOWPLACEMENT wndpl;
2345
2346 dprintf(("USER32: GetInternalWindowPos(%08xh,%08xh,%08xh)\n",
2347 hwnd,
2348 rectWnd,
2349 ptIcon));
2350
2351 if (O32_GetWindowPlacement( hwnd, &wndpl ))
2352 {
2353 if (rectWnd) *rectWnd = wndpl.rcNormalPosition;
2354 if (ptIcon) *ptIcon = wndpl.ptMinPosition;
2355 return wndpl.showCmd;
2356 }
2357 return 0;
2358}
2359
2360
2361//******************************************************************************
2362int WIN32API GetWindowTextLengthW( HWND arg1)
2363{
2364#ifdef DEBUG
2365 WriteLog("USER32: GetWindowTextLengthW\n");
2366#endif
2367 return O32_GetWindowTextLength(arg1);
2368}
2369//******************************************************************************
2370//******************************************************************************
2371int WIN32API GetWindowTextW(HWND hwnd, LPWSTR lpsz, int cch)
2372{
2373 char title[128];
2374 int rc;
2375
2376 rc = O32_GetWindowText(hwnd, title, sizeof(title));
2377#ifdef DEBUG
2378 WriteLog("USER32: GetWindowTextW returned %s\n", title);
2379#endif
2380 if(rc > cch) {
2381 title[cch-1] = 0;
2382 rc = cch;
2383 }
2384 AsciiToUnicode(title, lpsz);
2385 return(rc);
2386}
2387//******************************************************************************
2388//******************************************************************************
2389DWORD WIN32API GetWindowThreadProcessId(HWND arg1, PDWORD arg2)
2390{
2391#ifdef DEBUG
2392 WriteLog("USER32: GetWindowThreadProcessId\n");
2393#endif
2394 return O32_GetWindowThreadProcessId(arg1, arg2);
2395}
2396//******************************************************************************
2397//******************************************************************************
2398WORD WIN32API GetWindowWord( HWND arg1, int arg2)
2399{
2400#ifdef DEBUG
2401 WriteLog("USER32: GetWindowWord\n");
2402#endif
2403 return O32_GetWindowWord(arg1, arg2);
2404}
2405//******************************************************************************
2406//******************************************************************************
2407BOOL WIN32API HideCaret( HWND arg1)
2408{
2409#ifdef DEBUG
2410 WriteLog("USER32: HideCaret\n");
2411#endif
2412 return O32_HideCaret(arg1);
2413}
2414//******************************************************************************
2415//******************************************************************************
2416BOOL WIN32API InSendMessage(void)
2417{
2418#ifdef DEBUG
2419 WriteLog("USER32: InSendMessage\n");
2420#endif
2421 return O32_InSendMessage();
2422}
2423//******************************************************************************
2424//******************************************************************************
2425BOOL WIN32API IntersectRect( PRECT arg1, const RECT * arg2, const RECT * arg3)
2426{
2427#ifdef DEBUG
2428//// WriteLog("USER32: IntersectRect\n");
2429#endif
2430 return O32_IntersectRect(arg1, arg2, arg3);
2431}
2432//******************************************************************************
2433//******************************************************************************
2434BOOL WIN32API InvalidateRgn( HWND arg1, HRGN arg2, BOOL arg3)
2435{
2436#ifdef DEBUG
2437 WriteLog("USER32: InvalidateRgn\n");
2438#endif
2439 return O32_InvalidateRgn(arg1, arg2, arg3);
2440}
2441//******************************************************************************
2442//******************************************************************************
2443BOOL WIN32API InvertRect( HDC arg1, const RECT * arg2)
2444{
2445#ifdef DEBUG
2446 WriteLog("USER32: InvertRect\n");
2447#endif
2448 return O32_InvertRect(arg1, arg2);
2449}
2450//******************************************************************************
2451//******************************************************************************
2452BOOL WIN32API IsChild( HWND arg1, HWND arg2)
2453{
2454#ifdef DEBUG
2455 WriteLog("USER32: IsChild\n");
2456#endif
2457 return O32_IsChild(arg1, arg2);
2458}
2459//******************************************************************************
2460//******************************************************************************
2461BOOL WIN32API IsClipboardFormatAvailable( UINT arg1)
2462{
2463#ifdef DEBUG
2464 WriteLog("USER32: IsClipboardFormatAvailable\n");
2465#endif
2466 return O32_IsClipboardFormatAvailable(arg1);
2467}
2468//******************************************************************************
2469//******************************************************************************
2470BOOL WIN32API IsDialogMessageW( HWND arg1, LPMSG arg2)
2471{
2472#ifdef DEBUG
2473 WriteLog("USER32: IsDialogMessageW\n");
2474#endif
2475 // NOTE: This will not work as is (needs UNICODE support)
2476 return O32_IsDialogMessage(arg1, arg2);
2477}
2478//******************************************************************************
2479//******************************************************************************
2480BOOL WIN32API IsRectEmpty( const RECT * arg1)
2481{
2482#ifdef DEBUG
2483 WriteLog("USER32: IsRectEmpty\n");
2484#endif
2485 return O32_IsRectEmpty(arg1);
2486}
2487//******************************************************************************
2488//******************************************************************************
2489BOOL WIN32API IsWindow( HWND arg1)
2490{
2491#ifdef DEBUG
2492 WriteLog("USER32: IsWindow\n");
2493#endif
2494 return O32_IsWindow(arg1);
2495}
2496//******************************************************************************
2497//******************************************************************************
2498BOOL WIN32API IsWindowEnabled( HWND arg1)
2499{
2500#ifdef DEBUG
2501 WriteLog("USER32: IsWindowEnabled\n");
2502#endif
2503 return O32_IsWindowEnabled(arg1);
2504}
2505//******************************************************************************
2506//******************************************************************************
2507BOOL WIN32API IsWindowVisible( HWND arg1)
2508{
2509#ifdef DEBUG
2510 WriteLog("USER32: IsWindowVisible\n");
2511#endif
2512 return O32_IsWindowVisible(arg1);
2513}
2514//******************************************************************************
2515//******************************************************************************
2516BOOL WIN32API IsZoomed( HWND arg1)
2517{
2518#ifdef DEBUG
2519 WriteLog("USER32: IsZoomed\n");
2520#endif
2521 return O32_IsZoomed(arg1);
2522}
2523//******************************************************************************
2524//******************************************************************************
2525BOOL WIN32API LockWindowUpdate( HWND arg1)
2526{
2527#ifdef DEBUG
2528 WriteLog("USER32: LockWindowUpdate\n");
2529#endif
2530 return O32_LockWindowUpdate(arg1);
2531}
2532//******************************************************************************
2533//******************************************************************************
2534BOOL WIN32API MapDialogRect( HWND arg1, PRECT arg2)
2535{
2536#ifdef DEBUG
2537 WriteLog("USER32: MapDialogRect\n");
2538#endif
2539 return O32_MapDialogRect(arg1, arg2);
2540}
2541//******************************************************************************
2542//******************************************************************************
2543UINT WIN32API MapVirtualKeyA( UINT arg1, UINT arg2)
2544{
2545#ifdef DEBUG
2546 WriteLog("USER32: MapVirtualKeyA\n");
2547#endif
2548 return O32_MapVirtualKey(arg1, arg2);
2549}
2550//******************************************************************************
2551//******************************************************************************
2552UINT WIN32API MapVirtualKeyW( UINT arg1, UINT arg2)
2553{
2554#ifdef DEBUG
2555 WriteLog("USER32: MapVirtualKeyW\n");
2556#endif
2557 // NOTE: This will not work as is (needs UNICODE support)
2558 return O32_MapVirtualKey(arg1, arg2);
2559}
2560//******************************************************************************
2561//******************************************************************************
2562int WIN32API MapWindowPoints( HWND arg1, HWND arg2, LPPOINT arg3, UINT arg4)
2563{
2564#ifdef DEBUG
2565 WriteLog("USER32: MapWindowPoints\n");
2566#endif
2567 return O32_MapWindowPoints(arg1, arg2, arg3, arg4);
2568}
2569//******************************************************************************
2570//******************************************************************************
2571int WIN32API MessageBoxW(HWND arg1, LPCWSTR arg2, LPCWSTR arg3, UINT arg4)
2572{
2573 char *astring1, *astring2;
2574 int rc;
2575
2576 astring1 = UnicodeToAsciiString((LPWSTR)arg2);
2577 astring2 = UnicodeToAsciiString((LPWSTR)arg3);
2578#ifdef DEBUG
2579 WriteLog("USER32: MessageBoxW %s %s\n", astring1, astring2);
2580#endif
2581 rc = O32_MessageBox(arg1, astring1, astring2, arg4);
2582 FreeAsciiString(astring1);
2583 FreeAsciiString(astring2);
2584 return(rc);
2585}
2586//******************************************************************************
2587//******************************************************************************
2588BOOL WIN32API OpenClipboard( HWND arg1)
2589{
2590#ifdef DEBUG
2591 WriteLog("USER32: OpenClipboard\n");
2592#endif
2593 return O32_OpenClipboard(arg1);
2594}
2595//******************************************************************************
2596//******************************************************************************
2597BOOL WIN32API PeekMessageW( LPMSG arg1, HWND arg2, UINT arg3, UINT arg4, UINT arg5)
2598{
2599#ifdef DEBUG
2600 WriteLog("USER32: PeekMessageW\n");
2601#endif
2602 // NOTE: This will not work as is (needs UNICODE support)
2603 return O32_PeekMessage(arg1, arg2, arg3, arg4, arg5);
2604}
2605//******************************************************************************
2606//******************************************************************************
2607// NOTE: Open32 function doesn't have the 'W'.
2608BOOL WIN32API PostMessageW( HWND arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
2609{
2610#ifdef DEBUG
2611 WriteLog("USER32: PostMessageW\n");
2612#endif
2613 // NOTE: This will not work as is (needs UNICODE support)
2614 return O32_PostMessage(arg1, arg2, arg3, arg4);
2615}
2616//******************************************************************************
2617//******************************************************************************
2618BOOL WIN32API PostThreadMessageA( DWORD arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
2619{
2620#ifdef DEBUG
2621 WriteLog("USER32: PostThreadMessageA\n");
2622#endif
2623 return O32_PostThreadMessage(arg1, arg2, arg3, arg4);
2624}
2625//******************************************************************************
2626//******************************************************************************
2627BOOL WIN32API PostThreadMessageW( DWORD arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
2628{
2629#ifdef DEBUG
2630 WriteLog("USER32: PostThreadMessageW\n");
2631#endif
2632 // NOTE: This will not work as is (needs UNICODE support)
2633 return O32_PostThreadMessage(arg1, arg2, arg3, arg4);
2634}
2635//******************************************************************************
2636//******************************************************************************
2637BOOL WIN32API PtInRect( const RECT * arg1, POINT arg2)
2638{
2639#ifdef DEBUG1
2640 WriteLog("USER32: PtInRect\n");
2641#endif
2642 return O32_PtInRect(arg1, arg2);
2643}
2644//******************************************************************************
2645//******************************************************************************
2646BOOL WIN32API RedrawWindow( HWND arg1, const RECT * arg2, HRGN arg3, UINT arg4)
2647{
2648 BOOL rc;
2649
2650 rc = O32_RedrawWindow(arg1, arg2, arg3, arg4);
2651#ifdef DEBUG
2652 WriteLog("USER32: RedrawWindow %X , %X, %X, %X returned %d\n", arg1, arg2, arg3, arg4, rc);
2653#endif
2654 InvalidateRect(arg1, arg2, TRUE);
2655 UpdateWindow(arg1);
2656 SendMessageA(arg1, WM_PAINT, 0, 0);
2657 return(rc);
2658}
2659//******************************************************************************
2660//******************************************************************************
2661UINT WIN32API RegisterClipboardFormatA( LPCSTR arg1)
2662{
2663#ifdef DEBUG
2664 WriteLog("USER32: RegisterClipboardFormatA\n");
2665#endif
2666 return O32_RegisterClipboardFormat(arg1);
2667}
2668//******************************************************************************
2669//******************************************************************************
2670UINT WIN32API RegisterClipboardFormatW(LPCWSTR arg1)
2671{
2672 UINT rc;
2673 char *astring = UnicodeToAsciiString((LPWSTR)arg1);
2674
2675#ifdef DEBUG
2676 WriteLog("USER32: RegisterClipboardFormatW %s\n", astring);
2677#endif
2678 rc = O32_RegisterClipboardFormat(astring);
2679 FreeAsciiString(astring);
2680#ifdef DEBUG
2681 WriteLog("USER32: RegisterClipboardFormatW returned %d\n", rc);
2682#endif
2683 return(rc);
2684}
2685//******************************************************************************
2686//******************************************************************************
2687UINT WIN32API RegisterWindowMessageW( LPCWSTR arg1)
2688{
2689 char *astring = UnicodeToAsciiString((LPWSTR)arg1);
2690 UINT rc;
2691
2692#ifdef DEBUG
2693 WriteLog("USER32: RegisterWindowMessageW\n");
2694#endif
2695 rc = O32_RegisterWindowMessage(astring);
2696 FreeAsciiString(astring);
2697 return rc;
2698}
2699//******************************************************************************
2700//******************************************************************************
2701HANDLE WIN32API RemovePropA( HWND arg1, LPCSTR arg2)
2702{
2703#ifdef DEBUG
2704 WriteLog("USER32: RemovePropA\n");
2705#endif
2706 return O32_RemoveProp(arg1, arg2);
2707}
2708//******************************************************************************
2709//******************************************************************************
2710HANDLE WIN32API RemovePropW( HWND arg1, LPCWSTR arg2)
2711{
2712 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
2713 HANDLE rc;
2714
2715#ifdef DEBUG
2716 WriteLog("USER32: RemovePropW\n");
2717#endif
2718 rc = O32_RemoveProp(arg1, astring);
2719 FreeAsciiString(astring);
2720 return rc;
2721}
2722//******************************************************************************
2723//******************************************************************************
2724BOOL WIN32API ReplyMessage( LRESULT arg1)
2725{
2726#ifdef DEBUG
2727 WriteLog("USER32: ReplyMessage\n");
2728#endif
2729 return O32_ReplyMessage(arg1);
2730}
2731//******************************************************************************
2732//******************************************************************************
2733BOOL WIN32API ScreenToClient( HWND arg1, LPPOINT arg2)
2734{
2735#ifdef DEBUG
2736 WriteLog("USER32: ScreenToClient\n");
2737#endif
2738 return O32_ScreenToClient(arg1, arg2);
2739}
2740//******************************************************************************
2741//******************************************************************************
2742BOOL WIN32API ScrollDC( HDC arg1, int arg2, int arg3, const RECT * arg4, const RECT * arg5, HRGN arg6, PRECT arg7)
2743{
2744#ifdef DEBUG
2745 WriteLog("USER32: ScrollDC\n");
2746#endif
2747 return O32_ScrollDC(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
2748}
2749//******************************************************************************
2750//******************************************************************************
2751BOOL WIN32API ScrollWindow( HWND arg1, int arg2, int arg3, const RECT * arg4, const RECT * arg5)
2752{
2753#ifdef DEBUG
2754 WriteLog("USER32: ScrollWindow\n");
2755#endif
2756 return O32_ScrollWindow(arg1, arg2, arg3, arg4, arg5);
2757}
2758//******************************************************************************
2759//******************************************************************************
2760BOOL WIN32API ScrollWindowEx( HWND arg1, int arg2, int arg3, const RECT * arg4, const RECT * arg5, HRGN arg6, PRECT arg7, UINT arg8)
2761{
2762#ifdef DEBUG
2763 WriteLog("USER32: ScrollWindowEx\n");
2764#endif
2765 return O32_ScrollWindowEx(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
2766}
2767//******************************************************************************
2768//******************************************************************************
2769LONG WIN32API SendDlgItemMessageW( HWND arg1, int arg2, UINT arg3, WPARAM arg4, LPARAM arg5)
2770{
2771#ifdef DEBUG
2772 WriteLog("USER32: SendDlgItemMessageW\n");
2773#endif
2774 return O32_SendDlgItemMessage(arg1, arg2, arg3, arg4, arg5);
2775}
2776//******************************************************************************
2777//******************************************************************************
2778LRESULT WIN32API SendMessageW( HWND arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
2779{
2780LRESULT rc;
2781
2782#ifdef DEBUG
2783 WriteLog("USER32: SendMessageW....\n");
2784#endif
2785 rc = O32_SendMessage(arg1, arg2, arg3, arg4);
2786#ifdef DEBUG
2787 WriteLog("USER32: SendMessageW %X %X %X %X returned %d\n", arg1, arg2, arg3, arg4, rc);
2788#endif
2789 return(rc);
2790}
2791//******************************************************************************
2792//******************************************************************************
2793BOOL WIN32API SetCaretBlinkTime( UINT arg1)
2794{
2795#ifdef DEBUG
2796 WriteLog("USER32: SetCaretBlinkTime\n");
2797#endif
2798 return O32_SetCaretBlinkTime(arg1);
2799}
2800//******************************************************************************
2801//******************************************************************************
2802BOOL WIN32API SetCaretPos( int arg1, int arg2)
2803{
2804 dprintf(("USER32: SetCaretPos\n"));
2805 return O32_SetCaretPos(arg1, arg2);
2806}
2807//******************************************************************************
2808//******************************************************************************
2809HANDLE WIN32API SetClipboardData( UINT arg1, HANDLE arg2)
2810{
2811 dprintf(("USER32: SetClipboardData\n"));
2812 return O32_SetClipboardData(arg1, arg2);
2813}
2814//******************************************************************************
2815//******************************************************************************
2816HWND WIN32API SetClipboardViewer( HWND arg1)
2817{
2818 dprintf(("USER32: SetClipboardViewer\n"));
2819 return O32_SetClipboardViewer(arg1);
2820}
2821//******************************************************************************
2822//******************************************************************************
2823BOOL WIN32API SetDlgItemTextW( HWND arg1, int arg2, LPCWSTR arg3)
2824{
2825char *astring = UnicodeToAsciiString((LPWSTR)arg3);
2826BOOL rc;
2827
2828#ifdef DEBUG
2829 WriteLog("USER32: SetDlgItemTextW\n");
2830#endif
2831 // NOTE: This will not work as is (needs UNICODE support)
2832 rc = O32_SetDlgItemText(arg1, arg2, astring);
2833 FreeAsciiString(astring);
2834 return rc;
2835}
2836//******************************************************************************
2837//******************************************************************************
2838BOOL WIN32API SetDoubleClickTime( UINT arg1)
2839{
2840#ifdef DEBUG
2841 WriteLog("USER32: SetDoubleClickTime\n");
2842#endif
2843 return O32_SetDoubleClickTime(arg1);
2844}
2845//******************************************************************************
2846//******************************************************************************
2847HWND WIN32API SetParent( HWND arg1, HWND arg2)
2848{
2849#ifdef DEBUG
2850 WriteLog("USER32: SetParent\n");
2851#endif
2852 return O32_SetParent(arg1, arg2);
2853}
2854//******************************************************************************
2855//******************************************************************************
2856BOOL WIN32API SetPropA( HWND arg1, LPCSTR arg2, HANDLE arg3)
2857{
2858#ifdef DEBUG
2859 if((int)arg2 >> 16 != 0)
2860 WriteLog("USER32: SetPropA %S\n", arg2);
2861 else WriteLog("USER32: SetPropA %X\n", arg2);
2862#endif
2863 return O32_SetProp(arg1, arg2, arg3);
2864}
2865//******************************************************************************
2866//******************************************************************************
2867BOOL WIN32API SetPropW(HWND arg1, LPCWSTR arg2, HANDLE arg3)
2868{
2869 BOOL rc;
2870 char *astring;
2871
2872 if((int)arg2 >> 16 != 0)
2873 astring = UnicodeToAsciiString((LPWSTR)arg2);
2874 else astring = (char *)arg2;
2875
2876#ifdef DEBUG
2877 if((int)arg2 >> 16 != 0)
2878 WriteLog("USER32: SetPropW %S\n", astring);
2879 else WriteLog("USER32: SetPropW %X\n", astring);
2880#endif
2881 rc = O32_SetProp(arg1, astring, arg3);
2882 if((int)astring >> 16 != 0)
2883 FreeAsciiString(astring);
2884 return(rc);
2885}
2886//******************************************************************************
2887//******************************************************************************
2888BOOL WIN32API SetRectEmpty( PRECT arg1)
2889{
2890#ifdef DEBUG
2891 WriteLog("USER32: SetRectEmpty\n");
2892#endif
2893 return O32_SetRectEmpty(arg1);
2894}
2895//******************************************************************************
2896//******************************************************************************
2897int WIN32API SetScrollPos( HWND arg1, int arg2, int arg3, BOOL arg4)
2898{
2899#ifdef DEBUG
2900 WriteLog("USER32: SetScrollPos\n");
2901#endif
2902 return O32_SetScrollPos(arg1, arg2, arg3, arg4);
2903}
2904//******************************************************************************
2905//******************************************************************************
2906BOOL WIN32API SetScrollRange( HWND arg1, int arg2, int arg3, int arg4, BOOL arg5)
2907{
2908#ifdef DEBUG
2909 WriteLog("USER32: SetScrollRange\n");
2910#endif
2911 return O32_SetScrollRange(arg1, arg2, arg3, arg4, arg5);
2912}
2913//******************************************************************************
2914//******************************************************************************
2915LONG WIN32API SetWindowLongA(HWND hwnd, int nIndex, LONG arg3)
2916{
2917 LONG rc;
2918
2919 dprintf(("USER32: SetWindowLongA %X %d %X\n", hwnd, nIndex, arg3));
2920 if(nIndex == GWL_WNDPROC || nIndex == DWL_DLGPROC) {
2921 Win32WindowProc *wndproc = Win32WindowProc::FindProc(hwnd);
2922 if(wndproc == NULL) {//created with system class and app wants to change the handler
2923 dprintf(("USER32: SetWindowLong new WindowProc for system class\n"));
2924 wndproc = new Win32WindowProc((WNDPROC)arg3);
2925 wndproc->SetWindowHandle(hwnd);
2926 rc = O32_GetWindowLong(hwnd, nIndex);
2927 Win32WindowSubProc *subwndproc = new Win32WindowSubProc(hwnd, (WNDPROC_O32)rc);
2928 O32_SetWindowLong(hwnd, nIndex, (LONG)wndproc->GetOS2Callback());
2929 return((LONG)subwndproc->GetWin32Callback());
2930 }
2931 else {
2932 if(!(nIndex == DWL_DLGPROC && wndproc->IsWindow() == TRUE)) {
2933 rc = (LONG)wndproc->GetWin32Callback();
2934 dprintf(("USER32: SetWindowLong change WindowProc %X to %X\n", rc, arg3));
2935 wndproc->SetWin32Callback((WNDPROC)arg3);
2936 return(rc);
2937 }
2938 //else window that accesses it's normal window data
2939 }
2940 }
2941 return O32_SetWindowLong(hwnd, nIndex, arg3);
2942}
2943//******************************************************************************
2944//TODO: Is this always correct? (GWL_ID: window identifier??)
2945//******************************************************************************
2946LONG WIN32API SetWindowLongW(HWND arg1, int arg2, LONG arg3)
2947{
2948 dprintf(("USER32: SetWindowLongW %X %d %X\n", arg1, arg2, arg3));
2949 return SetWindowLongA(arg1, arg2, arg3);
2950}
2951//******************************************************************************
2952//******************************************************************************
2953BOOL WIN32API SetWindowPlacement( HWND arg1, const WINDOWPLACEMENT * arg2)
2954{
2955 dprintf(("USER32: SetWindowPlacement\n"));
2956 return O32_SetWindowPlacement(arg1, arg2);
2957}
2958//******************************************************************************
2959//******************************************************************************
2960BOOL WIN32API SetWindowTextW( HWND arg1, LPCWSTR arg2)
2961{
2962 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
2963 BOOL rc;
2964
2965 rc = SetWindowTextA(arg1, (LPCSTR)astring);
2966 dprintf(("USER32: SetWindowTextW %X %s returned %d\n", arg1, astring, rc));
2967 FreeAsciiString(astring);
2968 return(rc);
2969}
2970//******************************************************************************
2971//******************************************************************************
2972WORD WIN32API SetWindowWord( HWND arg1, int arg2, WORD arg3)
2973{
2974 dprintf(("USER32: SetWindowWord\n"));
2975 return O32_SetWindowWord(arg1, arg2, arg3);
2976}
2977//******************************************************************************
2978//******************************************************************************
2979BOOL WIN32API ShowCaret( HWND arg1)
2980{
2981 dprintf(("USER32: ShowCaret\n"));
2982 return O32_ShowCaret(arg1);
2983}
2984//******************************************************************************
2985//******************************************************************************
2986BOOL WIN32API ShowOwnedPopups( HWND arg1, BOOL arg2)
2987{
2988 dprintf(("USER32: ShowOwnedPopups\n"));
2989 return O32_ShowOwnedPopups(arg1, arg2);
2990}
2991//******************************************************************************
2992//******************************************************************************
2993BOOL WIN32API ShowScrollBar( HWND arg1, int arg2, BOOL arg3)
2994{
2995#ifdef DEBUG
2996 WriteLog("USER32: ShowScrollBar\n");
2997#endif
2998 return O32_ShowScrollBar(arg1, arg2, arg3);
2999}
3000//******************************************************************************
3001//******************************************************************************
3002BOOL WIN32API SwapMouseButton( BOOL arg1)
3003{
3004#ifdef DEBUG
3005 WriteLog("USER32: SwapMouseButton\n");
3006#endif
3007 return O32_SwapMouseButton(arg1);
3008}
3009//******************************************************************************
3010//******************************************************************************
3011BOOL WIN32API SystemParametersInfoA(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni)
3012{
3013 BOOL rc;
3014 NONCLIENTMETRICSA *cmetric = (NONCLIENTMETRICSA *)pvParam;
3015
3016 switch(uiAction) {
3017 case SPI_SCREENSAVERRUNNING:
3018 *(BOOL *)pvParam = FALSE;
3019 rc = TRUE;
3020 break;
3021 case SPI_GETDRAGFULLWINDOWS:
3022 *(BOOL *)pvParam = FALSE;
3023 rc = TRUE;
3024 break;
3025 case SPI_GETNONCLIENTMETRICS:
3026 memset(cmetric, 0, sizeof(NONCLIENTMETRICSA));
3027 cmetric->cbSize = sizeof(NONCLIENTMETRICSA);
3028 O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfCaptionFont),0);
3029 O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfMenuFont),0);
3030 O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfStatusFont),0);
3031 O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfMessageFont),0);
3032 cmetric->iBorderWidth = GetSystemMetrics(SM_CXBORDER);
3033 cmetric->iScrollWidth = GetSystemMetrics(SM_CXHSCROLL);
3034 cmetric->iScrollHeight = GetSystemMetrics(SM_CYHSCROLL);
3035 cmetric->iCaptionWidth = 32; //TODO
3036 cmetric->iCaptionHeight = 16; //TODO
3037 cmetric->iSmCaptionWidth = GetSystemMetrics(SM_CXSMSIZE);
3038 cmetric->iSmCaptionHeight = GetSystemMetrics(SM_CYSMSIZE);
3039 cmetric->iMenuWidth = 32; //TODO
3040 cmetric->iMenuHeight = GetSystemMetrics(SM_CYMENU);
3041 rc = TRUE;
3042 break;
3043 case 104: //TODO: Undocumented
3044 rc = 16;
3045 break;
3046 default:
3047 rc = O32_SystemParametersInfo(uiAction, uiParam, pvParam, fWinIni);
3048 break;
3049 }
3050#ifdef DEBUG
3051 WriteLog("USER32: SystemParametersInfoA %d, returned %d\n", uiAction, rc);
3052#endif
3053 return(rc);
3054}
3055//******************************************************************************
3056//TODO: Check for more options that have different structs for Unicode!!!!
3057//******************************************************************************
3058BOOL WIN32API SystemParametersInfoW(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni)
3059{
3060 BOOL rc;
3061 NONCLIENTMETRICSW *clientMetricsW = (NONCLIENTMETRICSW *)pvParam;
3062 NONCLIENTMETRICSA clientMetricsA = {0};
3063 PVOID pvParamA;
3064 UINT uiParamA;
3065
3066 switch(uiAction) {
3067 case SPI_SETNONCLIENTMETRICS:
3068 clientMetricsA.cbSize = sizeof(NONCLIENTMETRICSA);
3069 clientMetricsA.iBorderWidth = clientMetricsW->iBorderWidth;
3070 clientMetricsA.iScrollWidth = clientMetricsW->iScrollWidth;
3071 clientMetricsA.iScrollHeight = clientMetricsW->iScrollHeight;
3072 clientMetricsA.iCaptionWidth = clientMetricsW->iCaptionWidth;
3073 clientMetricsA.iCaptionHeight = clientMetricsW->iCaptionHeight;
3074 ConvertFontWA(&clientMetricsW->lfCaptionFont, &clientMetricsA.lfCaptionFont);
3075 clientMetricsA.iSmCaptionWidth = clientMetricsW->iSmCaptionWidth;
3076 clientMetricsA.iSmCaptionHeight = clientMetricsW->iSmCaptionHeight;
3077 ConvertFontWA(&clientMetricsW->lfSmCaptionFont, &clientMetricsA.lfSmCaptionFont);
3078 clientMetricsA.iMenuWidth = clientMetricsW->iMenuWidth;
3079 clientMetricsA.iMenuHeight = clientMetricsW->iMenuHeight;
3080 ConvertFontWA(&clientMetricsW->lfMenuFont, &clientMetricsA.lfMenuFont);
3081 ConvertFontWA(&clientMetricsW->lfStatusFont, &clientMetricsA.lfStatusFont);
3082 ConvertFontWA(&clientMetricsW->lfMessageFont, &clientMetricsA.lfMessageFont);
3083 //no break
3084 case SPI_GETNONCLIENTMETRICS:
3085 uiParamA = sizeof(NONCLIENTMETRICSA);
3086 pvParamA = &clientMetricsA;
3087 break;
3088 default:
3089 pvParamA = pvParam;
3090 uiParamA = uiParam;
3091 break;
3092 }
3093 rc = SystemParametersInfoA(uiAction, uiParamA, pvParamA, fWinIni);
3094
3095 switch(uiAction) {
3096 case SPI_GETNONCLIENTMETRICS:
3097 clientMetricsW->cbSize = sizeof(*clientMetricsW);
3098 clientMetricsW->iBorderWidth = clientMetricsA.iBorderWidth;
3099 clientMetricsW->iScrollWidth = clientMetricsA.iScrollWidth;
3100 clientMetricsW->iScrollHeight = clientMetricsA.iScrollHeight;
3101 clientMetricsW->iCaptionWidth = clientMetricsA.iCaptionWidth;
3102 clientMetricsW->iCaptionHeight = clientMetricsA.iCaptionHeight;
3103 ConvertFontAW(&clientMetricsA.lfCaptionFont, &clientMetricsW->lfCaptionFont);
3104
3105 clientMetricsW->iSmCaptionWidth = clientMetricsA.iSmCaptionWidth;
3106 clientMetricsW->iSmCaptionHeight = clientMetricsA.iSmCaptionHeight;
3107 ConvertFontAW(&clientMetricsA.lfSmCaptionFont, &clientMetricsW->lfSmCaptionFont);
3108
3109 clientMetricsW->iMenuWidth = clientMetricsA.iMenuWidth;
3110 clientMetricsW->iMenuHeight = clientMetricsA.iMenuHeight;
3111 ConvertFontAW(&clientMetricsA.lfMenuFont, &clientMetricsW->lfMenuFont);
3112 ConvertFontAW(&clientMetricsA.lfStatusFont, &clientMetricsW->lfStatusFont);
3113 ConvertFontAW(&clientMetricsA.lfMessageFont, &clientMetricsW->lfMessageFont);
3114 break;
3115 }
3116#ifdef DEBUG
3117 WriteLog("USER32: SystemParametersInfoW %d, returned %d\n", uiAction, rc);
3118#endif
3119 return(rc);
3120}
3121//******************************************************************************
3122//******************************************************************************
3123LONG WIN32API TabbedTextOutA( HDC arg1, int arg2, int arg3, LPCSTR arg4, int arg5, int arg6, int * arg7, int arg8)
3124{
3125#ifdef DEBUG
3126 WriteLog("USER32: TabbedTextOutA\n");
3127#endif
3128 return O32_TabbedTextOut(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
3129}
3130//******************************************************************************
3131//******************************************************************************
3132LONG WIN32API TabbedTextOutW( HDC arg1, int arg2, int arg3, LPCWSTR arg4, int arg5, int arg6, int * arg7, int arg8)
3133{
3134 char *astring = UnicodeToAsciiString((LPWSTR)arg4);
3135 LONG rc;
3136
3137#ifdef DEBUG
3138 WriteLog("USER32: TabbedTextOutW\n");
3139#endif
3140 rc = O32_TabbedTextOut(arg1, arg2, arg3, astring, arg5, arg6, arg7, arg8);
3141 FreeAsciiString(astring);
3142 return rc;
3143}
3144//******************************************************************************
3145//******************************************************************************
3146int WIN32API TranslateAccelerator( HWND arg1, HACCEL arg2, LPMSG arg3)
3147{
3148#ifdef DEBUG
3149 WriteLog("USER32: TranslateAccelerator\n");
3150#endif
3151 return O32_TranslateAccelerator(arg1, arg2, arg3);
3152}
3153//******************************************************************************
3154//******************************************************************************
3155int WIN32API TranslateAcceleratorW( HWND arg1, HACCEL arg2, LPMSG arg3)
3156{
3157#ifdef DEBUG
3158 WriteLog("USER32: TranslateAcceleratorW\n");
3159#endif
3160 // NOTE: This will not work as is (needs UNICODE support)
3161 return O32_TranslateAccelerator(arg1, arg2, arg3);
3162}
3163//******************************************************************************
3164//******************************************************************************
3165BOOL WIN32API TranslateMDISysAccel( HWND arg1, LPMSG arg2)
3166{
3167#ifdef DEBUG
3168//// WriteLog("USER32: TranslateMDISysAccel\n");
3169#endif
3170 return O32_TranslateMDISysAccel(arg1, arg2);
3171}
3172//******************************************************************************
3173//******************************************************************************
3174BOOL WIN32API UnionRect( PRECT arg1, const RECT * arg2, const RECT * arg3)
3175{
3176#ifdef DEBUG
3177 WriteLog("USER32: UnionRect\n");
3178#endif
3179 return O32_UnionRect(arg1, arg2, arg3);
3180}
3181//******************************************************************************
3182//******************************************************************************
3183BOOL WIN32API ValidateRect( HWND arg1, const RECT * arg2)
3184{
3185#ifdef DEBUG
3186 WriteLog("USER32: ValidateRect\n");
3187#endif
3188 return O32_ValidateRect(arg1, arg2);
3189}
3190//******************************************************************************
3191//******************************************************************************
3192BOOL WIN32API ValidateRgn( HWND arg1, HRGN arg2)
3193{
3194#ifdef DEBUG
3195 WriteLog("USER32: ValidateRgn\n");
3196#endif
3197 return O32_ValidateRgn(arg1, arg2);
3198}
3199//******************************************************************************
3200//******************************************************************************
3201WORD WIN32API VkKeyScanW( WCHAR arg1)
3202{
3203#ifdef DEBUG
3204 WriteLog("USER32: VkKeyScanW\n");
3205#endif
3206 // NOTE: This will not work as is (needs UNICODE support)
3207 return O32_VkKeyScan((char)arg1);
3208}
3209//******************************************************************************
3210//******************************************************************************
3211BOOL WIN32API WaitMessage(void)
3212{
3213#ifdef DEBUG
3214 WriteLog("USER32: WaitMessage\n");
3215#endif
3216 return O32_WaitMessage();
3217}
3218//******************************************************************************
3219//******************************************************************************
3220BOOL WIN32API WinHelpW( HWND arg1, LPCWSTR arg2, UINT arg3, DWORD arg4)
3221{
3222 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
3223 BOOL rc;
3224
3225#ifdef DEBUG
3226 WriteLog("USER32: WinHelpW\n");
3227#endif
3228 rc = WinHelpA(arg1, astring, arg3, arg4);
3229 FreeAsciiString(astring);
3230 return rc;
3231}
3232//******************************************************************************
3233//******************************************************************************
3234HWND WIN32API WindowFromDC( HDC arg1)
3235{
3236#ifdef DEBUG
3237 WriteLog("USER32: WindowFromDC\n");
3238#endif
3239 return O32_WindowFromDC(arg1);
3240}
3241//******************************************************************************
3242//******************************************************************************
3243HWND WIN32API WindowFromPoint( POINT arg1)
3244{
3245#ifdef DEBUG
3246 WriteLog("USER32: WindowFromPoint\n");
3247#endif
3248 return O32_WindowFromPoint(arg1);
3249}
3250//******************************************************************************
3251//******************************************************************************
3252int WIN32API wvsprintfA( LPSTR arg1, LPCSTR arg2, va_list arg3)
3253{
3254#ifdef DEBUG
3255 WriteLog("USER32: wvsprintfA\n");
3256#endif
3257 return O32_wvsprintf(arg1, arg2, (LPCVOID *)arg3);
3258}
3259//******************************************************************************
3260//******************************************************************************
3261int WIN32API wvsprintfW(LPWSTR lpOut, LPCWSTR lpFmt, va_list argptr)
3262{
3263 int rc;
3264 char szOut[256];
3265 char *lpFmtA;
3266
3267 lpFmtA = UnicodeToAsciiString((LPWSTR)lpFmt);
3268#ifdef DEBUG
3269 WriteLog("USER32: wvsprintfW, DOES NOT HANDLE UNICODE STRINGS!\n");
3270 WriteLog("USER32: %s\n", lpFmt);
3271#endif
3272 rc = O32_wvsprintf(szOut, lpFmtA, (LPCVOID)argptr);
3273
3274 AsciiToUnicode(szOut, lpOut);
3275#ifdef DEBUG
3276 WriteLog("USER32: %s\n", lpOut);
3277#endif
3278 FreeAsciiString(lpFmtA);
3279 return(rc);
3280}
3281//******************************************************************************
3282//No need to support this
3283//******************************************************************************
3284BOOL WIN32API SetMessageQueue(int cMessagesMax)
3285{
3286#ifdef DEBUG
3287 WriteLog("USER32: SetMessageQueue\n");
3288#endif
3289 return(TRUE);
3290}
3291//******************************************************************************
3292//TODO: Not complete
3293//******************************************************************************
3294BOOL WIN32API GetScrollInfo(HWND hwnd, int fnBar, LPSCROLLINFO lpsi)
3295{
3296#ifdef DEBUG
3297 WriteLog("USER32: GetScrollInfo\n");
3298#endif
3299 if(lpsi == NULL)
3300 return(FALSE);
3301
3302 if(lpsi->fMask & SIF_POS)
3303 lpsi->nPos = GetScrollPos(hwnd, fnBar);
3304 if(lpsi->fMask & SIF_RANGE)
3305 GetScrollRange(hwnd, fnBar, &lpsi->nMin, &lpsi->nMax);
3306 if(lpsi->fMask & SIF_PAGE) {
3307#ifdef DEBUG
3308 WriteLog("USER32: GetScrollInfo, page info not implemented\n");
3309#endif
3310 lpsi->nPage = 25;
3311 }
3312 return(TRUE);
3313}
3314//******************************************************************************
3315//TODO: Not complete
3316//******************************************************************************
3317INT WIN32API SetScrollInfo(HWND hwnd, INT fnBar, const SCROLLINFO *lpsi, BOOL fRedraw)
3318{
3319 int smin, smax;
3320
3321#ifdef DEBUG
3322 WriteLog("USER32: SetScrollInfo\n");
3323#endif
3324 if(lpsi == NULL)
3325 return(FALSE);
3326
3327 if(lpsi->fMask & SIF_POS)
3328 SetScrollPos(hwnd, fnBar, lpsi->nPos, fRedraw);
3329 if(lpsi->fMask & SIF_RANGE)
3330 SetScrollRange(hwnd, fnBar, lpsi->nMin, lpsi->nMax, fRedraw);
3331 if(lpsi->fMask & SIF_PAGE) {
3332#ifdef DEBUG
3333 WriteLog("USER32: GetScrollInfo, page info not implemented\n");
3334#endif
3335 }
3336 if(lpsi->fMask & SIF_DISABLENOSCROLL) {
3337#ifdef DEBUG
3338 WriteLog("USER32: GetScrollInfo, disable scrollbar not yet implemented\n");
3339#endif
3340 }
3341 return(TRUE);
3342}
3343//******************************************************************************
3344//******************************************************************************
3345BOOL WIN32API GrayStringA(HDC hdc, HBRUSH hBrush, GRAYSTRINGPROC lpOutputFunc,
3346 LPARAM lpData, int nCount, int X, int Y, int nWidth,
3347 int nHeight)
3348{
3349 BOOL rc;
3350 COLORREF curclr;
3351
3352#ifdef DEBUG
3353 WriteLog("USER32: GrayStringA, not completely implemented\n");
3354#endif
3355 if(lpOutputFunc == NULL && lpData == NULL) {
3356#ifdef DEBUG
3357 WriteLog("USER32: lpOutputFunc == NULL && lpData == NULL\n");
3358#endif
3359 return(FALSE);
3360 }
3361 if(lpOutputFunc) {
3362 return(lpOutputFunc(hdc, lpData, nCount));
3363 }
3364 curclr = SetTextColor(hdc, GetSysColor(COLOR_GRAYTEXT));
3365 rc = TextOutA(hdc, X, Y, (char *)lpData, nCount);
3366 SetTextColor(hdc, curclr);
3367
3368 return(rc);
3369}
3370//******************************************************************************
3371//******************************************************************************
3372BOOL WIN32API GrayStringW(HDC hdc, HBRUSH hBrush, GRAYSTRINGPROC lpOutputFunc,
3373 LPARAM lpData, int nCount, int X, int Y, int nWidth,
3374 int nHeight)
3375{
3376 BOOL rc;
3377 char *astring;
3378 COLORREF curclr;
3379
3380#ifdef DEBUG
3381 WriteLog("USER32: GrayStringW, not completely implemented\n");
3382#endif
3383
3384 if(lpOutputFunc == NULL && lpData == NULL) {
3385#ifdef DEBUG
3386 WriteLog("USER32: lpOutputFunc == NULL && lpData == NULL\n");
3387#endif
3388 return(FALSE);
3389 }
3390 if(nCount == 0)
3391 nCount = UniStrlen((UniChar*)lpData);
3392
3393 if(lpOutputFunc) {
3394 return(lpOutputFunc(hdc, lpData, nCount));
3395 }
3396 astring = UnicodeToAsciiString((LPWSTR)lpData);
3397
3398 curclr = SetTextColor(hdc, GetSysColor(COLOR_GRAYTEXT));
3399 rc = TextOutA(hdc, X, Y, astring, nCount);
3400 SetTextColor(hdc, curclr);
3401
3402 FreeAsciiString(astring);
3403 return(rc);
3404}
3405//******************************************************************************
3406//TODO:
3407//******************************************************************************
3408int WIN32API CopyAcceleratorTableA(HACCEL hAccelSrc, LPACCEL lpAccelDest,
3409 int cAccelEntries)
3410{
3411#ifdef DEBUG
3412 WriteLog("USER32: CopyAcceleratorTableA, not implemented\n");
3413#endif
3414 return(0);
3415}
3416//******************************************************************************
3417//TODO:
3418//******************************************************************************
3419int WIN32API CopyAcceleratorTableW(HACCEL hAccelSrc, LPACCEL lpAccelDest,
3420 int cAccelEntries)
3421{
3422#ifdef DEBUG
3423 WriteLog("USER32: CopyAcceleratorTableW, not implemented\n");
3424#endif
3425 return(0);
3426}
3427//******************************************************************************
3428//******************************************************************************
3429LRESULT WIN32API SendMessageTimeoutA(HWND hwnd, UINT Msg, WPARAM wParam,
3430 LPARAM lParam, UINT fuFlags, UINT uTimeOut,
3431 LPDWORD lpdwResult)
3432{
3433#ifdef DEBUG
3434 WriteLog("USER32: SendMessageTimeoutA, partially implemented\n");
3435#endif
3436 //ignore fuFlags & wTimeOut
3437 *lpdwResult = SendMessageA(hwnd, Msg, wParam, lParam);
3438 return(TRUE);
3439}
3440//******************************************************************************
3441//******************************************************************************
3442LRESULT WIN32API SendMessageTimeoutW(HWND hwnd, UINT Msg, WPARAM wParam,
3443 LPARAM lParam, UINT fuFlags, UINT uTimeOut,
3444 LPDWORD lpdwResult)
3445{
3446#ifdef DEBUG
3447 WriteLog("USER32: SendMessageTimeoutW, partially implemented\n");
3448#endif
3449 return(SendMessageTimeoutA(hwnd, Msg, wParam, lParam, fuFlags, uTimeOut, lpdwResult));
3450}
3451//******************************************************************************
3452//******************************************************************************
3453HANDLE WIN32API CopyImage(HANDLE hImage, UINT uType, int cxDesired, int cyDesired, UINT fuFlags)
3454{
3455#ifdef DEBUG
3456 WriteLog("USER32: CopyImage, not implemented\n");
3457#endif
3458 switch(uType) {
3459 case IMAGE_BITMAP:
3460 case IMAGE_CURSOR:
3461 case IMAGE_ICON:
3462 default:
3463#ifdef DEBUG
3464 WriteLog("USER32: CopyImage, unknown type\n");
3465#endif
3466 return(NULL);
3467 }
3468 return(NULL);
3469}
3470//******************************************************************************
3471//******************************************************************************
3472BOOL WIN32API GetKeyboardState(PBYTE lpKeyState)
3473{
3474#ifdef DEBUG
3475 WriteLog("USER32: GetKeyboardState, not properly implemented\n");
3476#endif
3477 memset(lpKeyState, 0, 256);
3478 return(TRUE);
3479}
3480//******************************************************************************
3481//******************************************************************************
3482BOOL WIN32API SetKeyboardState(PBYTE lpKeyState)
3483{
3484#ifdef DEBUG
3485 WriteLog("USER32: SetKeyboardState, not implemented\n");
3486#endif
3487 return(TRUE);
3488}
3489//******************************************************************************
3490//******************************************************************************
3491BOOL WIN32API DrawFrameControl(HDC hdc, LPRECT lprc, UINT uType, UINT uState)
3492{
3493#ifdef DEBUG
3494 WriteLog("USER32: DrawFrameControl, not implemented\n");
3495#endif
3496 return(TRUE);
3497}
3498//******************************************************************************
3499//******************************************************************************
3500BOOL WIN32API SendNotifyMessageA(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)
3501{
3502#ifdef DEBUG
3503 WriteLog("USER32: SendNotifyMessageA, not completely implemented\n");
3504#endif
3505 return(SendMessageA(hwnd, Msg, wParam, lParam));
3506}
3507//******************************************************************************
3508//******************************************************************************
3509BOOL WIN32API SendNotifyMessageW(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)
3510{
3511#ifdef DEBUG
3512 WriteLog("USER32: SendNotifyMessageW, not completely implemented\n");
3513#endif
3514 return(SendMessageA(hwnd, Msg, wParam, lParam));
3515}
3516//******************************************************************************
3517//2nd parameter not used according to SDK (yet?)
3518//******************************************************************************
3519VOID WIN32API SetLastErrorEx(DWORD dwErrCode, DWORD dwType)
3520{
3521#ifdef DEBUG
3522 WriteLog("USER32: SetLastErrorEx\n");
3523#endif
3524 SetLastError(dwErrCode);
3525}
3526//******************************************************************************
3527//******************************************************************************
3528LPARAM WIN32API SetMessageExtraInfo(LPARAM lParam)
3529{
3530#ifdef DEBUG
3531 WriteLog("USER32: SetMessageExtraInfo, not implemented\n");
3532#endif
3533 return(0);
3534}
3535//******************************************************************************
3536//******************************************************************************
3537BOOL WIN32API ActivateKeyboardLayout(HKL hkl, UINT fuFlags)
3538{
3539#ifdef DEBUG
3540 WriteLog("USER32: ActivateKeyboardLayout, not implemented\n");
3541#endif
3542 return(TRUE);
3543}
3544//******************************************************************************
3545//******************************************************************************
3546int WIN32API GetKeyboardLayoutList(int nBuff, HKL *lpList)
3547{
3548#ifdef DEBUG
3549 WriteLog("USER32: GetKeyboardLayoutList, not implemented\n");
3550#endif
3551 return(0);
3552}
3553//******************************************************************************
3554//******************************************************************************
3555HKL WIN32API GetKeyboardLayout(DWORD dwLayout)
3556{
3557#ifdef DEBUG
3558 WriteLog("USER32: GetKeyboardLayout, not implemented\n");
3559#endif
3560 return(0);
3561}
3562//******************************************************************************
3563//******************************************************************************
3564int WIN32API LookupIconIdFromDirectory(PBYTE presbits, BOOL fIcon)
3565{
3566#ifdef DEBUG
3567 WriteLog("USER32: LookupIconIdFromDirectory, not implemented\n");
3568#endif
3569 return(0);
3570}
3571//******************************************************************************
3572//******************************************************************************
3573int WIN32API LookupIconIdFromDirectoryEx(PBYTE presbits, BOOL fIcon,
3574 int cxDesired, int cyDesired,
3575 UINT Flags)
3576{
3577#ifdef DEBUG
3578 WriteLog("USER32: LookupIconIdFromDirectoryEx, not implemented\n");
3579#endif
3580 return(0);
3581}
3582//******************************************************************************
3583//DWORD idAttach; /* thread to attach */
3584//DWORD idAttachTo; /* thread to attach to */
3585//BOOL fAttach; /* attach or detach */
3586//******************************************************************************
3587BOOL WIN32API AttachThreadInput(DWORD idAttach, DWORD idAttachTo, BOOL fAttach)
3588{
3589#ifdef DEBUG
3590 WriteLog("USER32: AttachThreadInput, not implemented\n");
3591#endif
3592 return(TRUE);
3593}
3594//******************************************************************************
3595//******************************************************************************
3596BOOL WIN32API RegisterHotKey(HWND hwnd, int idHotKey, UINT fuModifiers, UINT uVirtKey)
3597{
3598#ifdef DEBUG
3599 WriteLog("USER32: RegisterHotKey, not implemented\n");
3600#endif
3601 return(TRUE);
3602}
3603//******************************************************************************
3604//******************************************************************************
3605BOOL WIN32API UnregisterHotKey(HWND hwnd, int idHotKey)
3606{
3607#ifdef DEBUG
3608 WriteLog("USER32: UnregisterHotKey, not implemented\n");
3609#endif
3610 return(TRUE);
3611}
3612//******************************************************************************
3613//******************************************************************************
3614BOOL WIN32API DrawStateA(HDC hdc, HBRUSH hbc, DRAWSTATEPROC lpOutputFunc,
3615 LPARAM lData, WPARAM wData, int x, int y, int cx,
3616 int cy, UINT fuFlags)
3617{
3618#ifdef DEBUG
3619 WriteLog("USER32: DrawStateA, not implemented\n");
3620#endif
3621 return(TRUE);
3622}
3623//******************************************************************************
3624//******************************************************************************
3625//******************************************************************************
3626//******************************************************************************
3627BOOL WIN32API SetWindowContextHelpId(HWND hwnd, DWORD dwContextHelpId)
3628{
3629#ifdef DEBUG
3630 WriteLog("USER32: SetWindowContextHelpId, not implemented\n");
3631#endif
3632 return(TRUE);
3633}
3634//******************************************************************************
3635//******************************************************************************
3636DWORD WIN32API GetWindowContextHelpId(HWND hwnd)
3637{
3638#ifdef DEBUG
3639 WriteLog("USER32: GetWindowContextHelpId, not implemented\n");
3640#endif
3641 return(0);
3642}
3643//******************************************************************************
3644//restores iconized window to previous size/position
3645//******************************************************************************
3646BOOL WIN32API OpenIcon(HWND hwnd)
3647{
3648#ifdef DEBUG
3649 WriteLog("USER32: OpenIcon\n");
3650#endif
3651 if(!IsIconic(hwnd))
3652 return FALSE;
3653 ShowWindow(hwnd, SW_SHOWNORMAL);
3654 return TRUE;
3655}
3656//******************************************************************************
3657//******************************************************************************
3658BOOL WIN32API IsWindowUnicode(HWND hwnd)
3659{
3660#ifdef DEBUG
3661 WriteLog("USER32: IsWindowUnicode, not implemented\n");
3662#endif
3663 return(FALSE);
3664}
3665//******************************************************************************
3666//******************************************************************************
3667BOOL WIN32API GetMonitorInfoA(HMONITOR,LPMONITORINFO)
3668{
3669#ifdef DEBUG
3670 WriteLog("USER32: GetMonitorInfoA not supported!!\n");
3671#endif
3672 return(FALSE);
3673}
3674//******************************************************************************
3675//******************************************************************************
3676BOOL WIN32API GetMonitorInfoW(HMONITOR,LPMONITORINFO)
3677{
3678#ifdef DEBUG
3679 WriteLog("USER32: GetMonitorInfoW not supported!!\n");
3680#endif
3681 return(FALSE);
3682}
3683//******************************************************************************
3684//******************************************************************************
3685HMONITOR WIN32API MonitorFromWindow(HWND hwnd, DWORD dwFlags)
3686{
3687#ifdef DEBUG
3688 WriteLog("USER32: MonitorFromWindow not correctly supported??\n");
3689#endif
3690 return(0);
3691}
3692//******************************************************************************
3693//******************************************************************************
3694HMONITOR WIN32API MonitorFromRect(LPRECT rect, DWORD dwFlags)
3695{
3696#ifdef DEBUG
3697 WriteLog("USER32: MonitorFromRect not correctly supported??\n");
3698#endif
3699 return(0);
3700}
3701//******************************************************************************
3702//******************************************************************************
3703HMONITOR WIN32API MonitorFromPoint(POINT point, DWORD dwflags)
3704{
3705#ifdef DEBUG
3706 WriteLog("USER32: MonitorFromPoint not correctly supported??\n");
3707#endif
3708 return(0);
3709}
3710//******************************************************************************
3711//******************************************************************************
3712BOOL WIN32API EnumDisplayMonitors(HDC,LPRECT,MONITORENUMPROC,LPARAM)
3713{
3714#ifdef DEBUG
3715 WriteLog("USER32: EnumDisplayMonitors not supported??\n");
3716#endif
3717 return(FALSE);
3718}
3719//******************************************************************************
3720//******************************************************************************
3721BOOL WIN32API EnumDisplaySettingsA(LPCSTR lpszDeviceName, DWORD iModeNum,
3722 LPDEVMODEA lpDevMode)
3723{
3724#ifdef DEBUG
3725 WriteLog("USER32: EnumDisplaySettingsA FAKED\n");
3726#endif
3727 switch(iModeNum) {
3728 case 0:
3729 lpDevMode->dmBitsPerPel = 16;
3730 lpDevMode->dmPelsWidth = 768;
3731 lpDevMode->dmPelsHeight = 1024;
3732 lpDevMode->dmDisplayFlags = 0;
3733 lpDevMode->dmDisplayFrequency = 70;
3734 break;
3735 case 1:
3736 lpDevMode->dmBitsPerPel = 16;
3737 lpDevMode->dmPelsWidth = 640;
3738 lpDevMode->dmPelsHeight = 480;
3739 lpDevMode->dmDisplayFlags = 0;
3740 lpDevMode->dmDisplayFrequency = 70;
3741 break;
3742 default:
3743 return(FALSE);
3744 }
3745 return(TRUE);
3746}
3747//******************************************************************************
3748//******************************************************************************
3749LONG WIN32API ChangeDisplaySettingsA(LPDEVMODEA lpDevMode, DWORD dwFlags)
3750{
3751#ifdef DEBUG
3752 if(lpDevMode) {
3753 WriteLog("USER32: ChangeDisplaySettingsA FAKED %X\n", dwFlags);
3754 WriteLog("USER32: ChangeDisplaySettingsA lpDevMode->dmBitsPerPel %d\n", lpDevMode->dmBitsPerPel);
3755 WriteLog("USER32: ChangeDisplaySettingsA lpDevMode->dmPelsWidth %d\n", lpDevMode->dmPelsWidth);
3756 WriteLog("USER32: ChangeDisplaySettingsA lpDevMode->dmPelsHeight %d\n", lpDevMode->dmPelsHeight);
3757 }
3758#endif
3759 return(DISP_CHANGE_SUCCESSFUL);
3760}
3761//******************************************************************************
3762//******************************************************************************
3763
3764
3765/*****************************************************************************
3766 * Name : BOOL WIN32API AnyPopup
3767 * Purpose : The AnyPopup function indicates whether an owned, visible,
3768 * top-level pop-up, or overlapped window exists on the screen. The
3769 * function searches the entire Windows screen, not just the calling
3770 * application's client area.
3771 * Parameters: VOID
3772 * Variables :
3773 * Result : If a pop-up window exists, the return value is TRUE even if the
3774 * pop-up window is completely covered by other windows. Otherwise,
3775 * it is FALSE.
3776 * Remark : AnyPopup is a Windows version 1.x function and is retained for
3777 * compatibility purposes. It is generally not useful.
3778 * Status : UNTESTED STUB
3779 *
3780 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3781 *****************************************************************************/
3782
3783BOOL WIN32API AnyPopup(VOID)
3784{
3785 dprintf(("USER32:AnyPopup() not implemented.\n"));
3786
3787 return (FALSE);
3788}
3789
3790
3791/*****************************************************************************
3792 * Name : long WIN32API BroadcastSystemMessage
3793 * Purpose : The BroadcastSystemMessage function sends a message to the given
3794 * recipients. The recipients can be applications, installable
3795 * drivers, Windows-based network drivers, system-level device
3796 * drivers, or any combination of these system components.
3797 * Parameters: DWORD dwFlags,
3798 LPDWORD lpdwRecipients,
3799 UINT uiMessage,
3800 WPARAM wParam,
3801 LPARAM lParam
3802 * Variables :
3803 * Result : If the function succeeds, the return value is a positive value.
3804 * If the function is unable to broadcast the message, the return value is -1.
3805 * If the dwFlags parameter is BSF_QUERY and at least one recipient returned FALSE to the corresponding message, the return value is zero.
3806 * Remark :
3807 * Status : UNTESTED STUB
3808 *
3809 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3810 *****************************************************************************/
3811
3812long WIN32API BroadcastSystemMessage(DWORD dwFlags,
3813 LPDWORD lpdwRecipients,
3814 UINT uiMessage,
3815 WPARAM wParam,
3816 LPARAM lParam)
3817{
3818 dprintf(("USER32:BroadcastSystemMessage(%08xh,%08xh,%08xh,%08xh,%08x) not implemented.\n",
3819 dwFlags,
3820 lpdwRecipients,
3821 uiMessage,
3822 wParam,
3823 lParam));
3824
3825 return (-1);
3826}
3827
3828
3829/*****************************************************************************
3830 * Name : WORD WIN32API CascadeWindows
3831 * Purpose : The CascadeWindows function cascades the specified windows or
3832 * the child windows of the specified parent window.
3833 * Parameters: HWND hwndParent handle of parent window
3834 * UINT wHow types of windows not to arrange
3835 * CONST RECT * lpRect rectangle to arrange windows in
3836 * UINT cKids number of windows to arrange
3837 * const HWND FAR * lpKids array of window handles
3838 * Variables :
3839 * Result : If the function succeeds, the return value is the number of windows arranged.
3840 * If the function fails, the return value is zero.
3841 * Remark :
3842 * Status : UNTESTED STUB
3843 *
3844 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3845 *****************************************************************************/
3846
3847WORD WIN32API CascadeWindows(HWND hwndParent,
3848 UINT wHow,
3849 CONST LPRECT lpRect,
3850 UINT cKids,
3851 const HWND *lpKids)
3852{
3853 dprintf(("USER32:CascadeWindows(%08xh,%u,%08xh,%u,%08x) not implemented.\n",
3854 hwndParent,
3855 wHow,
3856 lpRect,
3857 cKids,
3858 lpKids));
3859
3860 return (0);
3861}
3862
3863
3864/*****************************************************************************
3865 * Name : LONG WIN32API ChangeDisplaySettingsW
3866 * Purpose : The ChangeDisplaySettings function changes the display settings
3867 * to the specified graphics mode.
3868 * Parameters: LPDEVMODEW lpDevModeW
3869 * DWORD dwFlags
3870 * Variables :
3871 * Result : DISP_CHANGE_SUCCESSFUL The settings change was successful.
3872 * DISP_CHANGE_RESTART The computer must be restarted in order for the graphics mode to work.
3873 * DISP_CHANGE_BADFLAGS An invalid set of flags was passed in.
3874 * DISP_CHANGE_FAILED The display driver failed the specified graphics mode.
3875 * DISP_CHANGE_BADMODE The graphics mode is not supported.
3876 * DISP_CHANGE_NOTUPDATED Unable to write settings to the registry.
3877 * Remark :
3878 * Status : UNTESTED STUB
3879 *
3880 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3881 *****************************************************************************/
3882
3883LONG WIN32API ChangeDisplaySettingsW(LPDEVMODEW lpDevMode,
3884 DWORD dwFlags)
3885{
3886 dprintf(("USER32:ChangeDisplaySettingsW(%08xh,%08x) not implemented.\n",
3887 lpDevMode,
3888 dwFlags));
3889
3890 return (ChangeDisplaySettingsA((LPDEVMODEA)lpDevMode,
3891 dwFlags));
3892}
3893
3894/*****************************************************************************
3895 * Name : BOOL WIN32API CloseDesktop
3896 * Purpose : The CloseDesktop function closes an open handle of a desktop
3897 * object. A desktop is a secure object contained within a window
3898 * station object. A desktop has a logical display surface and
3899 * contains windows, menus and hooks.
3900 * Parameters: HDESK hDesktop
3901 * Variables :
3902 * Result : If the function succeeds, the return value is TRUE.
3903 * If the functions fails, the return value is FALSE. To get
3904 * extended error information, call GetLastError.
3905 * Remark :
3906 * Status : UNTESTED STUB
3907 *
3908 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3909 *****************************************************************************/
3910
3911BOOL WIN32API CloseDesktop(HDESK hDesktop)
3912{
3913 dprintf(("USER32:CloseDesktop(%08x) not implemented.\n",
3914 hDesktop));
3915
3916 return (FALSE);
3917}
3918
3919
3920/*****************************************************************************
3921 * Name : BOOL WIN32API CloseWindowStation
3922 * Purpose : The CloseWindowStation function closes an open window station handle.
3923 * Parameters: HWINSTA hWinSta
3924 * Variables :
3925 * Result :
3926 * Remark : If the function succeeds, the return value is TRUE.
3927 * If the functions fails, the return value is FALSE. To get
3928 * extended error information, call GetLastError.
3929 * Status : UNTESTED STUB
3930 *
3931 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3932 *****************************************************************************/
3933
3934BOOL WIN32API CloseWindowStation(HWINSTA hWinSta)
3935{
3936 dprintf(("USER32:CloseWindowStation(%08x) not implemented.\n",
3937 hWinSta));
3938
3939 return (FALSE);
3940}
3941
3942
3943/*****************************************************************************
3944 * Name : HDESK WIN32API CreateDesktopA
3945 * Purpose : The CreateDesktop function creates a new desktop on the window
3946 * station associated with the calling process.
3947 * Parameters: LPCTSTR lpszDesktop name of the new desktop
3948 * LPCTSTR lpszDevice name of display device to assign to the desktop
3949 * LPDEVMODE pDevMode reserved; must be NULL
3950 * DWORD dwFlags flags to control interaction with other applications
3951 * DWORD dwDesiredAccess specifies access of returned handle
3952 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the desktop
3953 * Variables :
3954 * Result : If the function succeeds, the return value is a handle of the
3955 * newly created desktop.
3956 * If the function fails, the return value is NULL. To get extended
3957 * error information, call GetLastError.
3958 * Remark :
3959 * Status : UNTESTED STUB
3960 *
3961 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3962 *****************************************************************************/
3963
3964HDESK WIN32API CreateDesktopA(LPCTSTR lpszDesktop,
3965 LPCTSTR lpszDevice,
3966 LPDEVMODEA pDevMode,
3967 DWORD dwFlags,
3968 DWORD dwDesiredAccess,
3969 LPSECURITY_ATTRIBUTES lpsa)
3970{
3971 dprintf(("USER32:CreateDesktopA(%s,%s,%08xh,%08xh,%08xh,%08x) not implemented.\n",
3972 lpszDesktop,
3973 lpszDevice,
3974 pDevMode,
3975 dwFlags,
3976 dwDesiredAccess,
3977 lpsa));
3978
3979 return (NULL);
3980}
3981
3982
3983/*****************************************************************************
3984 * Name : HDESK WIN32API CreateDesktopW
3985 * Purpose : The CreateDesktop function creates a new desktop on the window
3986 * station associated with the calling process.
3987 * Parameters: LPCTSTR lpszDesktop name of the new desktop
3988 * LPCTSTR lpszDevice name of display device to assign to the desktop
3989 * LPDEVMODE pDevMode reserved; must be NULL
3990 * DWORD dwFlags flags to control interaction with other applications
3991 * DWORD dwDesiredAccess specifies access of returned handle
3992 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the desktop
3993 * Variables :
3994 * Result : If the function succeeds, the return value is a handle of the
3995 * newly created desktop.
3996 * If the function fails, the return value is NULL. To get extended
3997 * error information, call GetLastError.
3998 * Remark :
3999 * Status : UNTESTED STUB
4000 *
4001 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4002 *****************************************************************************/
4003
4004HDESK WIN32API CreateDesktopW(LPCTSTR lpszDesktop,
4005 LPCTSTR lpszDevice,
4006 LPDEVMODEW pDevMode,
4007 DWORD dwFlags,
4008 DWORD dwDesiredAccess,
4009 LPSECURITY_ATTRIBUTES lpsa)
4010{
4011 dprintf(("USER32:CreateDesktopW(%s,%s,%08xh,%08xh,%08xh,%08x) not implemented.\n",
4012 lpszDesktop,
4013 lpszDevice,
4014 pDevMode,
4015 dwFlags,
4016 dwDesiredAccess,
4017 lpsa));
4018
4019 return (NULL);
4020}
4021
4022
4023/*****************************************************************************
4024 * Name : HWINSTA WIN32API CreateWindowStationA
4025 * Purpose : The CreateWindowStation function creates a window station object.
4026 * It returns a handle that can be used to access the window station.
4027 * A window station is a secure object that contains a set of global
4028 * atoms, a clipboard, and a set of desktop objects.
4029 * Parameters: LPTSTR lpwinsta name of the new window station
4030 * DWORD dwReserved reserved; must be NULL
4031 * DWORD dwDesiredAccess specifies access of returned handle
4032 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the window station
4033 * Variables :
4034 * Result : If the function succeeds, the return value is the handle to the
4035 * newly created window station.
4036 * If the function fails, the return value is NULL. To get extended
4037 * error information, call GetLastError.
4038 * Remark :
4039 * Status : UNTESTED STUB
4040 *
4041 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4042 *****************************************************************************/
4043
4044HWINSTA WIN32API CreateWindowStationA(LPTSTR lpWinSta,
4045 DWORD dwReserved,
4046 DWORD dwDesiredAccess,
4047 LPSECURITY_ATTRIBUTES lpsa)
4048{
4049 dprintf(("USER32:CreateWindowStationA(%s,%08xh,%08xh,%08x) not implemented.\n",
4050 lpWinSta,
4051 dwReserved,
4052 dwDesiredAccess,
4053 lpsa));
4054
4055 return (NULL);
4056}
4057
4058
4059/*****************************************************************************
4060 * Name : HWINSTA WIN32API CreateWindowStationW
4061 * Purpose : The CreateWindowStation function creates a window station object.
4062 * It returns a handle that can be used to access the window station.
4063 * A window station is a secure object that contains a set of global
4064 * atoms, a clipboard, and a set of desktop objects.
4065 * Parameters: LPTSTR lpwinsta name of the new window station
4066 * DWORD dwReserved reserved; must be NULL
4067 * DWORD dwDesiredAccess specifies access of returned handle
4068 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the window station
4069 * Variables :
4070 * Result : If the function succeeds, the return value is the handle to the
4071 * newly created window station.
4072 * If the function fails, the return value is NULL. To get extended
4073 * error information, call GetLastError.
4074 * Remark :
4075 * Status : UNTESTED STUB
4076 *
4077 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4078 *****************************************************************************/
4079
4080HWINSTA WIN32API CreateWindowStationW(LPWSTR lpWinSta,
4081 DWORD dwReserved,
4082 DWORD dwDesiredAccess,
4083 LPSECURITY_ATTRIBUTES lpsa)
4084{
4085 dprintf(("USER32:CreateWindowStationW(%s,%08xh,%08xh,%08x) not implemented.\n",
4086 lpWinSta,
4087 dwReserved,
4088 dwDesiredAccess,
4089 lpsa));
4090
4091 return (NULL);
4092}
4093
4094/*****************************************************************************
4095 * Name : BOOL WIN32API DragDetect
4096 * Purpose : The DragDetect function captures the mouse and tracks its movement
4097 * Parameters: HWND hwnd
4098 * POINT pt
4099 * Variables :
4100 * Result : If the user moved the mouse outside of the drag rectangle while
4101 * holding the left button down, the return value is TRUE.
4102 * If the user did not move the mouse outside of the drag rectangle
4103 * while holding the left button down, the return value is FALSE.
4104 * Remark :
4105 * Status : UNTESTED STUB
4106 *
4107 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4108 *****************************************************************************/
4109
4110BOOL WIN32API DragDetect(HWND hwnd,
4111 POINT pt)
4112{
4113 dprintf(("USER32:DragDetect(%08xh,...) not implemented.\n",
4114 hwnd));
4115
4116 return (FALSE);
4117}
4118
4119
4120/*****************************************************************************
4121 * Name : BOOL WIN32API DrawAnimatedRects
4122 * Purpose : The DrawAnimatedRects function draws a wire-frame rectangle
4123 * and animates it to indicate the opening of an icon or the
4124 * minimizing or maximizing of a window.
4125 * Parameters: HWND hwnd handle of clipping window
4126 * int idAni type of animation
4127 * CONST RECT * lprcFrom address of rectangle coordinates (minimized)
4128 * CONST RECT * lprcTo address of rectangle coordinates (restored)
4129 * Variables :
4130 * Result : If the function succeeds, the return value is TRUE.
4131 * If the function fails, the return value is FALSE.
4132 * Remark :
4133 * Status : UNTESTED STUB
4134 *
4135 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4136 *****************************************************************************/
4137
4138BOOL WIN32API DrawAnimatedRects(HWND hwnd,
4139 int idAni,
4140 CONST RECT *lprcFrom,
4141 CONST RECT *lprcTo)
4142{
4143 dprintf(("USER32:DrawAnimatedRects (%08xh,%u,%08xh,%08x) not implemented.\n",
4144 hwnd,
4145 idAni,
4146 lprcFrom,
4147 lprcTo));
4148
4149 return (TRUE);
4150}
4151
4152
4153/*****************************************************************************
4154 * Name : VOID WIN32API DrawCaption
4155 * Purpose : The DrawCaption function draws a window caption.
4156 * Parameters: HDC hdc handle of device context
4157 * LPRECT lprc address of bounding rectangle coordinates
4158 * HFONT hfont handle of font for caption
4159 * HICON hicon handle of icon in caption
4160 * LPSTR lpszText address of caption string
4161 * WORD wFlags drawing options
4162 * Variables :
4163 * Result :
4164 * Remark :
4165 * Status : UNTESTED STUB
4166 *
4167 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4168 *****************************************************************************/
4169
4170BOOL WIN32API DrawCaption (HWND hwnd,
4171 HDC hdc,
4172 const RECT *lprc,
4173 UINT wFlags)
4174{
4175 dprintf(("USER32:DrawCaption (%08xh,%08xh,%08xh,%08xh) not implemented.\n",
4176 hwnd,
4177 hdc,
4178 lprc,
4179 wFlags));
4180
4181 return FALSE;
4182}
4183
4184
4185/*****************************************************************************
4186 * Name :
4187 * Purpose :
4188 * Parameters:
4189 * Variables :
4190 * Result :
4191 * Remark :
4192 * Status : UNTESTED STUB
4193 *
4194 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4195 *****************************************************************************/
4196
4197BOOL WIN32API DrawStateW(HDC hdc,
4198 HBRUSH hBrush,
4199 DRAWSTATEPROC lpOutputFunc,
4200 LPARAM lParam,
4201 WPARAM wParam,
4202 int x,
4203 int y,
4204 int cx,
4205 int cy,
4206 UINT fuFlags)
4207{
4208 dprintf(("USER32:DrawStateW (%08xh,%08xh,%08xh,%08xh,%08xh,%d,%d,%d,%d,%08x) not implemented.\n",
4209 hdc,
4210 hBrush,
4211 lpOutputFunc,
4212 lParam,
4213 wParam,
4214 x,
4215 y,
4216 cx,
4217 cy,
4218 fuFlags));
4219
4220 return(DrawStateA(hdc,
4221 hBrush,
4222 lpOutputFunc,
4223 lParam,
4224 wParam,
4225 x,
4226 y,
4227 cx,
4228 cy,
4229 fuFlags));
4230}
4231
4232
4233/*****************************************************************************
4234 * Name : BOOL WIN32API EnumDesktopWindows
4235 * Purpose : The EnumDesktopWindows function enumerates all windows in a
4236 * desktop by passing the handle of each window, in turn, to an
4237 * application-defined callback function.
4238 * Parameters: HDESK hDesktop handle of desktop to enumerate
4239 * WNDENUMPROC lpfn points to application's callback function
4240 * LPARAM lParam 32-bit value to pass to the callback function
4241 * Variables :
4242 * Result : If the function succeeds, the return value is TRUE.
4243 * If the function fails, the return value is FALSE. To get
4244 * extended error information, call GetLastError.
4245 * Remark :
4246 * Status : UNTESTED STUB
4247 *
4248 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4249 *****************************************************************************/
4250
4251BOOL WIN32API EnumDesktopWindows(HDESK hDesktop,
4252 WNDENUMPROC lpfn,
4253 LPARAM lParam)
4254{
4255 dprintf(("USER32:EnumDesktopWindows (%08xh,%08xh,%08x) not implemented.\n",
4256 hDesktop,
4257 lpfn,
4258 lParam));
4259
4260 return (FALSE);
4261}
4262
4263
4264/*****************************************************************************
4265 * Name : BOOL WIN32API EnumDesktopsA
4266 * Purpose : The EnumDesktops function enumerates all desktops in the window
4267 * station assigned to the calling process. The function does so by
4268 * passing the name of each desktop, in turn, to an application-
4269 * defined callback function.
4270 * Parameters: HWINSTA hwinsta handle of window station to enumerate
4271 * DESKTOPENUMPROC lpEnumFunc points to application's callback function
4272 * LPARAM lParam 32-bit value to pass to the callback function
4273 * Variables :
4274 * Result : If the function succeeds, the return value is TRUE.
4275 * If the function fails, the return value is FALSE. To get extended
4276 * error information, call GetLastError.
4277 * Remark :
4278 * Status : UNTESTED STUB
4279 *
4280 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4281 *****************************************************************************/
4282
4283BOOL WIN32API EnumDesktopsA(HWINSTA hWinSta,
4284 DESKTOPENUMPROCA lpEnumFunc,
4285 LPARAM lParam)
4286{
4287 dprintf(("USER32:EnumDesktopsA (%08xh,%08xh,%08x) not implemented.\n",
4288 hWinSta,
4289 lpEnumFunc,
4290 lParam));
4291
4292 return (FALSE);
4293}
4294
4295
4296/*****************************************************************************
4297 * Name : BOOL WIN32API EnumDesktopsW
4298 * Purpose : The EnumDesktops function enumerates all desktops in the window
4299 * station assigned to the calling process. The function does so by
4300 * passing the name of each desktop, in turn, to an application-
4301 * defined callback function.
4302 * Parameters: HWINSTA hwinsta handle of window station to enumerate
4303 * DESKTOPENUMPROC lpEnumFunc points to application's callback function
4304 * LPARAM lParam 32-bit value to pass to the callback function
4305 * Variables :
4306 * Result : If the function succeeds, the return value is TRUE.
4307 * If the function fails, the return value is FALSE. To get extended
4308 * error information, call GetLastError.
4309 * Remark :
4310 * Status : UNTESTED STUB
4311 *
4312 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4313 *****************************************************************************/
4314
4315BOOL WIN32API EnumDesktopsW(HWINSTA hWinSta,
4316 DESKTOPENUMPROCW lpEnumFunc,
4317 LPARAM lParam)
4318{
4319 dprintf(("USER32:EnumDesktopsW (%08xh,%08xh,%08x) not implemented.\n",
4320 hWinSta,
4321 lpEnumFunc,
4322 lParam));
4323
4324 return (FALSE);
4325}
4326
4327
4328
4329/*****************************************************************************
4330 * Name : BOOL WIN32API EnumDisplaySettingsW
4331 * Purpose : The EnumDisplaySettings function obtains information about one
4332 * of a display device's graphics modes. You can obtain information
4333 * for all of a display device's graphics modes by making a series
4334 * of calls to this function.
4335 * Parameters: LPCTSTR lpszDeviceName specifies the display device
4336 * DWORD iModeNum specifies the graphics mode
4337 * LPDEVMODE lpDevMode points to structure to receive settings
4338 * Variables :
4339 * Result : If the function succeeds, the return value is TRUE.
4340 * If the function fails, the return value is FALSE.
4341 * Remark :
4342 * Status : UNTESTED STUB
4343 *
4344 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4345 *****************************************************************************/
4346
4347BOOL WIN32API EnumDisplaySettingsW(LPCSTR lpszDeviceName,
4348 DWORD iModeNum,
4349 LPDEVMODEW lpDevMode)
4350{
4351 dprintf(("USER32:EnumDisplaySettingsW (%s,%08xh,%08x) not implemented.\n",
4352 lpszDeviceName,
4353 iModeNum,
4354 lpDevMode));
4355
4356 return (EnumDisplaySettingsA(lpszDeviceName,
4357 iModeNum,
4358 (LPDEVMODEA)lpDevMode));
4359}
4360
4361
4362/*****************************************************************************
4363 * Name : BOOL WIN32API EnumWindowStationsA
4364 * Purpose : The EnumWindowStations function enumerates all windowstations
4365 * in the system by passing the name of each window station, in
4366 * turn, to an application-defined callback function.
4367 * Parameters:
4368 * Variables : WINSTAENUMPROC lpEnumFunc points to application's callback function
4369 * LPARAM lParam 32-bit value to pass to the callback function
4370 * Result : If the function succeeds, the return value is TRUE.
4371 * If the function fails the return value is FALSE. To get extended
4372 * error information, call GetLastError.
4373 * Remark :
4374 * Status : UNTESTED STUB
4375 *
4376 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4377 *****************************************************************************/
4378
4379BOOL WIN32API EnumWindowStationsA(WINSTAENUMPROCA lpEnumFunc,
4380 LPARAM lParam)
4381{
4382 dprintf(("USER32:EnumWindowStationsA (%08xh,%08x) not implemented.\n",
4383 lpEnumFunc,
4384 lParam));
4385
4386 return (FALSE);
4387}
4388
4389
4390/*****************************************************************************
4391 * Name : BOOL WIN32API EnumWindowStationsW
4392 * Purpose : The EnumWindowStations function enumerates all windowstations
4393 * in the system by passing the name of each window station, in
4394 * turn, to an application-defined callback function.
4395 * Parameters:
4396 * Variables : WINSTAENUMPROC lpEnumFunc points to application's callback function
4397 * LPARAM lParam 32-bit value to pass to the callback function
4398 * Result : If the function succeeds, the return value is TRUE.
4399 * If the function fails the return value is FALSE. To get extended
4400 * error information, call GetLastError.
4401 * Remark :
4402 * Status : UNTESTED STUB
4403 *
4404 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4405 *****************************************************************************/
4406
4407BOOL WIN32API EnumWindowStationsW(WINSTAENUMPROCW lpEnumFunc,
4408 LPARAM lParam)
4409{
4410 dprintf(("USER32:EnumWindowStationsW (%08xh,%08x) not implemented.\n",
4411 lpEnumFunc,
4412 lParam));
4413
4414 return (FALSE);
4415}
4416
4417
4418/*****************************************************************************
4419 * Name : HWND WIN32API FindWindowExW
4420 * Purpose : The FindWindowEx function retrieves the handle of a window whose
4421 * class name and window name match the specified strings. The
4422 * function searches child windows, beginning with the one following
4423 * the given child window.
4424 * Parameters: HWND hwndParent handle of parent window
4425 * HWND hwndChildAfter handle of a child window
4426 * LPCTSTR lpszClass address of class name
4427 * LPCTSTR lpszWindow address of window name
4428 * Variables :
4429 * Result : If the function succeeds, the return value is the handle of the
4430 * window that has the specified class and window names.
4431 * If the function fails, the return value is NULL. To get extended
4432 * error information, call GetLastError.
4433 * Remark :
4434 * Status : UNTESTED STUB
4435 *
4436 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4437 *****************************************************************************/
4438
4439HWND WIN32API FindWindowExW(HWND hwndParent,
4440 HWND hwndChildAfter,
4441 LPCWSTR lpszClass,
4442 LPCWSTR lpszWindow)
4443{
4444 dprintf(("USER32:FindWindowExW (%08xh,%08xh,%s,%s) not implemented.\n",
4445 hwndParent,
4446 hwndChildAfter,
4447 lpszClass,
4448 lpszWindow));
4449
4450 return (NULL);
4451}
4452
4453/*****************************************************************************
4454 * Name : BOOL WIN32API GetInputState
4455 * Purpose : The GetInputState function determines whether there are
4456 * mouse-button or keyboard messages in the calling thread's message queue.
4457 * Parameters:
4458 * Variables :
4459 * Result : If the queue contains one or more new mouse-button or keyboard
4460 * messages, the return value is TRUE.
4461 * If the function fails, the return value is FALSE.
4462 * Remark :
4463 * Status : UNTESTED STUB
4464 *
4465 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4466 *****************************************************************************/
4467
4468BOOL WIN32API GetInputState(VOID)
4469{
4470 dprintf(("USER32:GetInputState () not implemented.\n"));
4471
4472 return (FALSE);
4473}
4474
4475
4476/*****************************************************************************
4477 * Name : UINT WIN32API GetKBCodePage
4478 * Purpose : The GetKBCodePage function is provided for compatibility with
4479 * earlier versions of Windows. In the Win32 application programming
4480 * interface (API) it just calls the GetOEMCP function.
4481 * Parameters:
4482 * Variables :
4483 * Result : If the function succeeds, the return value is an OEM code-page
4484 * identifier, or it is the default identifier if the registry
4485 * value is not readable. For a list of OEM code-page identifiers,
4486 * see GetOEMCP.
4487 * Remark :
4488 * Status : UNTESTED
4489 *
4490 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4491 *****************************************************************************/
4492
4493UINT WIN32API GetKBCodePage(VOID)
4494{
4495 return (GetOEMCP());
4496}
4497
4498
4499/*****************************************************************************
4500 * Name : BOOL WIN32API GetKeyboardLayoutNameA
4501 * Purpose : The GetKeyboardLayoutName function retrieves the name of the
4502 * active keyboard layout.
4503 * Parameters: LPTSTR pwszKLID address of buffer for layout name
4504 * Variables :
4505 * Result : If the function succeeds, the return value is TRUE.
4506 * If the function fails, the return value is FALSE. To get extended
4507 * error information, call GetLastError.
4508 * Remark :
4509 * Status : UNTESTED STUB
4510 *
4511 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4512 *****************************************************************************/
4513
4514BOOL WIN32API GetKeyboardLayoutNameA(LPTSTR pwszKLID)
4515{
4516 dprintf(("USER32:GetKeyboardLayoutNameA (%08x) not implemented.",
4517 pwszKLID));
4518
4519 return(FALSE);
4520}
4521
4522
4523/*****************************************************************************
4524 * Name : BOOL WIN32API GetKeyboardLayoutNameW
4525 * Purpose : The GetKeyboardLayoutName function retrieves the name of the
4526 * active keyboard layout.
4527 * Parameters: LPTSTR pwszKLID address of buffer for layout name
4528 * Variables :
4529 * Result : If the function succeeds, the return value is TRUE.
4530 * If the function fails, the return value is FALSE. To get extended
4531 * error information, call GetLastError.
4532 * Remark :
4533 * Status : UNTESTED STUB
4534 *
4535 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4536 *****************************************************************************/
4537
4538BOOL WIN32API GetKeyboardLayoutNameW(LPWSTR pwszKLID)
4539{
4540 dprintf(("USER32:GetKeyboardLayoutNameW (%08x) not implemented.",
4541 pwszKLID));
4542
4543 return(FALSE);
4544}
4545
4546
4547
4548
4549/*****************************************************************************
4550 * Name : HWINSTA WIN32API GetProcessWindowStation
4551 * Purpose : The GetProcessWindowStation function returns a handle of the
4552 * window station associated with the calling process.
4553 * Parameters:
4554 * Variables :
4555 * Result : If the function succeeds, the return value is a handle of the
4556 * window station associated with the calling process.
4557 * If the function fails, the return value is NULL. This can occur
4558 * if the calling process is not an application written for Windows
4559 * NT. To get extended error information, call GetLastError.
4560 * Remark :
4561 * Status : UNTESTED STUB
4562 *
4563 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4564 *****************************************************************************/
4565
4566HWINSTA WIN32API GetProcessWindowStation(VOID)
4567{
4568 dprintf(("USER32:GetProcessWindowStation () not implemented.\n"));
4569
4570 return (NULL);
4571}
4572
4573
4574
4575/*****************************************************************************
4576 * Name : HDESK WIN32API GetThreadDesktop
4577 * Purpose : The GetThreadDesktop function returns a handle to the desktop
4578 * associated with a specified thread.
4579 * Parameters: DWORD dwThreadId thread identifier
4580 * Variables :
4581 * Result : If the function succeeds, the return value is the handle of the
4582 * desktop associated with the specified thread.
4583 * Remark :
4584 * Status : UNTESTED STUB
4585 *
4586 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4587 *****************************************************************************/
4588
4589HDESK WIN32API GetThreadDesktop(DWORD dwThreadId)
4590{
4591 dprintf(("USER32:GetThreadDesktop (%u) not implemented.\n",
4592 dwThreadId));
4593
4594 return (NULL);
4595}
4596
4597
4598/*****************************************************************************
4599 * Name : BOOL WIN32API GetUserObjectInformationA
4600 * Purpose : The GetUserObjectInformation function returns information about
4601 * a window station or desktop object.
4602 * Parameters: HANDLE hObj handle of object to get information for
4603 * int nIndex type of information to get
4604 * PVOID pvInfo points to buffer that receives the information
4605 * DWORD nLength size, in bytes, of pvInfo buffer
4606 * LPDWORD lpnLengthNeeded receives required size, in bytes, of pvInfo buffer
4607 * Variables :
4608 * Result : If the function succeeds, the return value is TRUE.
4609 * If the function fails, the return value is FALSE. To get extended
4610 * error information, call GetLastError.
4611 * Remark :
4612 * Status : UNTESTED STUB
4613 *
4614 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4615 *****************************************************************************/
4616
4617BOOL WIN32API GetUserObjectInformationA(HANDLE hObj,
4618 int nIndex,
4619 PVOID pvInfo,
4620 DWORD nLength,
4621 LPDWORD lpnLengthNeeded)
4622{
4623 dprintf(("USER32:GetUserObjectInformationA (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
4624 hObj,
4625 nIndex,
4626 pvInfo,
4627 nLength,
4628 lpnLengthNeeded));
4629
4630 return (FALSE);
4631}
4632
4633
4634/*****************************************************************************
4635 * Name : BOOL WIN32API GetUserObjectInformationW
4636 * Purpose : The GetUserObjectInformation function returns information about
4637 * a window station or desktop object.
4638 * Parameters: HANDLE hObj handle of object to get information for
4639 * int nIndex type of information to get
4640 * PVOID pvInfo points to buffer that receives the information
4641 * DWORD nLength size, in bytes, of pvInfo buffer
4642 * LPDWORD lpnLengthNeeded receives required size, in bytes, of pvInfo buffer
4643 * Variables :
4644 * Result : If the function succeeds, the return value is TRUE.
4645 * If the function fails, the return value is FALSE. To get extended
4646 * error information, call GetLastError.
4647 * Remark :
4648 * Status : UNTESTED STUB
4649 *
4650 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4651 *****************************************************************************/
4652
4653BOOL WIN32API GetUserObjectInformationW(HANDLE hObj,
4654 int nIndex,
4655 PVOID pvInfo,
4656 DWORD nLength,
4657 LPDWORD lpnLengthNeeded)
4658{
4659 dprintf(("USER32:GetUserObjectInformationW (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
4660 hObj,
4661 nIndex,
4662 pvInfo,
4663 nLength,
4664 lpnLengthNeeded));
4665
4666 return (FALSE);
4667}
4668
4669
4670/*****************************************************************************
4671 * Name : BOOL WIN32API GetUserObjectSecurity
4672 * Purpose : The GetUserObjectSecurity function retrieves security information
4673 * for the specified user object.
4674 * Parameters: HANDLE hObj handle of user object
4675 * SECURITY_INFORMATION * pSIRequested address of requested security information
4676 * LPSECURITY_DESCRIPTOR pSID address of security descriptor
4677 * DWORD nLength size of buffer for security descriptor
4678 * LPDWORD lpnLengthNeeded address of required size of buffer
4679 * Variables :
4680 * Result : If the function succeeds, the return value is TRUE.
4681 * If the function fails, the return value is FALSE. To get extended
4682 * error information, call GetLastError.
4683 * Remark :
4684 * Status : UNTESTED STUB
4685 *
4686 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4687 *****************************************************************************/
4688
4689BOOL WIN32API GetUserObjectSecurity(HANDLE hObj,
4690 SECURITY_INFORMATION * pSIRequested,
4691 LPSECURITY_DESCRIPTOR pSID,
4692 DWORD nLength,
4693 LPDWORD lpnLengthNeeded)
4694{
4695 dprintf(("USER32:GetUserObjectSecurity (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
4696 hObj,
4697 pSIRequested,
4698 pSID,
4699 nLength,
4700 lpnLengthNeeded));
4701
4702 return (FALSE);
4703}
4704
4705
4706
4707/*****************************************************************************
4708 * Name : int WIN32API GetWindowRgn
4709 * Purpose : The GetWindowRgn function obtains a copy of the window region of a window.
4710 * Parameters: HWND hWnd handle to window whose window region is to be obtained
4711 * HRGN hRgn handle to region that receives a copy of the window region
4712 * Variables :
4713 * Result : NULLREGION, SIMPLEREGION, COMPLEXREGION, ERROR
4714 * Remark :
4715 * Status : UNTESTED STUB
4716 *
4717 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4718 *****************************************************************************/
4719
4720int WIN32API GetWindowRgn (HWND hWnd,
4721 HRGN hRgn)
4722{
4723 dprintf(("USER32:GetWindowRgn (%08xh,%08x) not implemented.\n",
4724 hWnd,
4725 hRgn));
4726
4727 return (NULLREGION);
4728}
4729
4730
4731
4732/*****************************************************************************
4733 * Name : HCURSOR WIN32API LoadCursorFromFileA
4734 * Purpose : The LoadCursorFromFile function creates a cursor based on data
4735 * contained in a file. The file is specified by its name or by a
4736 * system cursor identifier. The function returns a handle to the
4737 * newly created cursor. Files containing cursor data may be in
4738 * either cursor (.CUR) or animated cursor (.ANI) format.
4739 * Parameters: LPCTSTR lpFileName pointer to cursor file, or system cursor id
4740 * Variables :
4741 * Result : If the function is successful, the return value is a handle to
4742 * the new cursor.
4743 * If the function fails, the return value is NULL. To get extended
4744 * error information, call GetLastError. GetLastError may return
4745 * the following
4746 * Remark :
4747 * Status : UNTESTED STUB
4748 *
4749 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4750 *****************************************************************************/
4751
4752HCURSOR WIN32API LoadCursorFromFileA(LPCTSTR lpFileName)
4753{
4754 dprintf(("USER32:LoadCursorFromFileA (%s) not implemented.\n",
4755 lpFileName));
4756
4757 return (NULL);
4758}
4759
4760
4761/*****************************************************************************
4762 * Name : HCURSOR WIN32API LoadCursorFromFileW
4763 * Purpose : The LoadCursorFromFile function creates a cursor based on data
4764 * contained in a file. The file is specified by its name or by a
4765 * system cursor identifier. The function returns a handle to the
4766 * newly created cursor. Files containing cursor data may be in
4767 * either cursor (.CUR) or animated cursor (.ANI) format.
4768 * Parameters: LPCTSTR lpFileName pointer to cursor file, or system cursor id
4769 * Variables :
4770 * Result : If the function is successful, the return value is a handle to
4771 * the new cursor.
4772 * If the function fails, the return value is NULL. To get extended
4773 * error information, call GetLastError. GetLastError may return
4774 * the following
4775 * Remark :
4776 * Status : UNTESTED STUB
4777 *
4778 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4779 *****************************************************************************/
4780
4781HCURSOR WIN32API LoadCursorFromFileW(LPCWSTR lpFileName)
4782{
4783 dprintf(("USER32:LoadCursorFromFileW (%s) not implemented.\n",
4784 lpFileName));
4785
4786 return (NULL);
4787}
4788
4789
4790/*****************************************************************************
4791 * Name : HLK WIN32API LoadKeyboardLayoutA
4792 * Purpose : The LoadKeyboardLayout function loads a new keyboard layout into
4793 * the system. Several keyboard layouts can be loaded at a time, but
4794 * only one per process is active at a time. Loading multiple keyboard
4795 * layouts makes it possible to rapidly switch between layouts.
4796 * Parameters:
4797 * Variables :
4798 * Result : If the function succeeds, the return value is the handle of the
4799 * keyboard layout.
4800 * If the function fails, the return value is NULL. To get extended
4801 * error information, call GetLastError.
4802 * Remark :
4803 * Status : UNTESTED STUB
4804 *
4805 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4806 *****************************************************************************/
4807
4808HKL WIN32API LoadKeyboardLayoutA(LPCTSTR pwszKLID,
4809 UINT Flags)
4810{
4811 dprintf(("USER32:LeadKeyboardLayoutA (%s,%u) not implemented.\n",
4812 pwszKLID,
4813 Flags));
4814
4815 return (NULL);
4816}
4817
4818
4819/*****************************************************************************
4820 * Name : HLK WIN32API LoadKeyboardLayoutW
4821 * Purpose : The LoadKeyboardLayout function loads a new keyboard layout into
4822 * the system. Several keyboard layouts can be loaded at a time, but
4823 * only one per process is active at a time. Loading multiple keyboard
4824 * layouts makes it possible to rapidly switch between layouts.
4825 * Parameters:
4826 * Variables :
4827 * Result : If the function succeeds, the return value is the handle of the
4828 * keyboard layout.
4829 * If the function fails, the return value is NULL. To get extended
4830 * error information, call GetLastError.
4831 * Remark :
4832 * Status : UNTESTED STUB
4833 *
4834 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4835 *****************************************************************************/
4836
4837HKL WIN32API LoadKeyboardLayoutW(LPCWSTR pwszKLID,
4838 UINT Flags)
4839{
4840 dprintf(("USER32:LeadKeyboardLayoutW (%s,%u) not implemented.\n",
4841 pwszKLID,
4842 Flags));
4843
4844 return (NULL);
4845}
4846
4847
4848/*****************************************************************************
4849 * Name : UINT WIN32API MapVirtualKeyExA
4850 * Purpose : The MapVirtualKeyEx function translates (maps) a virtual-key
4851 * code into a scan code or character value, or translates a scan
4852 * code into a virtual-key code. The function translates the codes
4853 * using the input language and physical keyboard layout identified
4854 * by the given keyboard layout handle.
4855 * Parameters:
4856 * Variables :
4857 * Result : The return value is either a scan code, a virtual-key code, or
4858 * a character value, depending on the value of uCode and uMapType.
4859 * If there is no translation, the return value is zero.
4860 * Remark :
4861 * Status : UNTESTED STUB
4862 *
4863 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4864 *****************************************************************************/
4865
4866UINT WIN32API MapVirtualKeyExA(UINT uCode,
4867 UINT uMapType,
4868 HKL dwhkl)
4869{
4870 dprintf(("USER32:MapVirtualKeyExA (%u,%u,%08x) not implemented.\n",
4871 uCode,
4872 uMapType,
4873 dwhkl));
4874
4875 return (0);
4876}
4877
4878
4879/*****************************************************************************
4880 * Name : UINT WIN32API MapVirtualKeyExW
4881 * Purpose : The MapVirtualKeyEx function translates (maps) a virtual-key
4882 * code into a scan code or character value, or translates a scan
4883 * code into a virtual-key code. The function translates the codes
4884 * using the input language and physical keyboard layout identified
4885 * by the given keyboard layout handle.
4886 * Parameters:
4887 * Variables :
4888 * Result : The return value is either a scan code, a virtual-key code, or
4889 * a character value, depending on the value of uCode and uMapType.
4890 * If there is no translation, the return value is zero.
4891 * Remark :
4892 * Status : UNTESTED STUB
4893 *
4894 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4895 *****************************************************************************/
4896
4897UINT WIN32API MapVirtualKeyExW(UINT uCode,
4898 UINT uMapType,
4899 HKL dwhkl)
4900{
4901 dprintf(("USER32:MapVirtualKeyExW (%u,%u,%08x) not implemented.\n",
4902 uCode,
4903 uMapType,
4904 dwhkl));
4905
4906 return (0);
4907}
4908
4909
4910/*****************************************************************************
4911 * Name : int WIN32API MessageBoxExA
4912 * Purpose : The MessageBoxEx function creates, displays, and operates a message box.
4913 * Parameters: HWND hWnd handle of owner window
4914 * LPCTSTR lpText address of text in message box
4915 * LPCTSTR lpCaption address of title of message box
4916 * UINT uType style of message box
4917 * WORD wLanguageId language identifier
4918 * Variables :
4919 * Result : If the function succeeds, the return value is a nonzero menu-item
4920 * value returned by the dialog box.
4921 * Remark :
4922 * Status : UNTESTED STUB
4923 *
4924 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4925 *****************************************************************************/
4926
4927int WIN32API MessageBoxExA(HWND hWnd,
4928 LPCTSTR lpText,
4929 LPCTSTR lpCaption,
4930 UINT uType,
4931 WORD wLanguageId)
4932{
4933 dprintf(("USER32:MessageBoxExA (%08xh,%s,%s,%u,%08w) not implemented.\n",
4934 hWnd,
4935 lpText,
4936 lpCaption,
4937 uType,
4938 wLanguageId));
4939
4940 return (MessageBoxA(hWnd,
4941 lpText,
4942 lpCaption,
4943 uType));
4944}
4945
4946
4947/*****************************************************************************
4948 * Name : int WIN32API MessageBoxExW
4949 * Purpose : The MessageBoxEx function creates, displays, and operates a message box.
4950 * Parameters: HWND hWnd handle of owner window
4951 * LPCTSTR lpText address of text in message box
4952 * LPCTSTR lpCaption address of title of message box
4953 * UINT uType style of message box
4954 * WORD wLanguageId language identifier
4955 * Variables :
4956 * Result : If the function succeeds, the return value is a nonzero menu-item
4957 * value returned by the dialog box.
4958 * Remark :
4959 * Status : UNTESTED STUB
4960 *
4961 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4962 *****************************************************************************/
4963
4964int WIN32API MessageBoxExW(HWND hWnd,
4965 LPCWSTR lpText,
4966 LPCWSTR lpCaption,
4967 UINT uType,
4968 WORD wLanguageId)
4969{
4970
4971 dprintf(("USER32:MessageBoxExW (%08xh,%x,%x,%u,%08w) not implemented.\n",
4972 hWnd,
4973 lpText,
4974 lpCaption,
4975 uType,
4976 wLanguageId));
4977
4978 return MessageBoxW(hWnd, lpText, lpCaption, uType);
4979}
4980
4981
4982/*****************************************************************************
4983 * Name : BOOL WIN32API MessageBoxIndirectW
4984 * Purpose : The MessageBoxIndirect function creates, displays, and operates
4985 * a message box. The message box contains application-defined
4986 * message text and title, any icon, and any combination of
4987 * predefined push buttons.
4988 * Parameters:
4989 * Variables :
4990 * Result :
4991 * Remark :
4992 * Status : UNTESTED STUB
4993 *
4994 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4995 *****************************************************************************/
4996
4997BOOL WIN32API MessageBoxIndirectW(LPMSGBOXPARAMSW lpMsgBoxParams)
4998{
4999 dprintf(("USER32:MessageBoxIndirectW (%08x) not implemented.\n",
5000 lpMsgBoxParams));
5001
5002 return (FALSE);
5003}
5004
5005
5006/*****************************************************************************
5007 * Name : BOOL WIN32API MessageBoxIndirectA
5008 * Purpose : The MessageBoxIndirect function creates, displays, and operates
5009 * a message box. The message box contains application-defined
5010 * message text and title, any icon, and any combination of
5011 * predefined push buttons.
5012 * Parameters:
5013 * Variables :
5014 * Result :
5015 * Remark :
5016 * Status : UNTESTED STUB
5017 *
5018 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5019 *****************************************************************************/
5020
5021BOOL WIN32API MessageBoxIndirectA(LPMSGBOXPARAMSA lpMsgBoxParams)
5022{
5023 dprintf(("USER32:MessageBoxIndirectA (%08x) not implemented.\n",
5024 lpMsgBoxParams));
5025
5026 return (FALSE);
5027}
5028
5029
5030/*****************************************************************************
5031 * Name : DWORD WIN32API OemKeyScan
5032 * Purpose : The OemKeyScan function maps OEM ASCII codes 0 through 0x0FF
5033 * into the OEM scan codes and shift states. The function provides
5034 * information that allows a program to send OEM text to another
5035 * program by simulating keyboard input.
5036 * Parameters:
5037 * Variables :
5038 * Result :
5039 * Remark :
5040 * Status : UNTESTED STUB
5041 *
5042 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5043 *****************************************************************************/
5044
5045DWORD WIN32API OemKeyScan(WORD wOemChar)
5046{
5047 dprintf(("USER32:OemKeyScan (%u) not implemented.\n",
5048 wOemChar));
5049
5050 return (wOemChar);
5051}
5052
5053
5054/*****************************************************************************
5055 * Name : HDESK WIN32API OpenDesktopA
5056 * Purpose : The OpenDesktop function returns a handle to an existing desktop.
5057 * A desktop is a secure object contained within a window station
5058 * object. A desktop has a logical display surface and contains
5059 * windows, menus and hooks.
5060 * Parameters: LPCTSTR lpszDesktopName name of the desktop to open
5061 * DWORD dwFlags flags to control interaction with other applications
5062 * BOOL fInherit specifies whether returned handle is inheritable
5063 * DWORD dwDesiredAccess specifies access of returned handle
5064 * Variables :
5065 * Result : If the function succeeds, the return value is the handle to the
5066 * opened desktop.
5067 * If the function fails, the return value is NULL. To get extended
5068 * error information, call GetLastError.
5069 * Remark :
5070 * Status : UNTESTED STUB
5071 *
5072 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5073 *****************************************************************************/
5074
5075HDESK WIN32API OpenDesktopA(LPCTSTR lpszDesktopName,
5076 DWORD dwFlags,
5077 BOOL fInherit,
5078 DWORD dwDesiredAccess)
5079{
5080 dprintf(("USER32:OpenDesktopA (%s,%08xh,%08xh,%08x) not implemented.\n",
5081 lpszDesktopName,
5082 dwFlags,
5083 fInherit,
5084 dwDesiredAccess));
5085
5086 return (NULL);
5087}
5088
5089
5090/*****************************************************************************
5091 * Name : HDESK WIN32API OpenDesktopW
5092 * Purpose : The OpenDesktop function returns a handle to an existing desktop.
5093 * A desktop is a secure object contained within a window station
5094 * object. A desktop has a logical display surface and contains
5095 * windows, menus and hooks.
5096 * Parameters: LPCTSTR lpszDesktopName name of the desktop to open
5097 * DWORD dwFlags flags to control interaction with other applications
5098 * BOOL fInherit specifies whether returned handle is inheritable
5099 * DWORD dwDesiredAccess specifies access of returned handle
5100 * Variables :
5101 * Result : If the function succeeds, the return value is the handle to the
5102 * opened desktop.
5103 * If the function fails, the return value is NULL. To get extended
5104 * error information, call GetLastError.
5105 * Remark :
5106 * Status : UNTESTED STUB
5107 *
5108 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5109 *****************************************************************************/
5110
5111HDESK WIN32API OpenDesktopW(LPCTSTR lpszDesktopName,
5112 DWORD dwFlags,
5113 BOOL fInherit,
5114 DWORD dwDesiredAccess)
5115{
5116 dprintf(("USER32:OpenDesktopW (%s,%08xh,%08xh,%08x) not implemented.\n",
5117 lpszDesktopName,
5118 dwFlags,
5119 fInherit,
5120 dwDesiredAccess));
5121
5122 return (NULL);
5123}
5124
5125
5126/*****************************************************************************
5127 * Name : HDESK WIN32API OpenInputDesktop
5128 * Purpose : The OpenInputDesktop function returns a handle to the desktop
5129 * that receives user input. The input desktop is a desktop on the
5130 * window station associated with the logged-on user.
5131 * Parameters: DWORD dwFlags flags to control interaction with other applications
5132 * BOOL fInherit specifies whether returned handle is inheritable
5133 * DWORD dwDesiredAccess specifies access of returned handle
5134 * Variables :
5135 * Result : If the function succeeds, the return value is a handle of the
5136 * desktop that receives user input.
5137 * If the function fails, the return value is NULL. To get extended
5138 * error information, call GetLastError.
5139 * Remark :
5140 * Status : UNTESTED STUB
5141 *
5142 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5143 *****************************************************************************/
5144
5145HDESK WIN32API OpenInputDesktop(DWORD dwFlags,
5146 BOOL fInherit,
5147 DWORD dwDesiredAccess)
5148{
5149 dprintf(("USER32:OpenInputDesktop (%08xh,%08xh,%08x) not implemented.\n",
5150 dwFlags,
5151 fInherit,
5152 dwDesiredAccess));
5153
5154 return (NULL);
5155}
5156
5157
5158/*****************************************************************************
5159 * Name : HWINSTA WIN32API OpenWindowStationA
5160 * Purpose : The OpenWindowStation function returns a handle to an existing
5161 * window station.
5162 * Parameters: LPCTSTR lpszWinStaName name of the window station to open
5163 * BOOL fInherit specifies whether returned handle is inheritable
5164 * DWORD dwDesiredAccess specifies access of returned handle
5165 * Variables :
5166 * Result : If the function succeeds, the return value is the handle to the
5167 * specified window station.
5168 * If the function fails, the return value is NULL. To get extended
5169 * error information, call GetLastError.
5170 * Remark :
5171 * Status : UNTESTED STUB
5172 *
5173 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5174 *****************************************************************************/
5175
5176HWINSTA WIN32API OpenWindowStationA(LPCTSTR lpszWinStaName,
5177 BOOL fInherit,
5178 DWORD dwDesiredAccess)
5179{
5180 dprintf(("USER32:OpenWindowStatieonA (%s,%08xh,%08x) not implemented.\n",
5181 lpszWinStaName,
5182 fInherit,
5183 dwDesiredAccess));
5184
5185 return (NULL);
5186}
5187
5188
5189/*****************************************************************************
5190 * Name : HWINSTA WIN32API OpenWindowStationW
5191 * Purpose : The OpenWindowStation function returns a handle to an existing
5192 * window station.
5193 * Parameters: LPCTSTR lpszWinStaName name of the window station to open
5194 * BOOL fInherit specifies whether returned handle is inheritable
5195 * DWORD dwDesiredAccess specifies access of returned handle
5196 * Variables :
5197 * Result : If the function succeeds, the return value is the handle to the
5198 * specified window station.
5199 * If the function fails, the return value is NULL. To get extended
5200 * error information, call GetLastError.
5201
5202 * Remark :
5203 * Status : UNTESTED STUB
5204 *
5205 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5206 *****************************************************************************/
5207
5208HWINSTA WIN32API OpenWindowStationW(LPCTSTR lpszWinStaName,
5209 BOOL fInherit,
5210 DWORD dwDesiredAccess)
5211{
5212 dprintf(("USER32:OpenWindowStatieonW (%s,%08xh,%08x) not implemented.\n",
5213 lpszWinStaName,
5214 fInherit,
5215 dwDesiredAccess));
5216
5217 return (NULL);
5218}
5219
5220
5221/*****************************************************************************
5222 * Name : BOOL WIN32API PaintDesktop
5223 * Purpose : The PaintDesktop function fills the clipping region in the
5224 * specified device context with the desktop pattern or wallpaper.
5225 * The function is provided primarily for shell desktops.
5226 * Parameters:
5227 * Variables :
5228 * Result : If the function succeeds, the return value is TRUE.
5229 * If the function fails, the return value is FALSE.
5230 * Remark :
5231 * Status : UNTESTED STUB
5232 *
5233 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5234 *****************************************************************************/
5235
5236BOOL WIN32API PaintDesktop(HDC hdc)
5237{
5238 dprintf(("USER32:PaintDesktop (%08x) not implemented.\n",
5239 hdc));
5240
5241 return (FALSE);
5242}
5243
5244
5245/*****************************************************************************
5246 * Name : BOOL WIN32API SendMessageCallbackA
5247 * Purpose : The SendMessageCallback function sends the specified message to
5248 * a window or windows. The function calls the window procedure for
5249 * the specified window and returns immediately. After the window
5250 * procedure processes the message, the system calls the specified
5251 * callback function, passing the result of the message processing
5252 * and an application-defined value to the callback function.
5253 * Parameters: HWND hwnd handle of destination window
5254 * UINT uMsg message to send
5255 * WPARAM wParam first message parameter
5256 * LPARAM lParam second message parameter
5257 * SENDASYNCPROC lpResultCallBack function to receive message value
5258 * DWORD dwData value to pass to callback function
5259 * Variables :
5260 * Result : If the function succeeds, the return value is TRUE.
5261 * If the function fails, the return value is FALSE. To get extended
5262 * error information, call GetLastError.
5263 * Remark :
5264 * Status : UNTESTED STUB
5265 *
5266 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5267 *****************************************************************************/
5268
5269BOOL WIN32API SendMessageCallbackA(HWND hWnd,
5270 UINT uMsg,
5271 WPARAM wParam,
5272 LPARAM lParam,
5273 SENDASYNCPROC lpResultCallBack,
5274 DWORD dwData)
5275{
5276 dprintf(("USER32:SendMessageCallBackA (%08xh,%08xh,%08xh,%08xh,%08xh,%08x) not implemented.\n",
5277 hWnd,
5278 uMsg,
5279 wParam,
5280 lParam,
5281 lpResultCallBack,
5282 dwData));
5283
5284 return (FALSE);
5285}
5286
5287
5288/*****************************************************************************
5289 * Name : BOOL WIN32API SendMessageCallbackW
5290 * Purpose : The SendMessageCallback function sends the specified message to
5291 * a window or windows. The function calls the window procedure for
5292 * the specified window and returns immediately. After the window
5293 * procedure processes the message, the system calls the specified
5294 * callback function, passing the result of the message processing
5295 * and an application-defined value to the callback function.
5296 * Parameters: HWND hwnd handle of destination window
5297 * UINT uMsg message to send
5298 * WPARAM wParam first message parameter
5299 * LPARAM lParam second message parameter
5300 * SENDASYNCPROC lpResultCallBack function to receive message value
5301 * DWORD dwData value to pass to callback function
5302 * Variables :
5303 * Result : If the function succeeds, the return value is TRUE.
5304 * If the function fails, the return value is FALSE. To get extended
5305 * error information, call GetLastError.
5306 * Remark :
5307 * Status : UNTESTED STUB
5308 *
5309 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5310 *****************************************************************************/
5311
5312BOOL WIN32API SendMessageCallbackW(HWND hWnd,
5313 UINT uMsg,
5314 WPARAM wParam,
5315 LPARAM lParam,
5316 SENDASYNCPROC lpResultCallBack,
5317 DWORD dwData)
5318{
5319 dprintf(("USER32:SendMessageCallBackW (%08xh,%08xh,%08xh,%08xh,%08xh,%08x) not implemented.\n",
5320 hWnd,
5321 uMsg,
5322 wParam,
5323 lParam,
5324 lpResultCallBack,
5325 dwData));
5326
5327 return (FALSE);
5328}
5329
5330
5331/*****************************************************************************
5332 * Name : VOID WIN32API SetDebugErrorLevel
5333 * Purpose : The SetDebugErrorLevel function sets the minimum error level at
5334 * which Windows will generate debugging events and pass them to a debugger.
5335 * Parameters: DWORD dwLevel debugging error level
5336 * Variables :
5337 * Result :
5338 * Remark :
5339 * Status : UNTESTED STUB
5340 *
5341 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5342 *****************************************************************************/
5343
5344VOID WIN32API SetDebugErrorLevel(DWORD dwLevel)
5345{
5346 dprintf(("USER32:SetDebugErrorLevel (%08x) not implemented.\n",
5347 dwLevel));
5348}
5349
5350
5351/*****************************************************************************
5352 * Name : BOOL WIN32API SetProcessWindowStation
5353 * Purpose : The SetProcessWindowStation function assigns a window station
5354 * to the calling process. This enables the process to access
5355 * objects in the window station such as desktops, the clipboard,
5356 * and global atoms. All subsequent operations on the window station
5357 * use the access rights granted to hWinSta.
5358 * Parameters:
5359 * Variables :
5360 * Result : If the function succeeds, the return value is TRUE.
5361 * If the function fails, the return value is FALSE. To get extended
5362 * error information, call GetLastError.
5363 * Remark :
5364 * Status : UNTESTED STUB
5365 *
5366 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5367 *****************************************************************************/
5368
5369BOOL WIN32API SetProcessWindowStation(HWINSTA hWinSta)
5370{
5371 dprintf(("USER32:SetProcessWindowStation (%08x) not implemented.\n",
5372 hWinSta));
5373
5374 return (FALSE);
5375}
5376
5377
5378/*****************************************************************************
5379 * Name : BOOL WIN32API SetSystemCursor
5380 * Purpose : The SetSystemCursor function replaces the contents of the system
5381 * cursor specified by dwCursorId with the contents of the cursor
5382 * specified by hCursor, and then destroys hCursor. This function
5383 * lets an application customize the system cursors.
5384 * Parameters: HCURSOR hCursor set specified system cursor to this cursor's
5385 * contents, then destroy this
5386 * DWORD dwCursorID system cursor specified by its identifier
5387 * Variables :
5388 * Result : If the function succeeds, the return value is TRUE.
5389 * If the function fails, the return value is FALSE. 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
5397BOOL WIN32API SetSystemCursor(HCURSOR hCursor,
5398 DWORD dwCursorId)
5399{
5400 dprintf(("USER32:SetSystemCursor (%08xh,%08x) not implemented.\n",
5401 hCursor,
5402 dwCursorId));
5403
5404 return (FALSE);
5405}
5406
5407
5408/*****************************************************************************
5409 * Name : BOOL WIN32API SetThreadDesktop
5410 * Purpose : The SetThreadDesktop function assigns a desktop to the calling
5411 * thread. All subsequent operations on the desktop use the access
5412 * rights granted to hDesk.
5413 * Parameters: HDESK hDesk handle of the desktop to assign to this thread
5414 * Variables :
5415 * Result : If the function succeeds, the return value is TRUE.
5416 * If the function fails, the return value is FALSE. To get extended
5417 * error information, call GetLastError.
5418 * Remark :
5419 * Status : UNTESTED STUB
5420 *
5421 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5422 *****************************************************************************/
5423
5424BOOL WIN32API SetThreadDesktop(HDESK hDesktop)
5425{
5426 dprintf(("USER32:SetThreadDesktop (%08x) not implemented.\n",
5427 hDesktop));
5428
5429 return (FALSE);
5430}
5431
5432
5433/*****************************************************************************
5434 * Name : BOOL WIN32API SetUserObjectInformationA
5435 * Purpose : The SetUserObjectInformation function sets information about a
5436 * window station or desktop object.
5437 * Parameters: HANDLE hObject handle of the object for which to set information
5438 * int nIndex type of information to set
5439 * PVOID lpvInfo points to a buffer that contains the information
5440 * DWORD cbInfo size, in bytes, of lpvInfo buffer
5441 * Variables :
5442 * Result : If the function succeeds, the return value is TRUE.
5443 * If the function fails the return value is FALSE. To get extended
5444 * error information, call GetLastError.
5445 * Remark :
5446 * Status : UNTESTED STUB
5447 *
5448 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5449 *****************************************************************************/
5450
5451BOOL WIN32API SetUserObjectInformationA(HANDLE hObject,
5452 int nIndex,
5453 PVOID lpvInfo,
5454 DWORD cbInfo)
5455{
5456 dprintf(("USER32:SetUserObjectInformationA (%08xh,%u,%08xh,%08x) not implemented.\n",
5457 hObject,
5458 nIndex,
5459 lpvInfo,
5460 cbInfo));
5461
5462 return (FALSE);
5463}
5464
5465
5466/*****************************************************************************
5467 * Name : BOOL WIN32API SetUserObjectInformationW
5468 * Purpose : The SetUserObjectInformation function sets information about a
5469 * window station or desktop object.
5470 * Parameters: HANDLE hObject handle of the object for which to set information
5471 * int nIndex type of information to set
5472 * PVOID lpvInfo points to a buffer that contains the information
5473 * DWORD cbInfo size, in bytes, of lpvInfo buffer
5474 * Variables :
5475 * Result : If the function succeeds, the return value is TRUE.
5476 * If the function fails the return value is FALSE. To get extended
5477 * error information, call GetLastError.
5478 * Remark :
5479 * Status : UNTESTED STUB
5480 *
5481 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5482 *****************************************************************************/
5483
5484BOOL WIN32API SetUserObjectInformationW(HANDLE hObject,
5485 int nIndex,
5486 PVOID lpvInfo,
5487 DWORD cbInfo)
5488{
5489 dprintf(("USER32:SetUserObjectInformationW (%08xh,%u,%08xh,%08x) not implemented.\n",
5490 hObject,
5491 nIndex,
5492 lpvInfo,
5493 cbInfo));
5494
5495 return (FALSE);
5496}
5497
5498
5499/*****************************************************************************
5500 * Name : BOOL WIN32API SetUserObjectSecurity
5501 * Purpose : The SetUserObjectSecurity function sets the security of a user
5502 * object. This can be, for example, a window or a DDE conversation
5503 * Parameters: HANDLE hObject handle of user object
5504 * SECURITY_INFORMATION * psi address of security information
5505 * LPSECURITY_DESCRIPTOR psd address of security descriptor
5506 * Variables :
5507 * Result : If the function succeeds, the return value is TRUE.
5508 * If the function fails, the return value is FALSE. To get extended
5509 * error information, call GetLastError.
5510 * Remark :
5511 * Status : UNTESTED STUB
5512 *
5513 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5514 *****************************************************************************/
5515
5516BOOL WIN32API SetUserObjectSecurity(HANDLE hObject,
5517 SECURITY_INFORMATION * psi,
5518 LPSECURITY_DESCRIPTOR psd)
5519{
5520 dprintf(("USER32:SetUserObjectSecuroty (%08xh,%08xh,%08x) not implemented.\n",
5521 hObject,
5522 psi,
5523 psd));
5524
5525 return (FALSE);
5526}
5527
5528
5529/*****************************************************************************
5530 * Name : int WIN32API SetWindowRgn
5531 * Purpose : The SetWindowRgn function sets the window region of a window. The
5532 * window region determines the area within the window where the
5533 * operating system permits drawing. The operating system does not
5534 * display any portion of a window that lies outside of the window region
5535 * Parameters: HWND hWnd handle to window whose window region is to be set
5536 * HRGN hRgn handle to region
5537 * BOOL bRedraw window redraw flag
5538 * Variables :
5539 * Result : If the function succeeds, the return value is non-zero.
5540 * If the function fails, the return value is zero.
5541 * Remark :
5542 * Status : UNTESTED STUB
5543 *
5544 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5545 *****************************************************************************/
5546
5547int WIN32API SetWindowRgn(HWND hWnd,
5548 HRGN hRgn,
5549 BOOL bRedraw)
5550{
5551 dprintf(("USER32:SetWindowRgn (%08xh,%08xh,%u) not implemented.\n",
5552 hWnd,
5553 hRgn,
5554 bRedraw));
5555
5556 return (0);
5557}
5558
5559
5560/*****************************************************************************
5561 * Name : BOOL WIN32API SetWindowsHookW
5562 * Purpose : The SetWindowsHook function is not implemented in the Win32 API.
5563 * Win32-based applications should use the SetWindowsHookEx function.
5564 * Parameters:
5565 * Variables :
5566 * Result :
5567 * Remark : ARGH ! MICROSOFT !
5568 * Status : UNTESTED STUB
5569 *
5570 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5571 *****************************************************************************/
5572
5573HHOOK WIN32API SetWindowsHookW(int nFilterType, HOOKPROC pfnFilterProc)
5574
5575{
5576 return (FALSE);
5577}
5578
5579
5580/*****************************************************************************
5581 * Name : BOOL WIN32API ShowWindowAsync
5582 * Purpose : The ShowWindowAsync function sets the show state of a window
5583 * created by a different thread.
5584 * Parameters: HWND hwnd handle of window
5585 * int nCmdShow show state of window
5586 * Variables :
5587 * Result : If the window was previously visible, the return value is TRUE.
5588 * If the window was previously hidden, the return value is FALSE.
5589 * Remark :
5590 * Status : UNTESTED STUB
5591 *
5592 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5593 *****************************************************************************/
5594
5595BOOL WIN32API ShowWindowAsync (HWND hWnd,
5596 int nCmdShow)
5597{
5598 dprintf(("USER32:ShowWindowAsync (%08xh,%08x) not implemented.\n",
5599 hWnd,
5600 nCmdShow));
5601
5602 return (FALSE);
5603}
5604
5605
5606/*****************************************************************************
5607 * Name : BOOL WIN32API SwitchDesktop
5608 * Purpose : The SwitchDesktop function makes a desktop visible and activates
5609 * it. This enables the desktop to receive input from the user. The
5610 * calling process must have DESKTOP_SWITCHDESKTOP access to the
5611 * desktop for the SwitchDesktop function to succeed.
5612 * Parameters:
5613 * Variables :
5614 * Result : If the function succeeds, the return value is TRUE.
5615 * If the function fails, the return value is FALSE. To get extended
5616 * error information, call GetLastError.
5617 * Remark :
5618 * Status : UNTESTED STUB
5619 *
5620 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5621 *****************************************************************************/
5622
5623BOOL WIN32API SwitchDesktop(HDESK hDesktop)
5624{
5625 dprintf(("USER32:SwitchDesktop (%08x) not implemented.\n",
5626 hDesktop));
5627
5628 return (FALSE);
5629}
5630
5631
5632/*****************************************************************************
5633 * Name : WORD WIN32API TileWindows
5634 * Purpose : The TileWindows function tiles the specified windows, or the child
5635 * windows of the specified parent window.
5636 * Parameters: HWND hwndParent handle of parent window
5637 * WORD wFlags types of windows not to arrange
5638 * LPCRECT lpRect rectangle to arrange windows in
5639 * WORD cChildrenb number of windows to arrange
5640 * const HWND *ahwndChildren array of window handles
5641 * Variables :
5642 * Result : If the function succeeds, the return value is the number of
5643 * windows arranged.
5644 * If the function fails, the return value is zero.
5645 * Remark :
5646 * Status : UNTESTED STUB
5647 *
5648 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5649 *****************************************************************************/
5650
5651WORD WIN32API TileWindows(HWND hwndParent,
5652 UINT wFlags,
5653 const LPRECT lpRect,
5654 UINT cChildrenb,
5655 const HWND *ahwndChildren)
5656{
5657 dprintf(("USER32:TileWindows (%08xh,%08xh,%08xh,%08xh,%08x) not implemented.\n",
5658 hwndParent,
5659 wFlags,
5660 lpRect,
5661 cChildrenb,
5662 ahwndChildren));
5663
5664 return (0);
5665}
5666
5667
5668/*****************************************************************************
5669 * Name : int WIN32API ToAscii
5670 * Purpose : The ToAscii function translates the specified virtual-key code
5671 * and keyboard state to the corresponding Windows character or characters.
5672 * Parameters: UINT uVirtKey virtual-key code
5673 * UINT uScanCode scan code
5674 * PBYTE lpbKeyState address of key-state array
5675 * LPWORD lpwTransKey buffer for translated key
5676 * UINT fuState active-menu flag
5677 * Variables :
5678 * Result : 0 The specified virtual key has no translation for the current
5679 * state of the keyboard.
5680 * 1 One Windows character was copied to the buffer.
5681 * 2 Two characters were copied to the buffer. This usually happens
5682 * when a dead-key character (accent or diacritic) stored in the
5683 * keyboard layout cannot be composed with the specified virtual
5684 * key to form a single character.
5685 * Remark :
5686 * Status : UNTESTED STUB
5687 *
5688 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5689 *****************************************************************************/
5690
5691int WIN32API ToAscii(UINT uVirtKey,
5692 UINT uScanCode,
5693 PBYTE lpbKeyState,
5694 LPWORD lpwTransKey,
5695 UINT fuState)
5696{
5697 dprintf(("USER32:ToAscii (%u,%u,%08xh,%08xh,%u) not implemented.\n",
5698 uVirtKey,
5699 uScanCode,
5700 lpbKeyState,
5701 lpwTransKey,
5702 fuState));
5703
5704 return (0);
5705}
5706
5707
5708/*****************************************************************************
5709 * Name : int WIN32API ToAsciiEx
5710 * Purpose : The ToAscii function translates the specified virtual-key code
5711 * and keyboard state to the corresponding Windows character or characters.
5712 * Parameters: UINT uVirtKey virtual-key code
5713 * UINT uScanCode scan code
5714 * PBYTE lpbKeyState address of key-state array
5715 * LPWORD lpwTransKey buffer for translated key
5716 * UINT fuState active-menu flag
5717 * HLK hlk keyboard layout handle
5718 * Variables :
5719 * Result : 0 The specified virtual key has no translation for the current
5720 * state of the keyboard.
5721 * 1 One Windows character was copied to the buffer.
5722 * 2 Two characters were copied to the buffer. This usually happens
5723 * when a dead-key character (accent or diacritic) stored in the
5724 * keyboard layout cannot be composed with the specified virtual
5725 * key to form a single character.
5726 * Remark :
5727 * Status : UNTESTED STUB
5728 *
5729 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5730 *****************************************************************************/
5731
5732int WIN32API ToAsciiEx(UINT uVirtKey,
5733 UINT uScanCode,
5734 PBYTE lpbKeyState,
5735 LPWORD lpwTransKey,
5736 UINT fuState,
5737 HKL hkl)
5738{
5739 dprintf(("USER32:ToAsciiEx (%u,%u,%08xh,%08xh,%u,%08x) not implemented.\n",
5740 uVirtKey,
5741 uScanCode,
5742 lpbKeyState,
5743 lpwTransKey,
5744 fuState,
5745 hkl));
5746
5747 return (0);
5748}
5749
5750
5751/*****************************************************************************
5752 * Name : int WIN32API ToUnicode
5753 * Purpose : The ToUnicode function translates the specified virtual-key code
5754 * and keyboard state to the corresponding Unicode character or characters.
5755 * Parameters: UINT wVirtKey virtual-key code
5756 * UINT wScanCode scan code
5757 * PBYTE lpKeyState address of key-state array
5758 * LPWSTR pwszBuff buffer for translated key
5759 * int cchBuff size of translated key buffer
5760 * UINT wFlags set of function-conditioning flags
5761 * Variables :
5762 * Result : - 1 The specified virtual key is a dead-key character (accent or
5763 * diacritic). This value is returned regardless of the keyboard
5764 * layout, even if several characters have been typed and are
5765 * stored in the keyboard state. If possible, even with Unicode
5766 * keyboard layouts, the function has written a spacing version of
5767 * the dead-key character to the buffer specified by pwszBuffer.
5768 * For example, the function writes the character SPACING ACUTE
5769 * (0x00B4), rather than the character NON_SPACING ACUTE (0x0301).
5770 * 0 The specified virtual key has no translation for the current
5771 * state of the keyboard. Nothing was written to the buffer
5772 * specified by pwszBuffer.
5773 * 1 One character was written to the buffer specified by pwszBuffer.
5774 * 2 or more Two or more characters were written to the buffer specified by
5775 * pwszBuff. The most common cause for this is that a dead-key
5776 * character (accent or diacritic) stored in the keyboard layout
5777 * could not be combined with the specified virtual key to form a
5778 * single character.
5779 * Remark :
5780 * Status : UNTESTED STUB
5781 *
5782 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5783 *****************************************************************************/
5784
5785int WIN32API ToUnicode(UINT uVirtKey,
5786 UINT uScanCode,
5787 PBYTE lpKeyState,
5788 LPWSTR pwszBuff,
5789 int cchBuff,
5790 UINT wFlags)
5791{
5792 dprintf(("USER32:ToUnicode (%u,%u,%08xh,%08xh,%u,%08x) not implemented.\n",
5793 uVirtKey,
5794 uScanCode,
5795 lpKeyState,
5796 pwszBuff,
5797 cchBuff,
5798 wFlags));
5799
5800 return (0);
5801}
5802
5803
5804/*****************************************************************************
5805 * Name : BOOL WIN32API UnloadKeyboardLayout
5806 * Purpose : The UnloadKeyboardLayout function removes a keyboard layout.
5807 * Parameters: HKL hkl handle of keyboard layout
5808 * Variables :
5809 * Result : If the function succeeds, the return value is the handle of the
5810 * keyboard layout; otherwise, it is NULL. To get extended error
5811 * information, use the GetLastError function.
5812 * Remark :
5813 * Status : UNTESTED STUB
5814 *
5815 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5816 *****************************************************************************/
5817
5818BOOL WIN32API UnloadKeyboardLayout (HKL hkl)
5819{
5820 dprintf(("USER32:UnloadKeyboardLayout (%08x) not implemented.\n",
5821 hkl));
5822
5823 return (0);
5824}
5825
5826
5827/*****************************************************************************
5828 * Name : SHORT WIN32API VkKeyScanExW
5829 * Purpose : The VkKeyScanEx function translates a character to the
5830 * corresponding virtual-key code and shift state. The function
5831 * translates the character using the input language and physical
5832 * keyboard layout identified by the given keyboard layout handle.
5833 * Parameters: UINT uChar character to translate
5834 * HKL hkl keyboard layout handle
5835 * Variables :
5836 * Result : see docs
5837 * Remark :
5838 * Status : UNTESTED STUB
5839 *
5840 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5841 *****************************************************************************/
5842
5843WORD WIN32API VkKeyScanExW(WCHAR uChar,
5844 HKL hkl)
5845{
5846 dprintf(("USER32:VkKeyScanExW (%u,%08x) not implemented.\n",
5847 uChar,
5848 hkl));
5849
5850 return (uChar);
5851}
5852
5853
5854/*****************************************************************************
5855 * Name : SHORT WIN32API VkKeyScanExA
5856 * Purpose : The VkKeyScanEx function translates a character to the
5857 * corresponding virtual-key code and shift state. The function
5858 * translates the character using the input language and physical
5859 * keyboard layout identified by the given keyboard layout handle.
5860 * Parameters: UINT uChar character to translate
5861 * HKL hkl keyboard layout handle
5862 * Variables :
5863 * Result : see docs
5864 * Remark :
5865 * Status : UNTESTED STUB
5866 *
5867 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5868 *****************************************************************************/
5869
5870WORD WIN32API VkKeyScanExA(CHAR uChar,
5871 HKL hkl)
5872{
5873 dprintf(("USER32:VkKeyScanExA (%u,%08x) not implemented.\n",
5874 uChar,
5875 hkl));
5876
5877 return (uChar);
5878}
5879
5880
5881/*****************************************************************************
5882 * Name : VOID WIN32API keybd_event
5883 * Purpose : The keybd_event function synthesizes a keystroke. The system
5884 * can use such a synthesized keystroke to generate a WM_KEYUP or
5885 * WM_KEYDOWN message. The keyboard driver's interrupt handler calls
5886 * the keybd_event function.
5887 * Parameters: BYTE bVk virtual-key code
5888
5889 * BYTE bScan hardware scan code
5890 * DWORD dwFlags flags specifying various function options
5891 * DWORD dwExtraInfo additional data associated with keystroke
5892 * Variables :
5893 * Result :
5894 * Remark :
5895 * Status : UNTESTED STUB
5896 *
5897 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5898 *****************************************************************************/
5899
5900VOID WIN32API keybd_event (BYTE bVk,
5901 BYTE bScan,
5902 DWORD dwFlags,
5903 DWORD dwExtraInfo)
5904{
5905 dprintf(("USER32:keybd_event (%u,%u,%08xh,%08x) not implemented.\n",
5906 bVk,
5907 bScan,
5908 dwFlags,
5909 dwExtraInfo));
5910}
5911
5912
5913/*****************************************************************************
5914 * Name : VOID WIN32API mouse_event
5915 * Purpose : The mouse_event function synthesizes mouse motion and button clicks.
5916 * Parameters: DWORD dwFlags flags specifying various motion/click variants
5917 * DWORD dx horizontal mouse position or position change
5918 * DWORD dy vertical mouse position or position change
5919 * DWORD cButtons unused, reserved for future use, set to zero
5920 * DWORD dwExtraInfo 32 bits of application-defined information
5921 * Variables :
5922 * Result :
5923 * Remark :
5924 * Status : UNTESTED STUB
5925 *
5926 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5927 *****************************************************************************/
5928
5929VOID WIN32API mouse_event(DWORD dwFlags,
5930 DWORD dx,
5931 DWORD dy,
5932 DWORD cButtons,
5933 DWORD dwExtraInfo)
5934{
5935 dprintf(("USER32:mouse_event (%08xh,%u,%u,%u,%08x) not implemented.\n",
5936 dwFlags,
5937 dx,
5938 dy,
5939 cButtons,
5940 dwExtraInfo));
5941}
5942
5943
5944/*****************************************************************************
5945 * Name : BOOL WIN32API SetShellWindow
5946 * Purpose : Unknown
5947 * Parameters: Unknown
5948 * Variables :
5949 * Result :
5950 * Remark :
5951 * Status : UNTESTED UNKNOWN STUB
5952 *
5953 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
5954 *****************************************************************************/
5955
5956BOOL WIN32API SetShellWindow(DWORD x1)
5957{
5958 dprintf(("USER32: SetShellWindow(%08x) not implemented.\n",
5959 x1));
5960
5961 return (FALSE); /* default */
5962}
5963
5964
5965/*****************************************************************************
5966 * Name : BOOL WIN32API PlaySoundEvent
5967 * Purpose : Unknown
5968 * Parameters: Unknown
5969 * Variables :
5970 * Result :
5971 * Remark :
5972 * Status : UNTESTED UNKNOWN STUB
5973 *
5974 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
5975 *****************************************************************************/
5976
5977BOOL WIN32API PlaySoundEvent(DWORD x1)
5978{
5979 dprintf(("USER32: PlaySoundEvent(%08x) not implemented.\n",
5980 x1));
5981
5982 return (FALSE); /* default */
5983}
5984
5985
5986/*****************************************************************************
5987 * Name : BOOL WIN32API TileChildWindows
5988 * Purpose : Unknown
5989 * Parameters: Unknown
5990 * Variables :
5991 * Result :
5992 * Remark :
5993 * Status : UNTESTED UNKNOWN STUB
5994 *
5995 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
5996 *****************************************************************************/
5997
5998BOOL WIN32API TileChildWindows(DWORD x1,
5999 DWORD x2)
6000{
6001 dprintf(("USER32: TileChildWindows(%08xh,%08xh) not implemented.\n",
6002 x1,
6003 x2));
6004
6005 return (FALSE); /* default */
6006}
6007
6008
6009/*****************************************************************************
6010 * Name : BOOL WIN32API SetSysColorsTemp
6011 * Purpose : Unknown
6012 * Parameters: Unknown
6013 * Variables :
6014 * Result :
6015 * Remark :
6016 * Status : UNTESTED UNKNOWN STUB
6017 *
6018 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6019 *****************************************************************************/
6020
6021BOOL WIN32API SetSysColorsTemp(void)
6022{
6023 dprintf(("USER32: SetSysColorsTemp() not implemented.\n"));
6024
6025 return (FALSE); /* default */
6026}
6027
6028
6029/*****************************************************************************
6030 * Name : BOOL WIN32API RegisterNetworkCapabilities
6031 * Purpose : Unknown
6032 * Parameters: Unknown
6033 * Variables :
6034 * Result :
6035 * Remark :
6036 * Status : UNTESTED UNKNOWN STUB
6037 *
6038 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6039 *****************************************************************************/
6040
6041BOOL WIN32API RegisterNetworkCapabilities(DWORD x1,
6042 DWORD x2)
6043{
6044 dprintf(("USER32: RegisterNetworkCapabilities(%08xh,%08xh) not implemented.\n",
6045 x1,
6046 x2));
6047
6048 return (FALSE); /* default */
6049}
6050
6051
6052/*****************************************************************************
6053 * Name : BOOL WIN32API EndTask
6054 * Purpose : Unknown
6055 * Parameters: Unknown
6056 * Variables :
6057 * Result :
6058 * Remark :
6059 * Status : UNTESTED UNKNOWN STUB
6060 *
6061 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6062 *****************************************************************************/
6063
6064BOOL WIN32API EndTask(DWORD x1,
6065 DWORD x2,
6066 DWORD x3)
6067{
6068 dprintf(("USER32: EndTask(%08xh,%08xh,%08xh) not implemented.\n",
6069 x1,
6070 x2,
6071 x3));
6072
6073 return (FALSE); /* default */
6074}
6075
6076
6077/*****************************************************************************
6078 * Name : BOOL WIN32API SwitchToThisWindow
6079 * Purpose : Unknown
6080 * Parameters: Unknown
6081 * Variables :
6082 * Result :
6083 * Remark :
6084 * Status : UNTESTED UNKNOWN STUB
6085 *
6086 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6087 *****************************************************************************/
6088
6089BOOL WIN32API SwitchToThisWindow(HWND hwnd,
6090 BOOL x2)
6091{
6092 dprintf(("USER32: SwitchToThisWindow(%08xh,%08xh) not implemented.\n",
6093 hwnd,
6094 x2));
6095
6096 return (FALSE); /* default */
6097}
6098
6099
6100/*****************************************************************************
6101 * Name : BOOL WIN32API GetNextQueueWindow
6102 * Purpose : Unknown
6103 * Parameters: Unknown
6104 * Variables :
6105 * Result :
6106 * Remark :
6107 * Status : UNTESTED UNKNOWN STUB
6108 *
6109 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6110 *****************************************************************************/
6111
6112BOOL WIN32API GetNextQueueWindow(DWORD x1,
6113 DWORD x2)
6114{
6115 dprintf(("USER32: GetNextQueueWindow(%08xh,%08xh) not implemented.\n",
6116 x1,
6117 x2));
6118
6119 return (FALSE); /* default */
6120}
6121
6122
6123/*****************************************************************************
6124 * Name : BOOL WIN32API YieldTask
6125 * Purpose : Unknown
6126 * Parameters: Unknown
6127 * Variables :
6128 * Result :
6129 * Remark :
6130 * Status : UNTESTED UNKNOWN STUB
6131 *
6132 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6133 *****************************************************************************/
6134
6135BOOL WIN32API YieldTask(void)
6136{
6137 dprintf(("USER32: YieldTask() not implemented.\n"));
6138
6139 return (FALSE); /* default */
6140}
6141
6142
6143/*****************************************************************************
6144 * Name : BOOL WIN32API WinOldAppHackoMatic
6145 * Purpose : Unknown
6146 * Parameters: Unknown
6147 * Variables :
6148 * Result :
6149 * Remark :
6150 * Status : UNTESTED UNKNOWN STUB
6151 *
6152 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6153 *****************************************************************************/
6154
6155BOOL WIN32API WinOldAppHackoMatic(DWORD x1)
6156{
6157 dprintf(("USER32: WinOldAppHackoMatic(%08x) not implemented.\n",
6158 x1));
6159
6160 return (FALSE); /* default */
6161}
6162
6163
6164/*****************************************************************************
6165 * Name : BOOL WIN32API DragObject
6166 * Purpose : Unknown
6167 * Parameters: Unknown
6168 * Variables :
6169 * Result :
6170 * Remark :
6171 * Status : UNTESTED UNKNOWN STUB
6172 *
6173 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6174 *****************************************************************************/
6175
6176DWORD WIN32API DragObject(HWND x1,HWND x2,UINT x3,DWORD x4,HCURSOR x5)
6177{
6178 dprintf(("USER32: DragObject(%08x,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
6179 x1,
6180 x2,
6181 x3,
6182 x4,
6183 x5));
6184
6185 return (FALSE); /* default */
6186}
6187
6188
6189/*****************************************************************************
6190 * Name : BOOL WIN32API CascadeChildWindows
6191 * Purpose : Unknown
6192 * Parameters: Unknown
6193 * Variables :
6194 * Result :
6195 * Remark :
6196 * Status : UNTESTED UNKNOWN STUB
6197 *
6198 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6199 *****************************************************************************/
6200
6201BOOL WIN32API CascadeChildWindows(DWORD x1,
6202 DWORD x2)
6203{
6204 dprintf(("USER32: CascadeChildWindows(%08xh,%08xh) not implemented.\n",
6205 x1,
6206 x2));
6207
6208 return (FALSE); /* default */
6209}
6210
6211
6212/*****************************************************************************
6213 * Name : BOOL WIN32API RegisterSystemThread
6214 * Purpose : Unknown
6215 * Parameters: Unknown
6216 * Variables :
6217 * Result :
6218 * Remark :
6219 * Status : UNTESTED UNKNOWN STUB
6220 *
6221 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6222 *****************************************************************************/
6223
6224BOOL WIN32API RegisterSystemThread(DWORD x1,
6225 DWORD x2)
6226{
6227 dprintf(("USER32: RegisterSystemThread(%08xh,%08xh) not implemented.\n",
6228 x1,
6229 x2));
6230
6231 return (FALSE); /* default */
6232}
6233
6234
6235/*****************************************************************************
6236 * Name : BOOL WIN32API IsHungThread
6237 * Purpose : Unknown
6238 * Parameters: Unknown
6239 * Variables :
6240 * Result :
6241 * Remark :
6242 * Status : UNTESTED UNKNOWN STUB
6243 *
6244 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6245 *****************************************************************************/
6246
6247BOOL WIN32API IsHungThread(DWORD x1)
6248{
6249 dprintf(("USER32: IsHungThread(%08xh) not implemented.\n",
6250 x1));
6251
6252 return (FALSE); /* default */
6253}
6254
6255
6256/*****************************************************************************
6257 * Name : BOOL WIN32API SysErrorBox
6258 * Purpose : Unknown
6259 * Parameters: Unknown
6260 * Variables :
6261 * Result :
6262 * Remark : HARDERR like ?
6263 * Status : UNTESTED UNKNOWN STUB
6264 *
6265 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6266 *****************************************************************************/
6267
6268BOOL WIN32API SysErrorBox(DWORD x1,
6269 DWORD x2,
6270 DWORD x3)
6271{
6272 dprintf(("USER32: SysErrorBox(%08xh,%08xh,%08xh) not implemented.\n",
6273 x1,
6274 x2,
6275 x3));
6276
6277 return (FALSE); /* default */
6278}
6279
6280
6281/*****************************************************************************
6282 * Name : BOOL WIN32API UserSignalProc
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 UserSignalProc(DWORD x1,
6294 DWORD x2,
6295 DWORD x3,
6296 DWORD x4)
6297{
6298 dprintf(("USER32: SysErrorBox(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
6299 x1,
6300 x2,
6301 x3,
6302 x4));
6303
6304 return (FALSE); /* default */
6305}
6306
6307
6308/*****************************************************************************
6309 * Name : BOOL WIN32API GetShellWindow
6310 * Purpose : Unknown
6311 * Parameters: Unknown
6312 * Variables :
6313 * Result :
6314 * Remark :
6315 * Status : UNTESTED UNKNOWN STUB
6316 *
6317 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6318 *****************************************************************************/
6319
6320HWND WIN32API GetShellWindow(void)
6321{
6322 dprintf(("USER32: GetShellWindow() not implemented.\n"));
6323
6324 return (0); /* default */
6325}
6326
6327
6328/***********************************************************************
6329 * RegisterTasklist32 [USER32.436]
6330 */
6331DWORD WIN32API RegisterTasklist (DWORD x)
6332{
6333 dprintf(("USER32: RegisterTasklist(%08xh) not implemented.\n",
6334 x));
6335
6336 return TRUE;
6337}
6338
6339
6340/***********************************************************************
6341 * DrawCaptionTemp32A [USER32.599]
6342 *
6343 * PARAMS
6344 *
6345 * RETURNS
6346 * Success:
6347 * Failure:
6348 */
6349
6350BOOL WIN32API DrawCaptionTempA(HWND hwnd,
6351 HDC hdc,
6352 const RECT *rect,
6353 HFONT hFont,
6354 HICON hIcon,
6355 LPCSTR str,
6356 UINT uFlags)
6357{
6358 RECT rc = *rect;
6359
6360 dprintf(("USER32: DrawCaptionTempA(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh)\n",
6361 hwnd,
6362 hdc,
6363 rect,
6364 hFont,
6365 hIcon,
6366 str,
6367 uFlags));
6368
6369 /* drawing background */
6370 if (uFlags & DC_INBUTTON)
6371 {
6372 O32_FillRect (hdc,
6373 &rc,
6374 GetSysColorBrush (COLOR_3DFACE));
6375
6376 if (uFlags & DC_ACTIVE)
6377 {
6378 HBRUSH hbr = O32_SelectObject (hdc,
6379 GetSysColorBrush (COLOR_ACTIVECAPTION));
6380 O32_PatBlt (hdc,
6381 rc.left,
6382 rc.top,
6383 rc.right - rc.left,
6384 rc.bottom - rc.top,
6385 0xFA0089);
6386
6387 O32_SelectObject (hdc,
6388 hbr);
6389 }
6390 }
6391 else
6392 {
6393 O32_FillRect (hdc,
6394 &rc,
6395 GetSysColorBrush ((uFlags & DC_ACTIVE) ?
6396 COLOR_ACTIVECAPTION : COLOR_INACTIVECAPTION));
6397 }
6398
6399
6400 /* drawing icon */
6401 if ((uFlags & DC_ICON) && !(uFlags & DC_SMALLCAP))
6402 {
6403 POINT pt;
6404
6405 pt.x = rc.left + 2;
6406 pt.y = (rc.bottom + rc.top - O32_GetSystemMetrics(SM_CYSMICON)) / 2;
6407
6408 if (hIcon)
6409 {
6410 DrawIconEx (hdc,
6411 pt.x,
6412 pt.y,
6413 hIcon,
6414 O32_GetSystemMetrics(SM_CXSMICON),
6415 O32_GetSystemMetrics(SM_CYSMICON),
6416 0,
6417 0,
6418 DI_NORMAL);
6419 }
6420 else
6421 {
6422 /* @@@PH 1999/06/08 not ported yet, just don't draw any icon
6423 WND *wndPtr = WIN_FindWndPtr(hwnd);
6424 HICON hAppIcon = 0;
6425
6426 if (wndPtr->class->hIconSm)
6427 hAppIcon = wndPtr->class->hIconSm;
6428 else
6429 if (wndPtr->class->hIcon)
6430 hAppIcon = wndPtr->class->hIcon;
6431
6432 DrawIconEx (hdc,
6433 pt.x,
6434 pt.y,
6435 hAppIcon,
6436 GetSystemMetrics(SM_CXSMICON),
6437 GetSystemMetrics(SM_CYSMICON),
6438 0,
6439 0,
6440 DI_NORMAL);
6441
6442 WIN_ReleaseWndPtr(wndPtr);
6443 */
6444 }
6445
6446 rc.left += (rc.bottom - rc.top);
6447 }
6448
6449 /* drawing text */
6450 if (uFlags & DC_TEXT)
6451 {
6452 HFONT hOldFont;
6453
6454 if (uFlags & DC_INBUTTON)
6455 O32_SetTextColor (hdc,
6456 O32_GetSysColor (COLOR_BTNTEXT));
6457 else
6458 if (uFlags & DC_ACTIVE)
6459 O32_SetTextColor (hdc,
6460 O32_GetSysColor (COLOR_CAPTIONTEXT));
6461 else
6462 O32_SetTextColor (hdc,
6463 O32_GetSysColor (COLOR_INACTIVECAPTIONTEXT));
6464
6465 O32_SetBkMode (hdc,
6466 TRANSPARENT);
6467
6468 if (hFont)
6469 hOldFont = O32_SelectObject (hdc,
6470 hFont);
6471 else
6472 {
6473 NONCLIENTMETRICSA nclm;
6474 HFONT hNewFont;
6475
6476 nclm.cbSize = sizeof(NONCLIENTMETRICSA);
6477 O32_SystemParametersInfo (SPI_GETNONCLIENTMETRICS,
6478 0,
6479 &nclm,
6480 0);
6481 hNewFont = O32_CreateFontIndirect ((uFlags & DC_SMALLCAP) ?
6482 &nclm.lfSmCaptionFont : &nclm.lfCaptionFont);
6483 hOldFont = O32_SelectObject (hdc,
6484 hNewFont);
6485 }
6486
6487 if (str)
6488 O32_DrawText (hdc,
6489 str,
6490 -1,
6491 &rc,
6492 DT_SINGLELINE | DT_VCENTER | DT_NOPREFIX | DT_LEFT);
6493 else
6494 {
6495 CHAR szText[128];
6496 INT nLen;
6497
6498 nLen = O32_GetWindowText (hwnd,
6499 szText,
6500 128);
6501
6502 O32_DrawText (hdc,
6503 szText,
6504 nLen,
6505 &rc,
6506 DT_SINGLELINE | DT_VCENTER | DT_NOPREFIX | DT_LEFT);
6507 }
6508
6509 if (hFont)
6510 O32_SelectObject (hdc,
6511 hOldFont);
6512 else
6513 O32_DeleteObject (O32_SelectObject (hdc,
6514 hOldFont));
6515 }
6516
6517 /* drawing focus ??? */
6518 if (uFlags & 0x2000)
6519 {
6520 dprintf(("USER32: DrawCaptionTempA undocumented flag (0x2000)!\n"));
6521 }
6522
6523 return 0;
6524}
6525
6526
6527/***********************************************************************
6528 * DrawCaptionTemp32W [USER32.602]
6529 *
6530 * PARAMS
6531 *
6532 * RETURNS
6533 * Success:
6534 * Failure:
6535 */
6536
6537BOOL WIN32API DrawCaptionTempW (HWND hwnd,
6538 HDC hdc,
6539 const RECT *rect,
6540 HFONT hFont,
6541 HICON hIcon,
6542 LPCWSTR str,
6543 UINT uFlags)
6544{
6545 LPSTR strAscii = UnicodeToAsciiString((LPWSTR)str);
6546
6547 BOOL res = DrawCaptionTempA (hwnd,
6548 hdc,
6549 rect,
6550 hFont,
6551 hIcon,
6552 strAscii,
6553 uFlags);
6554
6555 FreeAsciiString(strAscii);
6556
6557 return res;
6558}
Note: See TracBrowser for help on using the repository browser.