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

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

Fixes for CreateWindowExW and several unicode menu apis

File size: 231.6 KB
Line 
1/* $Id: user32.cpp,v 1.18 1999-07-10 15:57:31 sandervl Exp $ */
2
3/*
4 * Win32 misc user32 API functions for OS/2
5 *
6 * Copyright 1998 Sander van Leeuwen
7 * Copyright 1998 Patrick Haller
8 * Copyright 1998 Peter Fitzsimmons
9 * Copyright 1999 Christoph Bratschi
10 *
11 *
12 * Project Odin Software License can be found in LICENSE.TXT
13 *
14 */
15/*****************************************************************************
16 * Name : USER32.CPP
17 * Purpose : This module maps all Win32 functions contained in USER32.DLL
18 * to their OS/2-specific counterparts as far as possible.
19 *****************************************************************************/
20
21#include <os2win.h>
22#include "misc.h"
23
24#include "user32.h"
25#include "wndproc.h"
26#include "wndclass.h"
27#include "icon.h"
28#include "usrcall.h"
29#include "syscolor.h"
30
31#include <wchar.h>
32#include <stdlib.h>
33#include <string.h>
34
35//undocumented stuff
36// WIN32API CalcChildScroll
37// WIN32API CascadeChildWindows
38// WIN32API ClientThreadConnect
39// WIN32API DragObject
40// WIN32API DrawFrame
41// WIN32API EditWndProc
42// WIN32API EndTask
43// WIN32API GetInputDesktop
44// WIN32API GetNextQueueWindow
45// WIN32API GetShellWindow
46// WIN32API InitSharedTable
47// WIN32API InitTask
48// WIN32API IsHungThread
49// WIN32API LockWindowStation
50// WIN32API ModifyAccess
51// WIN32API PlaySoundEvent
52// WIN32API RegisterLogonProcess
53// WIN32API RegisterNetworkCapabilities
54// WIN32API RegisterSystemThread
55// WIN32API SetDeskWallpaper
56// WIN32API SetDesktopBitmap
57// WIN32API SetInternalWindowPos
58// WIN32API SetLogonNotifyWindow
59// WIN32API SetShellWindow
60// WIN32API SetSysColorsTemp
61// WIN32API SetWindowFullScreenState
62// WIN32API SwitchToThisWindow
63// WIN32API SysErrorBox
64// WIN32API TileChildWindows
65// WIN32API UnlockWindowStation
66// WIN32API UserClientDllInitialize
67// WIN32API UserSignalProc
68// WIN32API WinOldAppHackoMatic
69// WIN32API WNDPROC_CALLBACK
70// WIN32API YieldTask
71
72
73
74
75//******************************************************************************
76//******************************************************************************
77HWND WIN32API GetActiveWindow()
78{
79 return(O32_GetActiveWindow());
80}
81//******************************************************************************
82//******************************************************************************
83int __cdecl wsprintfA(char *lpOut, LPCSTR lpFmt, ...)
84{
85 int rc;
86 va_list argptr;
87
88#ifdef DEBUG
89 WriteLog("USER32: wsprintfA\n");
90 WriteLog("USER32: %s\n", lpFmt);
91#endif
92 va_start(argptr, lpFmt);
93 rc = O32_wvsprintf(lpOut, (char *)lpFmt, argptr);
94 va_end(argptr);
95#ifdef DEBUG
96 WriteLog("USER32: %s\n", lpOut);
97#endif
98 return(rc);
99}
100//******************************************************************************
101//******************************************************************************
102int __cdecl wsprintfW(LPWSTR lpOut, LPCWSTR lpFmt, ...)
103{
104 int rc;
105 char *lpFmtA;
106 char szOut[512];
107 va_list argptr;
108
109 dprintf(("USER32: wsprintfW(%08xh,%08xh).\n",
110 lpOut,
111 lpFmt));
112
113 lpFmtA = UnicodeToAsciiString((LPWSTR)lpFmt);
114
115 /* @@@PH 98/07/13 transform "%s" to "%ls" does the unicode magic */
116 {
117 PSZ pszTemp;
118 PSZ pszTemp1;
119 ULONG ulStrings;
120 ULONG ulIndex; /* temporary string counter */
121
122 for (ulStrings = 0, /* determine number of placeholders */
123 pszTemp = lpFmtA;
124
125 (pszTemp != NULL) &&
126 (*pszTemp != 0);
127
128 ulStrings++)
129 {
130 pszTemp = strstr(pszTemp,
131 "%s");
132 if (pszTemp != NULL) /* skip 2 characters */
133 {
134 pszTemp++;
135 pszTemp++;
136 }
137 else
138 break; /* leave loop immediately */
139 }
140
141 if (ulStrings != 0) /* transformation required ? */
142 {
143 /* now reallocate lpFmt */
144 ulStrings += strlen(lpFmtA); /* calculate total string length */
145 pszTemp = lpFmtA; /* save string pointer */
146 pszTemp1 = lpFmtA; /* save string pointer */
147
148 /* @@@PH allocation has to be compatible to FreeAsciiString !!! */
149 lpFmtA = (char *)malloc(ulStrings + 1);
150 if (lpFmtA == NULL) /* check proper allocation */
151 return (0); /* raise error condition */
152
153 for (ulIndex = 0;
154 ulIndex <= ulStrings;
155 ulIndex++,
156 pszTemp++)
157 {
158 if ((pszTemp[0] == '%') &&
159 (pszTemp[1] == 's') )
160 {
161 /* replace %s by %ls */
162 lpFmtA[ulIndex++] = '%';
163 lpFmtA[ulIndex ] = 'l';
164 lpFmtA[ulIndex+1] = 's';
165 }
166 else
167 lpFmtA[ulIndex] = *pszTemp; /* just copy over the character */
168 }
169
170 lpFmtA[ulStrings] = 0; /* string termination */
171
172 FreeAsciiString(pszTemp1); /* the original string is obsolete */
173 }
174 }
175
176 dprintf(("USER32: wsprintfW (%s).\n",
177 lpFmt));
178
179 va_start(argptr,
180 lpFmt);
181
182 rc = O32_wvsprintf(szOut,
183 lpFmtA,
184 argptr);
185
186 AsciiToUnicode(szOut,
187 lpOut);
188
189 FreeAsciiString(lpFmtA);
190 return(rc);
191}
192//******************************************************************************
193//******************************************************************************
194int WIN32API MessageBoxA(HWND hwndOwner, LPCTSTR lpszText, LPCTSTR lpszTitle, UINT fuStyle)
195{
196 dprintf(("USER32: MessageBoxA %s %s\n", lpszText, lpszTitle));
197 return(O32_MessageBox(hwndOwner, lpszText, lpszTitle, fuStyle));
198}
199//******************************************************************************
200//******************************************************************************
201BOOL WIN32API MessageBeep( UINT arg1)
202{
203#ifdef DEBUG
204 WriteLog("USER32: MessageBeep\n");
205#endif
206 return O32_MessageBeep(arg1);
207}
208//******************************************************************************
209//******************************************************************************
210LONG WIN32API SendDlgItemMessageA( HWND arg1, int arg2, UINT arg3, WPARAM arg4, LPARAM arg5)
211{
212#ifdef DEBUG
213 WriteLog("USER32: SendDlgItemMessageA\n");
214#endif
215 return O32_SendDlgItemMessage(arg1, arg2, arg3, arg4, arg5);
216}
217//******************************************************************************
218//******************************************************************************
219VOID WIN32API PostQuitMessage( int arg1)
220{
221 dprintf(("USER32: PostQuitMessage\n"));
222 O32_PostQuitMessage(arg1);
223}
224//******************************************************************************
225// Not implemented by Open32 (31-5-99 Christoph Bratschi)
226//******************************************************************************
227BOOL WIN32API IsDlgButtonChecked( HWND arg1, UINT arg2)
228{
229#ifdef DEBUG
230 WriteLog("USER32: IsDlgButtonChecked\n");
231#endif
232// return O32_IsDlgButtonChecked(arg1, arg2);
233 return (BOOL)SendDlgItemMessageA(arg1,arg2,BM_GETCHECK,0,0);
234}
235//******************************************************************************
236//******************************************************************************
237int WIN32API GetWindowTextLengthA( HWND arg1)
238{
239 dprintf(("USER32: GetWindowTextLength\n"));
240 return O32_GetWindowTextLength(arg1);
241}
242//******************************************************************************
243//******************************************************************************
244int WIN32API GetWindowTextA( HWND arg1, LPSTR arg2, int arg3)
245{
246 dprintf(("USER32: GetWindowTextA\n"));
247 return O32_GetWindowText(arg1, arg2, arg3);
248}
249//******************************************************************************
250
251/*******************************************************************
252 * InternalGetWindowText (USER32.326)
253 */
254int WIN32API InternalGetWindowText(HWND hwnd,
255 LPWSTR lpString,
256 INT nMaxCount )
257{
258 dprintf(("USER32: InternalGetWindowText(%08xh,%08xh,%08xh) not properly implemented.\n",
259 hwnd,
260 lpString,
261 nMaxCount));
262
263 return GetWindowTextW(hwnd,lpString,nMaxCount);
264}
265
266
267//******************************************************************************
268BOOL WIN32API GetWindowRect( HWND arg1, PRECT arg2)
269{
270 BOOL rc;
271
272 rc = O32_GetWindowRect(arg1, arg2);
273 dprintf(("USER32: GetWindowRect %X returned %d\n", arg1, rc));
274 return(rc);
275}
276//******************************************************************************
277//******************************************************************************
278HWND WIN32API GetNextDlgTabItem( HWND arg1, HWND arg2, BOOL arg3)
279{
280 dprintf(("USER32: GetNextDlgTabItem\n"));
281 return O32_GetNextDlgTabItem(arg1, arg2, arg3);
282}
283//******************************************************************************
284//******************************************************************************
285BOOL WIN32API GetMessageA( LPMSG arg1, HWND arg2, UINT arg3, UINT arg4)
286{
287//// dprintf(("USER32: GetMessage\n"));
288 return O32_GetMessage(arg1, arg2, arg3, arg4);
289}
290//******************************************************************************
291//******************************************************************************
292HWND WIN32API GetFocus(void)
293{
294// dprintf(("USER32: GetFocus\n"));
295 return O32_GetFocus();
296}
297//******************************************************************************
298//******************************************************************************
299HWND WIN32API GetDlgItem(HWND arg1, int arg2)
300{
301 HWND rc;
302
303 rc = O32_GetDlgItem(arg1, arg2);
304 dprintf(("USER32: GetDlgItem %d returned %d\n", arg2, rc));
305 return(rc);
306}
307//******************************************************************************
308//******************************************************************************
309int WIN32API GetDlgCtrlID( HWND arg1)
310{
311 dprintf(("USER32: GetDlgCtrlID\n"));
312 return O32_GetDlgCtrlID(arg1);
313}
314//******************************************************************************
315//******************************************************************************
316HWND WIN32API GetDesktopWindow(void)
317{
318 dprintf(("USER32: GetDesktopWindow\n"));
319 return O32_GetDesktopWindow();
320}
321//******************************************************************************
322//******************************************************************************
323BOOL WIN32API EnumThreadWindows(DWORD dwThreadId, WNDENUMPROC lpfn, LPARAM lParam)
324{
325 BOOL rc;
326 EnumWindowCallback *callback = new EnumWindowCallback(lpfn, lParam);
327
328 dprintf(("USER32: EnumThreadWindows\n"));
329 rc = O32_EnumThreadWindows(dwThreadId, callback->GetOS2Callback(), (LPARAM)callback);
330 if(callback)
331 delete callback;
332 return(rc);
333}
334//******************************************************************************
335//******************************************************************************
336BOOL WIN32API EndDialog( HWND arg1, int arg2)
337{
338 BOOL rc;
339
340 dprintf(("USER32: EndDialog\n"));
341 rc = O32_EndDialog(arg1, arg2);
342 return(rc);
343}
344//******************************************************************************
345//******************************************************************************
346LONG WIN32API DispatchMessageA( const MSG * arg1)
347{
348//// dprintf(("USER32: DispatchMessage\n"));
349 return O32_DispatchMessage(arg1);
350}
351//******************************************************************************
352//******************************************************************************
353BOOL WIN32API OffsetRect( PRECT arg1, int arg2, int arg3)
354{
355#ifdef DEBUG
356//// WriteLog("USER32: OffsetRect\n");
357#endif
358 return O32_OffsetRect(arg1, arg2, arg3);
359}
360//******************************************************************************
361//******************************************************************************
362BOOL WIN32API CopyRect( PRECT arg1, const RECT * arg2)
363{
364// ddprintf(("USER32: CopyRect\n"));
365 return O32_CopyRect(arg1, arg2);
366}
367//******************************************************************************
368// Not implemented by Open32 (5-31-99 Christoph Bratschi)
369//******************************************************************************
370BOOL WIN32API CheckDlgButton( HWND arg1, int arg2, UINT arg3)
371{
372#ifdef DEBUG
373 WriteLog("USER32: CheckDlgButton\n");
374#endif
375// return O32_CheckDlgButton(arg1, arg2, arg3);
376 return (BOOL)SendDlgItemMessageA(arg1,arg2,BM_SETCHECK,arg3,0);
377}
378//******************************************************************************
379//******************************************************************************
380HWND WIN32API SetFocus( HWND arg1)
381{
382 dprintf(("USER32: SetFocus\n"));
383 return O32_SetFocus(arg1);
384}
385//******************************************************************************
386//******************************************************************************
387BOOL WIN32API TranslateMessage( const MSG * arg1)
388{
389#ifdef DEBUG
390//// WriteLog("USER32: TranslateMessage\n");
391#endif
392 return O32_TranslateMessage(arg1);
393}
394//******************************************************************************
395//******************************************************************************
396BOOL WIN32API SetWindowPos( HWND arg1, HWND arg2, int arg3, int arg4, int arg5, int arg6, UINT arg7)
397{
398#ifdef DEBUG
399 WriteLog("USER32: SetWindowPos\n");
400#endif
401 return O32_SetWindowPos(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
402}
403//******************************************************************************
404//******************************************************************************
405BOOL WIN32API ShowWindow(HWND arg1, int arg2)
406{
407#ifdef DEBUG
408 WriteLog("USER32: ShowWindow %X %d\n", arg1, arg2);
409#endif
410 return O32_ShowWindow(arg1, arg2);
411}
412//******************************************************************************
413//******************************************************************************
414BOOL WIN32API SetWindowTextA(HWND arg1, LPCSTR arg2)
415{
416#ifdef DEBUG
417 WriteLog("USER32: SetWindowText %s\n", arg2);
418#endif
419 return O32_SetWindowText(arg1, arg2);
420}
421//******************************************************************************
422//******************************************************************************
423BOOL WIN32API SetForegroundWindow(HWND arg1)
424{
425#ifdef DEBUG
426 WriteLog("USER32: SetForegroundWindow\n");
427#endif
428 return O32_SetForegroundWindow(arg1);
429}
430//******************************************************************************
431//******************************************************************************
432int WIN32API ReleaseDC( HWND arg1, HDC arg2)
433{
434#ifdef DEBUG
435 WriteLog("USER32: ReleaseDC\n");
436#endif
437 return O32_ReleaseDC(arg1, arg2);
438}
439//******************************************************************************
440//******************************************************************************
441BOOL WIN32API InvalidateRect(HWND arg1, const RECT *arg2, BOOL arg3)
442{
443#ifdef DEBUG
444 if(arg2)
445 WriteLog("USER32: InvalidateRect for window %X (%d,%d)(%d,%d) %d\n", arg1, arg2->left, arg2->top, arg2->right, arg2->bottom, arg3);
446 else WriteLog("USER32: InvalidateRect for window %X NULL, %d\n", arg1, arg3);
447#endif
448 return O32_InvalidateRect(arg1, arg2, arg3);
449}
450//******************************************************************************
451//******************************************************************************
452BOOL WIN32API GetUpdateRect( HWND arg1, PRECT arg2, BOOL arg3)
453{
454#ifdef DEBUG
455 WriteLog("USER32: GetUpdateRect\n");
456#endif
457 return O32_GetUpdateRect(arg1, arg2, arg3);
458}
459//******************************************************************************
460//******************************************************************************
461HDC WIN32API GetDC( HWND arg1)
462{
463 HDC hdc;
464
465 hdc = O32_GetDC(arg1);
466#ifdef DEBUG
467 WriteLog("USER32: GetDC of %X returns %X\n", arg1, hdc);
468#endif
469 return(hdc);
470}
471//******************************************************************************
472//******************************************************************************
473HDC WIN32API GetDCEx(HWND arg1, HRGN arg2, DWORD arg3)
474{
475#ifdef DEBUG
476 WriteLog("USER32: GetDCEx\n");
477#endif
478 return O32_GetDCEx(arg1, arg2, arg3);
479}
480//******************************************************************************
481//******************************************************************************
482BOOL WIN32API GetClientRect( HWND arg1, PRECT arg2)
483{
484#ifdef DEBUG
485 WriteLog("USER32: GetClientRect of %X\n", arg1);
486#endif
487
488 return O32_GetClientRect(arg1, arg2);
489}
490//******************************************************************************
491//******************************************************************************
492HWND WIN32API FindWindowA(LPCSTR arg1, LPCSTR arg2)
493{
494#ifdef DEBUG
495 WriteLog("USER32: FindWindow\n");
496#endif
497 return O32_FindWindow(arg1, arg2);
498}
499//******************************************************************************
500//******************************************************************************
501HWND WIN32API FindWindowExA(HWND arg1, HWND arg2, LPCSTR arg3, LPCSTR arg4)
502{
503#ifdef DEBUG
504 WriteLog("USER32: FindWindowExA, not completely implemented\n");
505#endif
506 return O32_FindWindow(arg3, arg4);
507}
508//******************************************************************************
509//******************************************************************************
510BOOL WIN32API FlashWindow( HWND arg1, BOOL arg2)
511{
512#ifdef DEBUG
513 WriteLog("USER32: FlashWindow\n");
514#endif
515 return O32_FlashWindow(arg1, arg2);
516}
517//******************************************************************************
518//******************************************************************************
519BOOL WIN32API EndPaint( HWND arg1, const PAINTSTRUCT * arg2)
520{
521#ifdef DEBUG
522 WriteLog("USER32: EndPaint\n");
523#endif
524 return O32_EndPaint(arg1, arg2);
525}
526//******************************************************************************
527//******************************************************************************
528BOOL WIN32API MoveWindow(HWND arg1, int arg2, int arg3, int arg4, int arg5, BOOL arg6)
529{
530 BOOL rc;
531
532 rc = O32_MoveWindow(arg1, arg2, arg3, arg4, arg5, arg6);
533 dprintf(("USER32: MoveWindow %X to (%d,%d) size (%d,%d), repaint = %d returned %d\n", arg1, arg2, arg3, arg4, arg5, arg6, rc));
534 return(rc);
535}
536//******************************************************************************
537//******************************************************************************
538HWND WIN32API CreateWindowExA(DWORD dwExStyle,
539 LPCSTR arg2,
540 LPCSTR arg3,
541 DWORD dwStyle,
542 int x,
543 int y,
544 int nWidth,
545 int nHeight,
546 HWND parent,
547 HMENU arg10,
548 HINSTANCE arg11,
549 PVOID arg12)
550{
551 HWND hwnd;
552 Win32WindowProc *window = NULL;
553
554 /* @@@PH 98/06/12 CreateWindow crashes somewhere in Open32 */
555 if(arg3 == NULL)
556 arg3 = (LPCSTR)"CRASH, CRASH";
557
558 // 6-12-99 CB: WS_CLIPCHILDREN not set -> controls not redrawn
559 // Problems with group boxes
560 //SvL: Not necessary anymore (EB's fixes)
561// dwStyle |= WS_CLIPCHILDREN;
562
563 //SvL: Correct window style (like Wine does)
564 if(dwStyle & WS_CHILD) {
565 dwStyle |= WS_CLIPSIBLINGS;
566 if(!(dwStyle & WS_POPUP)) {
567 dwStyle |= WS_CAPTION;
568 }
569 }
570 if(dwExStyle & WS_EX_DLGMODALFRAME)
571 {
572 dwStyle &= ~WS_THICKFRAME;
573 }
574
575#ifdef DEBUG
576 WriteLog("USER32: CreateWindow: dwExStyle = %X\n", dwExStyle);
577 if((int)arg2 >> 16 != 0)
578 WriteLog("USER32: CreateWindow: classname = %s\n", arg2);
579 else WriteLog("USER32: CreateWindow: classname = %X\n", arg2);
580 WriteLog("USER32: CreateWindow: windowname= %s\n", arg3);
581 WriteLog("USER32: CreateWindow: dwStyle = %X\n", dwStyle);
582 WriteLog("USER32: CreateWindow: x = %d\n", x);
583 WriteLog("USER32: CreateWindow: y = %d\n", y);
584 WriteLog("USER32: CreateWindow: nWidth = %d\n", nWidth);
585 WriteLog("USER32: CreateWindow: nHeight = %d\n", nHeight);
586 WriteLog("USER32: CreateWindow: parent = %X\n", parent);
587 WriteLog("USER32: CreateWindow: hwmenu = %X\n", arg10);
588 WriteLog("USER32: CreateWindow: hinstance = %X\n", arg11);
589 WriteLog("USER32: CreateWindow: param = %X\n", arg12);
590 #endif
591
592 if((int) arg2 >> 16 != 0 && strcmp(arg2, "COMBOBOX") == 0)
593 {
594 dprintf(("COMBOBOX creation"));
595 //TODO: #%@#%$ Open32 doesn't support this
596 dwStyle &= ~(CBS_OWNERDRAWFIXED | CBS_OWNERDRAWVARIABLE);
597
598 /* @@@PH 98/06/12 drop down combos are problematic too */
599 /* so we translate the styles to OS/2 style */
600 dwStyle |= CBS_DROPDOWN | CBS_DROPDOWNLIST;
601 }
602
603 //Classname might be name of system class, in which case we don't
604 //need to use our own callback
605// if(Win32WindowClass::FindClass((LPSTR)arg2) != NULL) {
606 window = new Win32WindowProc(arg11, arg2);
607// }
608
609 hwnd = O32_CreateWindowEx(dwExStyle,
610 arg2,
611 arg3,
612 dwStyle,
613 x,
614 y,
615 nWidth,
616 nHeight,
617 parent,
618 arg10,
619 arg11,
620 arg12);
621
622 //SvL: 16-11-'97: window can be already destroyed if hwnd == 0
623 if(hwnd == 0 && window != 0 && Win32WindowProc::FindWindowProc(window)) {
624 delete(window);
625 window = 0;
626 }
627 if(window) {
628 window->SetWindowHandle(hwnd);
629 }
630
631 dprintf(("USER32: ************CreateWindowExA %s (%d,%d,%d,%d), hwnd = %X\n", arg2, x, y, nWidth, nHeight, hwnd));
632 return(hwnd);
633}
634//******************************************************************************
635//******************************************************************************
636LRESULT WIN32API SendMessageA(HWND arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
637{
638 LRESULT rc;
639
640#ifdef DEBUG1
641 WriteLog("USER32: SendMessage....\n");
642#endif
643 rc = O32_SendMessage(arg1, arg2, arg3, arg4);
644#ifdef DEBUG1
645 WriteLog("USER32: *****SendMessage %X %X %X %X returned %d\n", arg1, arg2, arg3, arg4, rc);
646#endif
647 return(rc);
648}
649//******************************************************************************
650//******************************************************************************
651HWND WIN32API SetActiveWindow( HWND arg1)
652{
653#ifdef DEBUG
654 WriteLog("USER32: SetActiveWindow\n");
655#endif
656 return O32_SetActiveWindow(arg1);
657}
658//******************************************************************************
659//******************************************************************************
660HDC WIN32API BeginPaint(HWND arg1, PPAINTSTRUCT arg2)
661{
662 dprintf(("USER32: BeginPaint %X\n", arg2));
663 return O32_BeginPaint(arg1, arg2);
664}
665//******************************************************************************
666//******************************************************************************
667BOOL WIN32API IsDialogMessageA( HWND arg1, LPMSG arg2)
668{
669#ifdef DEBUG
670//// WriteLog("USER32: IsDialogMessage\n");
671#endif
672 return O32_IsDialogMessage(arg1, arg2);
673}
674//******************************************************************************
675//******************************************************************************
676int WIN32API DrawTextA(HDC arg1, LPCSTR arg2, int arg3, PRECT arg4, UINT arg5)
677{
678#ifdef DEBUG
679 WriteLog("USER32: DrawTextA %s", arg2);
680#endif
681 return O32_DrawText(arg1, arg2, arg3, arg4, arg5);
682}
683//******************************************************************************
684//******************************************************************************
685int WIN32API DrawTextExA(HDC arg1, LPCSTR arg2, int arg3, PRECT arg4, UINT arg5, LPDRAWTEXTPARAMS lpDTParams)
686{
687#ifdef DEBUG
688 WriteLog("USER32: DrawTextExA (not completely implemented) %s", arg2);
689#endif
690 return O32_DrawText(arg1, arg2, arg3, arg4, arg5);
691}
692//******************************************************************************
693//******************************************************************************
694int WIN32API GetSystemMetrics(int arg1)
695{
696 int rc;
697
698 switch(arg1) {
699 case SM_CXICONSPACING: //TODO: size of grid cell for large icons
700 rc = O32_GetSystemMetrics(SM_CXICON);
701 break;
702 case SM_CYICONSPACING:
703 rc = O32_GetSystemMetrics(SM_CYICON);
704 break;
705 case SM_PENWINDOWS:
706 rc = FALSE;
707 break;
708 case SM_DBCSENABLED:
709 rc = FALSE;
710 break;
711 case SM_CXEDGE: //size of 3D window edge (not supported)
712 rc = 1;
713 break;
714 case SM_CYEDGE:
715 rc = 1;
716 break;
717 case SM_CXMINSPACING: //can be SM_CXMINIMIZED or larger
718 rc = O32_GetSystemMetrics(SM_CXMINIMIZED);
719 break;
720 case SM_CYMINSPACING:
721 rc = GetSystemMetrics(SM_CYMINIMIZED);
722 break;
723 case SM_CXSMICON: //recommended size of small icons (TODO: adjust to screen res.)
724 rc = 16;
725 break;
726 case SM_CYSMICON:
727 rc = 16;
728 break;
729 case SM_CYSMCAPTION: //size in pixels of a small caption (TODO: ????)
730 rc = 8;
731 break;
732 case SM_CXSMSIZE: //size of small caption buttons (pixels) (TODO: implement properly)
733 rc = 16;
734 break;
735 case SM_CYSMSIZE:
736 rc = 16;
737 break;
738 case SM_CXMENUSIZE: //TODO: size of menu bar buttons (such as MDI window close)
739 rc = 16;
740 break;
741 case SM_CYMENUSIZE:
742 rc = 16;
743 break;
744 case SM_ARRANGE:
745 rc = ARW_BOTTOMLEFT | ARW_LEFT;
746 break;
747 case SM_CXMINIMIZED:
748 break;
749 case SM_CYMINIMIZED:
750 break;
751 case SM_CXMAXTRACK: //max window size
752 case SM_CXMAXIMIZED: //max toplevel window size
753 rc = O32_GetSystemMetrics(SM_CXSCREEN);
754 break;
755 case SM_CYMAXTRACK:
756 case SM_CYMAXIMIZED:
757 rc = O32_GetSystemMetrics(SM_CYSCREEN);
758 break;
759 case SM_NETWORK:
760 rc = 0x01; //TODO: default = yes
761 break;
762 case SM_CLEANBOOT:
763 rc = 0; //normal boot
764 break;
765 case SM_CXDRAG: //nr of pixels before drag becomes a real one
766 rc = 2;
767 break;
768 case SM_CYDRAG:
769 rc = 2;
770 break;
771 case SM_SHOWSOUNDS: //show instead of play sound
772 rc = FALSE;
773 break;
774 case SM_CXMENUCHECK:
775 rc = 4; //TODO
776 break;
777 case SM_CYMENUCHECK:
778 rc = O32_GetSystemMetrics(SM_CYMENU);
779 break;
780 case SM_SLOWMACHINE:
781 rc = FALSE; //even a slow machine is fast with OS/2 :)
782 break;
783 case SM_MIDEASTENABLED:
784 rc = FALSE;
785 break;
786 case SM_CMETRICS:
787 rc = O32_GetSystemMetrics(44); //Open32 changed this one
788 break;
789 default:
790 rc = O32_GetSystemMetrics(arg1);
791 break;
792 }
793#ifdef DEBUG
794 WriteLog("USER32: GetSystemMetrics %d returned %d\n", arg1, rc);
795#endif
796 return(rc);
797}
798//******************************************************************************
799//******************************************************************************
800UINT WIN32API SetTimer( HWND arg1, UINT arg2, UINT arg3, TIMERPROC arg4)
801{
802#ifdef DEBUG
803 WriteLog("USER32: SetTimer INCORRECT CALLING CONVENTION FOR HANDLER!!!!!\n");
804#endif
805 //SvL: Write callback handler class for this one
806 return O32_SetTimer(arg1, arg2, arg3, (TIMERPROC_O32)arg4);
807}
808//******************************************************************************
809//******************************************************************************
810BOOL WIN32API KillTimer(HWND arg1, UINT arg2)
811{
812#ifdef DEBUG
813 WriteLog("USER32: KillTimer\n");
814#endif
815 return O32_KillTimer(arg1, arg2);
816}
817//******************************************************************************
818//******************************************************************************
819BOOL WIN32API DestroyWindow(HWND arg1)
820{
821#ifdef DEBUG
822 WriteLog("USER32: DestroyWindow\n");
823#endif
824 return O32_DestroyWindow(arg1);
825}
826//******************************************************************************
827//******************************************************************************
828BOOL WIN32API PostMessageA( HWND arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
829{
830#ifdef DEBUG
831 WriteLog("USER32: PostMessageA %X %X %X %X\n", arg1, arg2, arg3, arg4);
832#endif
833 return O32_PostMessage(arg1, arg2, arg3, arg4);
834}
835//******************************************************************************
836//******************************************************************************
837BOOL WIN32API InflateRect( PRECT arg1, int arg2, int arg3)
838{
839#ifdef DEBUG
840 WriteLog("USER32: InflateRect\n");
841#endif
842 return O32_InflateRect(arg1, arg2, arg3);
843}
844//******************************************************************************
845//TODO:How can we emulate this one in OS/2???
846//******************************************************************************
847DWORD WIN32API WaitForInputIdle(HANDLE hProcess, DWORD dwTimeOut)
848{
849#ifdef DEBUG
850 WriteLog("USER32: WaitForInputIdle (Not Implemented) %d\n", dwTimeOut);
851#endif
852
853 if(dwTimeOut == INFINITE) return(0);
854
855// DosSleep(dwTimeOut/16);
856 return(0);
857}
858//******************************************************************************
859//******************************************************************************
860UINT WIN32API GetDlgItemTextA(HWND arg1, int arg2, LPSTR arg3, UINT arg4)
861{
862 UINT rc;
863
864 rc = O32_GetDlgItemText(arg1, arg2, arg3, arg4);
865#ifdef DEBUG
866 if(rc)
867 WriteLog("USER32: GetDlgItemTextA returned %s\n", arg3);
868 else WriteLog("USER32: GetDlgItemTextA returned 0 (%d)\n", GetLastError());
869#endif
870 return(rc);
871}
872//******************************************************************************
873//******************************************************************************
874BOOL WIN32API PeekMessageA(LPMSG arg1, HWND arg2, UINT arg3, UINT arg4, UINT arg5)
875{
876#ifdef DEBUG
877// WriteLog("USER32: PeekMessage\n");
878#endif
879 return O32_PeekMessage(arg1, arg2, arg3, arg4, arg5);
880}
881//******************************************************************************
882//******************************************************************************
883int WIN32API ShowCursor( BOOL arg1)
884{
885#ifdef DEBUG
886 WriteLog("USER32: ShowCursor\n");
887#endif
888 return O32_ShowCursor(arg1);
889}
890//******************************************************************************
891//BUGBUG: UpdateWindow sends a WM_ERASEBKGRND when it shouldn't!
892// So we just do it manually
893//******************************************************************************
894BOOL WIN32API UpdateWindow(HWND hwnd)
895{
896 RECT rect;
897
898#ifdef DEBUG
899 WriteLog("USER32: UpdateWindow\n");
900#endif
901
902#if 0 // EB: ->>> doesn't work. No correct update of Winhlp32 scrolling area.
903 if(O32_GetUpdateRect(hwnd, &rect, FALSE) != FALSE) {//update region empty?
904 WndCallback(hwnd, WM_PAINT, 0, 0);
905// O32_PostMessage(hwnd, WM_PAINT, 0, 0);
906 }
907#ifdef DEBUG
908 else WriteLog("USER32: Update region empty!\n");
909#endif
910 return(TRUE);
911#endif
912
913 return O32_UpdateWindow(hwnd);
914}
915//******************************************************************************
916//******************************************************************************
917BOOL WIN32API AdjustWindowRect( PRECT arg1, DWORD arg2, BOOL arg3)
918{
919#ifdef DEBUG
920 WriteLog("USER32: AdjustWindowRect\n");
921#endif
922 return O32_AdjustWindowRect(arg1, arg2, arg3);
923}
924//******************************************************************************
925//******************************************************************************
926BOOL WIN32API AdjustWindowRectEx( PRECT arg1, DWORD arg2, BOOL arg3, DWORD arg4)
927{
928#ifdef DEBUG
929 WriteLog("USER32: AdjustWindowRectEx\n");
930#endif
931 return O32_AdjustWindowRectEx(arg1, arg2, arg3, arg4);
932}
933//******************************************************************************
934//******************************************************************************
935BOOL WIN32API ClientToScreen( HWND arg1, PPOINT arg2)
936{
937#ifdef DEBUG
938//// WriteLog("USER32: ClientToScreen\n");
939#endif
940 return O32_ClientToScreen(arg1, arg2);
941}
942//******************************************************************************
943//******************************************************************************
944BOOL WIN32API SetRect( PRECT arg1, int arg2, int arg3, int arg4, int arg5)
945{
946#ifdef DEBUG
947 WriteLog("USER32: SetRect\n");
948#endif
949 return O32_SetRect(arg1, arg2, arg3, arg4, arg5);
950}
951//******************************************************************************
952//******************************************************************************
953BOOL WIN32API SetDlgItemInt( HWND arg1, int arg2, UINT arg3, BOOL arg4)
954{
955#ifdef DEBUG
956 WriteLog("USER32: SetDlgItemInt\n");
957#endif
958 return O32_SetDlgItemInt(arg1, arg2, arg3, arg4);
959}
960//******************************************************************************
961//******************************************************************************
962BOOL WIN32API SetDlgItemTextA( HWND arg1, int arg2, LPCSTR arg3)
963{
964#ifdef DEBUG
965 WriteLog("USER32: SetDlgItemText to %s\n", arg3);
966#endif
967 return O32_SetDlgItemText(arg1, arg2, arg3);
968}
969//******************************************************************************
970//******************************************************************************
971BOOL WIN32API WinHelpA( HWND arg1, LPCSTR arg2, UINT arg3, DWORD arg4)
972{
973#ifdef DEBUG
974 WriteLog("USER32: WinHelp not implemented %s\n", arg2);
975#endif
976// return O32_WinHelp(arg1, arg2, arg3, arg4);
977 return(TRUE);
978}
979//******************************************************************************
980//******************************************************************************
981BOOL WIN32API IsIconic( HWND arg1)
982{
983#ifdef DEBUG
984 WriteLog("USER32: IsIconic\n");
985#endif
986 return O32_IsIconic(arg1);
987}
988//******************************************************************************
989//******************************************************************************
990int WIN32API TranslateAcceleratorA(HWND arg1, HACCEL arg2, LPMSG arg3)
991{
992#ifdef DEBUG
993//// WriteLog("USER32: TranslateAccelerator\n");
994#endif
995 return O32_TranslateAccelerator(arg1, arg2, arg3);
996}
997//******************************************************************************
998//******************************************************************************
999HWND WIN32API GetWindow(HWND arg1, UINT arg2)
1000{
1001 HWND rc;
1002
1003 rc = O32_GetWindow(arg1, arg2);
1004#ifdef DEBUG
1005 WriteLog("USER32: GetWindow %X %d returned %d\n", arg1, arg2, rc);
1006#endif
1007 return(rc);
1008}
1009//******************************************************************************
1010//******************************************************************************
1011HDC WIN32API GetWindowDC(HWND arg1)
1012{
1013#ifdef DEBUG
1014 WriteLog("USER32: GetWindowDC\n");
1015#endif
1016 return O32_GetWindowDC(arg1);
1017}
1018//******************************************************************************
1019//******************************************************************************
1020BOOL WIN32API SubtractRect( PRECT arg1, const RECT * arg2, const RECT * arg3)
1021{
1022#ifdef DEBUG
1023 WriteLog("USER32: SubtractRect");
1024#endif
1025 return O32_SubtractRect(arg1, arg2, arg3);
1026}
1027//******************************************************************************
1028//SvL: 24-6-'97 - Added
1029//******************************************************************************
1030BOOL WIN32API ClipCursor(const RECT * arg1)
1031{
1032#ifdef DEBUG
1033 WriteLog("USER32: ClipCursor\n");
1034#endif
1035 return O32_ClipCursor(arg1);
1036}
1037//******************************************************************************
1038//SvL: 24-6-'97 - Added
1039//TODO: Not implemented
1040//******************************************************************************
1041WORD WIN32API GetAsyncKeyState(INT nVirtKey)
1042{
1043#ifdef DEBUG
1044//// WriteLog("USER32: GetAsyncKeyState Not implemented\n");
1045#endif
1046 return 0;
1047}
1048//******************************************************************************
1049//SvL: 24-6-'97 - Added
1050//******************************************************************************
1051HCURSOR WIN32API GetCursor(void)
1052{
1053#ifdef DEBUG
1054//// WriteLog("USER32: GetCursor\n");
1055#endif
1056 return O32_GetCursor();
1057}
1058//******************************************************************************
1059//SvL: 24-6-'97 - Added
1060//******************************************************************************
1061BOOL WIN32API GetCursorPos( PPOINT arg1)
1062{
1063#ifdef DEBUG
1064//// WriteLog("USER32: GetCursorPos\n");
1065#endif
1066 return O32_GetCursorPos(arg1);
1067}
1068//******************************************************************************
1069//SvL: 24-6-'97 - Added
1070//******************************************************************************
1071UINT WIN32API RegisterWindowMessageA(LPCSTR arg1)
1072{
1073 UINT rc;
1074
1075 rc = O32_RegisterWindowMessage(arg1);
1076#ifdef DEBUG
1077 WriteLog("USER32: RegisterWindowMessageA %s returned %X\n", arg1, rc);
1078#endif
1079 return(rc);
1080}
1081//******************************************************************************
1082//SvL: 24-6-'97 - Added
1083//******************************************************************************
1084WORD WIN32API VkKeyScanA( char arg1)
1085{
1086#ifdef DEBUG
1087 WriteLog("USER32: VkKeyScanA\n");
1088#endif
1089 return O32_VkKeyScan(arg1);
1090}
1091//******************************************************************************
1092//SvL: 24-6-'97 - Added
1093//******************************************************************************
1094SHORT WIN32API GetKeyState( int arg1)
1095{
1096#ifdef DEBUG
1097 WriteLog("USER32: GetKeyState %d\n", arg1);
1098#endif
1099 return O32_GetKeyState(arg1);
1100}
1101//******************************************************************************
1102//******************************************************************************
1103HCURSOR WIN32API SetCursor( HCURSOR arg1)
1104{
1105#ifdef DEBUG
1106 WriteLog("USER32: SetCursor\n");
1107#endif
1108 return O32_SetCursor(arg1);
1109}
1110//******************************************************************************
1111//******************************************************************************
1112BOOL WIN32API SetCursorPos( int arg1, int arg2)
1113{
1114#ifdef DEBUG
1115 WriteLog("USER32: SetCursorPos\n");
1116#endif
1117 return O32_SetCursorPos(arg1, arg2);
1118}
1119//******************************************************************************
1120//******************************************************************************
1121BOOL WIN32API EnableScrollBar( HWND arg1, INT arg2, UINT arg3)
1122{
1123#ifdef DEBUG
1124 WriteLog("USER32: EnableScrollBar\n");
1125#endif
1126 return O32_EnableScrollBar(arg1, arg2, arg3);
1127}
1128//******************************************************************************
1129//******************************************************************************
1130BOOL WIN32API EnableWindow( HWND arg1, BOOL arg2)
1131{
1132#ifdef DEBUG
1133 WriteLog("USER32: EnableWindow\n");
1134#endif
1135 return O32_EnableWindow(arg1, arg2);
1136}
1137//******************************************************************************
1138//******************************************************************************
1139HWND WIN32API SetCapture( HWND arg1)
1140{
1141#ifdef DEBUG
1142 WriteLog("USER32: SetCapture\n");
1143#endif
1144 return O32_SetCapture(arg1);
1145}
1146//******************************************************************************
1147//******************************************************************************
1148BOOL WIN32API ReleaseCapture(void)
1149{
1150#ifdef DEBUG
1151 WriteLog("USER32: ReleaseCapture\n");
1152#endif
1153 return O32_ReleaseCapture();
1154}
1155//******************************************************************************
1156//******************************************************************************
1157DWORD WIN32API MsgWaitForMultipleObjects( DWORD arg1, LPHANDLE arg2, BOOL arg3, DWORD arg4, DWORD arg5)
1158{
1159#ifdef DEBUG
1160 WriteLog("USER32: MsgWaitForMultipleObjects\n");
1161#endif
1162 return O32_MsgWaitForMultipleObjects(arg1, arg2, arg3, arg4, arg5);
1163}
1164//******************************************************************************
1165//******************************************************************************
1166HDWP WIN32API BeginDeferWindowPos( int arg1)
1167{
1168#ifdef DEBUG
1169 WriteLog("USER32: BeginDeferWindowPos\n");
1170#endif
1171 return O32_BeginDeferWindowPos(arg1);
1172}
1173//******************************************************************************
1174//******************************************************************************
1175BOOL WIN32API BringWindowToTop( HWND arg1)
1176{
1177#ifdef DEBUG
1178 WriteLog("USER32: BringWindowToTop\n");
1179#endif
1180 return O32_BringWindowToTop(arg1);
1181}
1182//******************************************************************************
1183//******************************************************************************
1184BOOL WIN32API CallMsgFilterA( LPMSG arg1, int arg2)
1185{
1186#ifdef DEBUG
1187 WriteLog("USER32: CallMsgFilterA\n");
1188#endif
1189 return O32_CallMsgFilter(arg1, arg2);
1190}
1191//******************************************************************************
1192//******************************************************************************
1193BOOL WIN32API CallMsgFilterW( LPMSG arg1, int arg2)
1194{
1195#ifdef DEBUG
1196 WriteLog("USER32: CallMsgFilterW\n");
1197#endif
1198 // NOTE: This will not work as is (needs UNICODE support)
1199 return O32_CallMsgFilter(arg1, arg2);
1200}
1201//******************************************************************************
1202//******************************************************************************
1203LRESULT WIN32API CallWindowProcA(WNDPROC wndprcPrev,
1204 HWND arg2,
1205 UINT arg3,
1206 WPARAM arg4,
1207 LPARAM arg5)
1208{
1209#ifdef DEBUG
1210//// WriteLog("USER32: CallWindowProcA %X hwnd=%X, msg = %X\n", wndprcPrev, arg2, arg3);
1211#endif
1212
1213 return wndprcPrev(arg2, arg3, arg4, arg5); //win32 callback (__stdcall)
1214}
1215//******************************************************************************
1216//******************************************************************************
1217LRESULT WIN32API CallWindowProcW(WNDPROC arg1,
1218 HWND arg2,
1219 UINT arg3,
1220 WPARAM arg4,
1221 LPARAM arg5)
1222{
1223 dprintf(("USER32: CallWindowProcW(%08xh,%08xh,%08xh,%08xh,%08xh) not properly implemented.\n",
1224 arg1,
1225 arg2,
1226 arg3,
1227 arg4,
1228 arg5));
1229
1230 return CallWindowProcA(arg1,
1231 arg2,
1232 arg3,
1233 arg4,
1234 arg5);
1235}
1236//******************************************************************************
1237//******************************************************************************
1238BOOL WIN32API ChangeClipboardChain( HWND arg1, HWND arg2)
1239{
1240#ifdef DEBUG
1241 WriteLog("USER32: ChangeClipboardChain\n");
1242#endif
1243 return O32_ChangeClipboardChain(arg1, arg2);
1244}
1245//******************************************************************************
1246//******************************************************************************
1247UINT WIN32API ArrangeIconicWindows( HWND arg1)
1248{
1249#ifdef DEBUG
1250 WriteLog("USER32: ArrangeIconicWindows\n");
1251#endif
1252 return O32_ArrangeIconicWindows(arg1);
1253}
1254//******************************************************************************
1255// Not implemented by Open32 (5-31-99 Christoph Bratschi)
1256//******************************************************************************
1257BOOL WIN32API CheckRadioButton( HWND arg1, UINT arg2, UINT arg3, UINT arg4)
1258{
1259#ifdef DEBUG
1260 WriteLog("USER32: CheckRadioButton\n");
1261#endif
1262// return O32_CheckRadioButton(arg1, arg2, arg3, arg4);
1263 if (arg2 > arg3) return (FALSE);
1264 for (UINT x=arg2;x <= arg3;x++)
1265 {
1266 SendDlgItemMessageA(arg1,x,BM_SETCHECK,(x == arg4) ? BST_CHECKED : BST_UNCHECKED,0);
1267 }
1268 return (TRUE);
1269}
1270//******************************************************************************
1271//******************************************************************************
1272HWND WIN32API ChildWindowFromPoint( HWND arg1, POINT arg2)
1273{
1274#ifdef DEBUG
1275 WriteLog("USER32: ChildWindowFromPoint\n");
1276#endif
1277 return O32_ChildWindowFromPoint(arg1, arg2);
1278}
1279//******************************************************************************
1280//******************************************************************************
1281HWND WIN32API ChildWindowFromPointEx(HWND arg1, POINT arg2, UINT uFlags)
1282{
1283#ifdef DEBUG
1284 WriteLog("USER32: ChildWindowFromPointEx, not completely supported!\n");
1285#endif
1286 return O32_ChildWindowFromPoint(arg1, arg2);
1287}
1288//******************************************************************************
1289//******************************************************************************
1290BOOL WIN32API CloseClipboard(void)
1291{
1292#ifdef DEBUG
1293 WriteLog("USER32: CloseClipboard\n");
1294#endif
1295 return O32_CloseClipboard();
1296}
1297//******************************************************************************
1298//******************************************************************************
1299BOOL WIN32API CloseWindow( HWND arg1)
1300{
1301#ifdef DEBUG
1302 WriteLog("USER32: CloseWindow\n");
1303#endif
1304 return O32_CloseWindow(arg1);
1305}
1306//******************************************************************************
1307//******************************************************************************
1308HICON WIN32API CopyIcon( HICON arg1)
1309{
1310#ifdef DEBUG
1311 WriteLog("USER32: CopyIcon\n");
1312#endif
1313 return O32_CopyIcon(arg1);
1314}
1315//******************************************************************************
1316//******************************************************************************
1317int WIN32API CountClipboardFormats(void)
1318{
1319#ifdef DEBUG
1320 WriteLog("USER32: CountClipboardFormats\n");
1321#endif
1322 return O32_CountClipboardFormats();
1323}
1324//******************************************************************************
1325//******************************************************************************
1326HACCEL WIN32API CreateAcceleratorTableA( LPACCEL arg1, int arg2)
1327{
1328#ifdef DEBUG
1329 WriteLog("USER32: CreateAcceleratorTableA\n");
1330#endif
1331 return O32_CreateAcceleratorTable(arg1, arg2);
1332}
1333//******************************************************************************
1334//******************************************************************************
1335HACCEL WIN32API CreateAcceleratorTableW( LPACCEL arg1, int arg2)
1336{
1337#ifdef DEBUG
1338 WriteLog("USER32: CreateAcceleratorTableW\n");
1339#endif
1340 // NOTE: This will not work as is (needs UNICODE support)
1341 return O32_CreateAcceleratorTable(arg1, arg2);
1342}
1343//******************************************************************************
1344//******************************************************************************
1345BOOL WIN32API CreateCaret( HWND arg1, HBITMAP arg2, int arg3, int arg4)
1346{
1347#ifdef DEBUG
1348 WriteLog("USER32: CreateCaret\n");
1349#endif
1350 return O32_CreateCaret(arg1, arg2, arg3, arg4);
1351}
1352//******************************************************************************
1353//******************************************************************************
1354HCURSOR WIN32API CreateCursor( HINSTANCE arg1, int arg2, int arg3, int arg4, int arg5, const VOID * arg6, const VOID * arg7)
1355{
1356#ifdef DEBUG
1357 WriteLog("USER32: CreateCursor\n");
1358#endif
1359 return O32_CreateCursor(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
1360}
1361//******************************************************************************
1362//******************************************************************************
1363HICON WIN32API CreateIcon( HINSTANCE arg1, INT arg2, INT arg3, BYTE arg4, BYTE arg5, LPCVOID arg6, LPCVOID arg7)
1364{
1365#ifdef DEBUG
1366 WriteLog("USER32: CreateIcon\n");
1367#endif
1368 return O32_CreateIcon(arg1, arg2, arg3, arg4, arg5, (const BYTE *)arg6, (const BYTE *)arg7);
1369}
1370//******************************************************************************
1371//ASSERT dwVer == win31 (ok according to SDK docs)
1372//******************************************************************************
1373HICON WIN32API CreateIconFromResource(PBYTE presbits, UINT dwResSize,
1374 BOOL fIcon, DWORD dwVer)
1375{
1376 HICON hicon;
1377 DWORD OS2ResSize = 0;
1378 PBYTE OS2Icon = ConvertWin32Icon(presbits, dwResSize, &OS2ResSize);
1379
1380 hicon = O32_CreateIconFromResource(OS2Icon, OS2ResSize, fIcon, dwVer);
1381#ifdef DEBUG
1382 WriteLog("USER32: CreateIconFromResource returned %X (%X)\n", hicon, GetLastError());
1383#endif
1384 if(OS2Icon)
1385 FreeIcon(OS2Icon);
1386
1387 return(hicon);
1388}
1389//******************************************************************************
1390//******************************************************************************
1391HICON WIN32API CreateIconFromResourceEx(PBYTE presbits, UINT dwResSize,
1392 BOOL fIcon, DWORD dwVer,
1393 int cxDesired, int cyDesired,
1394 UINT Flags)
1395{
1396#ifdef DEBUG
1397 WriteLog("USER32: CreateIconFromResourceEx %X %d %d %X %d %d %X, not completely supported!\n", presbits, dwResSize, fIcon, dwVer, cxDesired, cyDesired, Flags);
1398#endif
1399 return CreateIconFromResource(presbits, dwResSize, fIcon, dwVer);
1400}
1401//******************************************************************************
1402//******************************************************************************
1403HICON WIN32API CreateIconIndirect(LPICONINFO arg1)
1404{
1405#ifdef DEBUG
1406 WriteLog("USER32: CreateIconIndirect\n");
1407#endif
1408 return O32_CreateIconIndirect(arg1);
1409}
1410//******************************************************************************
1411//******************************************************************************
1412HWND WIN32API CreateMDIWindowA(LPCSTR arg1, LPCSTR arg2, DWORD arg3,
1413 int arg4, int arg5, int arg6, int arg7,
1414 HWND arg8, HINSTANCE arg9, LPARAM arg10)
1415{
1416 HWND hwnd;
1417
1418#ifdef DEBUG
1419 WriteLog("USER32: CreateMDIWindowA\n");
1420#endif
1421 Win32WindowProc *window = new Win32WindowProc(arg9, arg1);
1422 hwnd = O32_CreateMDIWindow((LPSTR)arg1, (LPSTR)arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
1423 //SvL: 16-11-'97: window can be already destroyed if hwnd == 0
1424 if(hwnd == 0 && window != 0 && Win32WindowProc::FindWindowProc(window)) {
1425 delete(window);
1426 window = 0;
1427 }
1428
1429#ifdef DEBUG
1430 WriteLog("USER32: CreateMDIWindowA returned %X\n", hwnd);
1431#endif
1432 return hwnd;
1433}
1434//******************************************************************************
1435//******************************************************************************
1436HWND WIN32API CreateMDIWindowW(LPCWSTR arg1, LPCWSTR arg2, DWORD arg3, int arg4,
1437 int arg5, int arg6, int arg7, HWND arg8, HINSTANCE arg9,
1438 LPARAM arg10)
1439{
1440 HWND hwnd;
1441 char *astring1 = NULL, *astring2 = NULL;
1442 Win32WindowProc *window = NULL;
1443
1444 if((int)arg1 >> 16 != 0) {
1445 astring1 = UnicodeToAsciiString((LPWSTR)arg1);
1446 }
1447 else astring1 = (char *)arg2;
1448
1449 astring2 = UnicodeToAsciiString((LPWSTR)arg2);
1450
1451 //Classname might be name of system class, in which case we don't
1452 //need to use our own callback
1453// if(Win32WindowClass::FindClass((LPSTR)astring1) != NULL) {
1454 window = new Win32WindowProc(arg9, astring1);
1455// }
1456 hwnd = O32_CreateMDIWindow(astring1, astring2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
1457 //SvL: 16-11-'97: window can be already destroyed if hwnd == 0
1458 if(hwnd == 0 && window != 0 && Win32WindowProc::FindWindowProc(window)) {
1459 delete(window);
1460 window = 0;
1461 }
1462 if(window) {
1463 window->SetWindowHandle(hwnd);
1464 }
1465
1466 if(astring1) FreeAsciiString(astring1);
1467 FreeAsciiString(astring2);
1468#ifdef DEBUG
1469 WriteLog("USER32: CreateMDIWindowW hwnd = %X\n", hwnd);
1470#endif
1471 return(hwnd);
1472}
1473//******************************************************************************
1474//******************************************************************************
1475HWND WIN32API CreateWindowExW(DWORD arg1,
1476 LPCWSTR arg2,
1477 LPCWSTR arg3,
1478 DWORD dwStyle,
1479 int arg5,
1480 int arg6,
1481 int arg7,
1482 int arg8,
1483 HWND arg9,
1484 HMENU arg10,
1485 HINSTANCE arg11,
1486 PVOID arg12)
1487{
1488 HWND hwnd;
1489 char *astring1 = NULL,
1490 *astring2 = NULL;
1491 Win32WindowProc *window = NULL;
1492
1493 /* @@@PH 98/06/21 changed to call OS2CreateWindowExA */
1494 if(HIWORD(arg2) != 0)
1495 astring1 = UnicodeToAsciiString((LPWSTR)arg2);
1496 else
1497 astring1 = (char *)arg2;
1498
1499 astring2 = UnicodeToAsciiString((LPWSTR)arg3);
1500
1501#ifdef DEBUG
1502 WriteLog("USER32: CreateWindowExW: dwExStyle = %X\n", arg1);
1503 if((int)arg2 >> 16 != 0)
1504 WriteLog("USER32: CreateWindow: classname = %s\n", astring1);
1505 else WriteLog("USER32: CreateWindow: classname = %X\n", arg2);
1506 WriteLog("USER32: CreateWindow: windowname= %s\n", astring2);
1507 WriteLog("USER32: CreateWindow: dwStyle = %X\n", dwStyle);
1508 WriteLog("USER32: CreateWindow: x = %d\n", arg5);
1509 WriteLog("USER32: CreateWindow: y = %d\n", arg6);
1510 WriteLog("USER32: CreateWindow: nWidth = %d\n", arg7);
1511 WriteLog("USER32: CreateWindow: nHeight = %d\n", arg8);
1512 WriteLog("USER32: CreateWindow: parent = %X\n", arg9);
1513 WriteLog("USER32: CreateWindow: hwmenu = %X\n", arg10);
1514 WriteLog("USER32: CreateWindow: hinstance = %X\n", arg11);
1515 WriteLog("USER32: CreateWindow: param = %X\n", arg12);
1516 #endif
1517
1518 hwnd = CreateWindowExA(arg1,
1519 astring1,
1520 astring2,
1521 dwStyle,
1522 arg5,
1523 arg6,
1524 arg7,
1525 arg8,
1526 arg9,
1527 arg10,
1528 arg11,
1529 arg12);
1530
1531 if(astring1)
1532 FreeAsciiString(astring1);
1533
1534 if(HIWORD(arg2) != 0)
1535 FreeAsciiString(astring2);
1536
1537#ifdef DEBUG
1538 WriteLog("USER32: ************CreateWindowExW hwnd = %X (%X)\n", hwnd, GetLastError());
1539#endif
1540 return(hwnd);
1541}
1542//******************************************************************************
1543//******************************************************************************
1544HDWP WIN32API DeferWindowPos( HDWP arg1, HWND arg2, HWND arg3, int arg4, int arg5, int arg6, int arg7, UINT arg8)
1545{
1546#ifdef DEBUG
1547 WriteLog("USER32: DeferWindowPos\n");
1548#endif
1549 return O32_DeferWindowPos(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
1550}
1551//******************************************************************************
1552//******************************************************************************
1553BOOL WIN32API DestroyAcceleratorTable( HACCEL arg1)
1554{
1555#ifdef DEBUG
1556 WriteLog("USER32: DestroyAcceleratorTable\n");
1557#endif
1558 return O32_DestroyAcceleratorTable(arg1);
1559}
1560//******************************************************************************
1561//******************************************************************************
1562BOOL WIN32API DestroyCaret(void)
1563{
1564#ifdef DEBUG
1565 WriteLog("USER32: DestroyCaret\n");
1566#endif
1567 return O32_DestroyCaret();
1568}
1569//******************************************************************************
1570//******************************************************************************
1571BOOL WIN32API DestroyCursor( HCURSOR arg1)
1572{
1573#ifdef DEBUG
1574 WriteLog("USER32: DestroyCursor\n");
1575#endif
1576 return O32_DestroyCursor(arg1);
1577}
1578//******************************************************************************
1579//******************************************************************************
1580BOOL WIN32API DestroyIcon( HICON arg1)
1581{
1582#ifdef DEBUG
1583 WriteLog("USER32: DestroyIcon\n");
1584#endif
1585 return O32_DestroyIcon(arg1);
1586}
1587//******************************************************************************
1588//******************************************************************************
1589LONG WIN32API DispatchMessageW( const MSG * arg1)
1590{
1591#ifdef DEBUG
1592 WriteLog("USER32: DispatchMessageW\n");
1593#endif
1594 // NOTE: This will not work as is (needs UNICODE support)
1595 return O32_DispatchMessage(arg1);
1596}
1597//******************************************************************************
1598//******************************************************************************
1599int WIN32API DlgDirListA( HWND arg1, LPSTR arg2, int arg3, int arg4, UINT arg5)
1600{
1601#ifdef DEBUG
1602 WriteLog("USER32: DlgDirListA\n");
1603#endif
1604 return O32_DlgDirList(arg1, arg2, arg3, arg4, arg5);
1605}
1606//******************************************************************************
1607//******************************************************************************
1608int WIN32API DlgDirListComboBoxA( HWND arg1, LPSTR arg2, int arg3, int arg4, UINT arg5)
1609{
1610#ifdef DEBUG
1611 WriteLog("USER32: DlgDirListComboBoxA\n");
1612#endif
1613 return O32_DlgDirListComboBox(arg1, arg2, arg3, arg4, arg5);
1614}
1615//******************************************************************************
1616//******************************************************************************
1617int WIN32API DlgDirListComboBoxW( HWND arg1, LPWSTR arg2, int arg3, int arg4, UINT arg5)
1618{
1619#ifdef DEBUG
1620 WriteLog("USER32: DlgDirListComboBoxW NOT WORKING\n");
1621#endif
1622 // NOTE: This will not work as is (needs UNICODE support)
1623 return 0;
1624// return O32_DlgDirListComboBox(arg1, arg2, arg3, arg4, arg5);
1625}
1626//******************************************************************************
1627//******************************************************************************
1628int WIN32API DlgDirListW( HWND arg1, LPWSTR arg2, int arg3, int arg4, UINT arg5)
1629{
1630#ifdef DEBUG
1631 WriteLog("USER32: DlgDirListW NOT WORKING\n");
1632#endif
1633 // NOTE: This will not work as is (needs UNICODE support)
1634 return 0;
1635// return O32_DlgDirList(arg1, arg2, arg3, arg4, arg5);
1636}
1637//******************************************************************************
1638//******************************************************************************
1639BOOL WIN32API DlgDirSelectComboBoxExA( HWND arg1, LPSTR arg2, int arg3, int arg4)
1640{
1641#ifdef DEBUG
1642 WriteLog("USER32: DlgDirSelectComboBoxExA\n");
1643#endif
1644 return O32_DlgDirSelectComboBoxEx(arg1, arg2, arg3, arg4);
1645}
1646//******************************************************************************
1647//******************************************************************************
1648BOOL WIN32API DlgDirSelectComboBoxExW( HWND arg1, LPWSTR arg2, int arg3, int arg4)
1649{
1650#ifdef DEBUG
1651 WriteLog("USER32: DlgDirSelectComboBoxExW NOT WORKING\n");
1652#endif
1653 // NOTE: This will not work as is (needs UNICODE support)
1654 return 0;
1655// return O32_DlgDirSelectComboBoxEx(arg1, arg2, arg3, arg4);
1656}
1657//******************************************************************************
1658//******************************************************************************
1659BOOL WIN32API DlgDirSelectExA( HWND arg1, LPSTR arg2, int arg3, int arg4)
1660{
1661#ifdef DEBUG
1662 WriteLog("USER32: DlgDirSelectExA\n");
1663#endif
1664 return O32_DlgDirSelectEx(arg1, arg2, arg3, arg4);
1665}
1666//******************************************************************************
1667//******************************************************************************
1668BOOL WIN32API DlgDirSelectExW( HWND arg1, LPWSTR arg2, int arg3, int arg4)
1669{
1670#ifdef DEBUG
1671 WriteLog("USER32: DlgDirSelectExW NOT WORKING\n");
1672#endif
1673 // NOTE: This will not work as is (needs UNICODE support)
1674 return 0;
1675// return O32_DlgDirSelectEx(arg1, arg2, arg3, arg4);
1676}
1677//******************************************************************************
1678//******************************************************************************
1679BOOL WIN32API DrawFocusRect( HDC arg1, const RECT * arg2)
1680{
1681#ifdef DEBUG
1682 WriteLog("USER32: DrawFocusRect\n");
1683#endif
1684 return O32_DrawFocusRect(arg1, arg2);
1685}
1686//******************************************************************************
1687//******************************************************************************
1688BOOL WIN32API DrawIcon( HDC arg1, int arg2, int arg3, HICON arg4)
1689{
1690#ifdef DEBUG
1691 WriteLog("USER32: DrawIcon\n");
1692#endif
1693 return O32_DrawIcon(arg1, arg2, arg3, arg4);
1694}
1695//******************************************************************************
1696//******************************************************************************
1697BOOL WIN32API DrawIconEx(HDC hdc, int xLeft, int xRight, HICON hIcon,
1698 int cxWidth, int cyWidth, UINT istepIfAniCur,
1699 HBRUSH hbrFlickerFreeDraw, UINT diFlags)
1700{
1701#ifdef DEBUG
1702 WriteLog("USER32: DrawIcon, partially implemented\n");
1703#endif
1704 return O32_DrawIcon(hdc, xLeft, xRight, hIcon);
1705}
1706//******************************************************************************
1707//******************************************************************************
1708BOOL WIN32API DrawMenuBar( HWND arg1)
1709{
1710#ifdef DEBUG
1711 WriteLog("USER32: DrawMenuBar\n");
1712#endif
1713 return O32_DrawMenuBar(arg1);
1714}
1715//******************************************************************************
1716//******************************************************************************
1717int WIN32API DrawTextW( HDC arg1, LPCWSTR arg2, int arg3, PRECT arg4, UINT arg5)
1718{
1719 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
1720 int rc;
1721
1722#ifdef DEBUG
1723 WriteLog("USER32: DrawTextW %s\n", astring);
1724#endif
1725 rc = O32_DrawText(arg1, astring, arg3, arg4, arg5);
1726 FreeAsciiString(astring);
1727 return(rc);
1728}
1729//******************************************************************************
1730//******************************************************************************
1731int WIN32API DrawTextExW(HDC arg1, LPCWSTR arg2, int arg3, PRECT arg4, UINT arg5, LPDRAWTEXTPARAMS lpDTParams)
1732{
1733 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
1734 int rc;
1735
1736#ifdef DEBUG
1737 WriteLog("USER32: DrawTextExW (not completely supported) %s\n", astring);
1738#endif
1739 rc = O32_DrawText(arg1, astring, arg3, arg4, arg5);
1740 FreeAsciiString(astring);
1741 return(rc);
1742}
1743//******************************************************************************
1744//******************************************************************************
1745BOOL WIN32API EmptyClipboard(void)
1746{
1747#ifdef DEBUG
1748 WriteLog("USER32: EmptyClipboard\n");
1749#endif
1750 return O32_EmptyClipboard();
1751}
1752//******************************************************************************
1753//******************************************************************************
1754BOOL WIN32API EndDeferWindowPos( HDWP arg1)
1755{
1756#ifdef DEBUG
1757 WriteLog("USER32: EndDeferWindowPos\n");
1758#endif
1759 return O32_EndDeferWindowPos(arg1);
1760}
1761//******************************************************************************
1762//******************************************************************************
1763BOOL WIN32API EnumChildWindows(HWND hwnd, WNDENUMPROC lpfn, LPARAM lParam)
1764{
1765 BOOL rc;
1766 EnumWindowCallback *callback = new EnumWindowCallback(lpfn, lParam);
1767
1768#ifdef DEBUG
1769 WriteLog("USER32: EnumChildWindows\n");
1770#endif
1771 rc = O32_EnumChildWindows(hwnd, callback->GetOS2Callback(), (LPARAM)callback);
1772 if(callback)
1773 delete callback;
1774 return(rc);
1775}
1776//******************************************************************************
1777//******************************************************************************
1778UINT WIN32API EnumClipboardFormats(UINT arg1)
1779{
1780#ifdef DEBUG
1781 WriteLog("USER32: EnumClipboardFormats\n");
1782#endif
1783 return O32_EnumClipboardFormats(arg1);
1784}
1785//******************************************************************************
1786//******************************************************************************
1787int WIN32API EnumPropsA(HWND arg1, PROPENUMPROCA arg2)
1788{
1789#ifdef DEBUG
1790 WriteLog("USER32: EnumPropsA DOES NOT WORK\n");
1791#endif
1792 //calling convention problems
1793 return 0;
1794// return O32_EnumProps(arg1, (PROPENUMPROC_O32)arg2);
1795}
1796//******************************************************************************
1797//******************************************************************************
1798int WIN32API EnumPropsExA( HWND arg1, PROPENUMPROCEXA arg2, LPARAM arg3)
1799{
1800#ifdef DEBUG
1801 WriteLog("USER32: EnumPropsExA DOES NOT WORK\n");
1802#endif
1803 //calling convention problems
1804 return 0;
1805// return O32_EnumPropsEx(arg1, arg2, (PROPENUMPROCEX_O32)arg3);
1806}
1807//******************************************************************************
1808//******************************************************************************
1809int WIN32API EnumPropsExW( HWND arg1, PROPENUMPROCEXW arg2, LPARAM arg3)
1810{
1811#ifdef DEBUG
1812 WriteLog("USER32: EnumPropsExW\n");
1813#endif
1814 // NOTE: This will not work as is (needs UNICODE support)
1815 //calling convention problems
1816 return 0;
1817// return O32_EnumPropsEx(arg1, arg2, arg3);
1818}
1819//******************************************************************************
1820//******************************************************************************
1821int WIN32API EnumPropsW( HWND arg1, PROPENUMPROCW arg2)
1822{
1823#ifdef DEBUG
1824 WriteLog("USER32: EnumPropsW\n");
1825#endif
1826 // NOTE: This will not work as is (needs UNICODE support)
1827 //calling convention problems
1828 return 0;
1829// return O32_EnumProps(arg1, arg2);
1830}
1831//******************************************************************************
1832//******************************************************************************
1833BOOL WIN32API EnumWindows(WNDENUMPROC lpfn, LPARAM lParam)
1834{
1835 BOOL rc;
1836 EnumWindowCallback *callback = new EnumWindowCallback(lpfn, lParam);
1837
1838#ifdef DEBUG
1839 WriteLog("USER32: EnumWindows\n");
1840#endif
1841 rc = O32_EnumWindows(callback->GetOS2Callback(), (LPARAM)callback);
1842 if(callback)
1843 delete callback;
1844 return(rc);
1845}
1846//******************************************************************************
1847//******************************************************************************
1848BOOL WIN32API EqualRect( const RECT * arg1, const RECT * arg2)
1849{
1850#ifdef DEBUG
1851 WriteLog("USER32: EqualRect\n");
1852#endif
1853 return O32_EqualRect(arg1, arg2);
1854}
1855//******************************************************************************
1856//******************************************************************************
1857BOOL WIN32API ExcludeUpdateRgn( HDC arg1, HWND arg2)
1858{
1859#ifdef DEBUG
1860 WriteLog("USER32: ExcludeUpdateRgn\n");
1861#endif
1862 return O32_ExcludeUpdateRgn(arg1, arg2);
1863}
1864//******************************************************************************
1865//******************************************************************************
1866BOOL WIN32API ExitWindowsEx( UINT arg1, DWORD arg2)
1867{
1868#ifdef DEBUG
1869 WriteLog("USER32: ExitWindowsEx\n");
1870#endif
1871 return O32_ExitWindowsEx(arg1, arg2);
1872}
1873//******************************************************************************
1874//******************************************************************************
1875int WIN32API FillRect(HDC arg1, const RECT * arg2, HBRUSH arg3)
1876{
1877#ifdef DEBUG
1878 WriteLog("USER32: FillRect (%d,%d)(%d,%d) brush %X\n", arg2->left, arg2->top, arg2->right, arg2->bottom, arg3);
1879#endif
1880 return O32_FillRect(arg1, arg2, arg3);
1881}
1882//******************************************************************************
1883//******************************************************************************
1884HWND WIN32API FindWindowW( LPCWSTR arg1, LPCWSTR arg2)
1885{
1886 char *astring1 = UnicodeToAsciiString((LPWSTR)arg1);
1887 char *astring2 = UnicodeToAsciiString((LPWSTR)arg2);
1888 HWND rc;
1889
1890#ifdef DEBUG
1891 WriteLog("USER32: FindWindowW\n");
1892#endif
1893 rc = O32_FindWindow(astring1, astring2);
1894 FreeAsciiString(astring1);
1895 FreeAsciiString(astring2);
1896 return rc;
1897}
1898//******************************************************************************
1899//******************************************************************************
1900int WIN32API FrameRect( HDC arg1, const RECT * arg2, HBRUSH arg3)
1901{
1902#ifdef DEBUG
1903 WriteLog("USER32: FrameRect\n");
1904#endif
1905 return O32_FrameRect(arg1, arg2, arg3);
1906}
1907//******************************************************************************
1908//******************************************************************************
1909HWND WIN32API GetCapture(void)
1910{
1911#ifdef DEBUG
1912 WriteLog("USER32: GetCapture\n");
1913#endif
1914 return O32_GetCapture();
1915}
1916//******************************************************************************
1917//******************************************************************************
1918UINT WIN32API GetCaretBlinkTime(void)
1919{
1920#ifdef DEBUG
1921 WriteLog("USER32: GetCaretBlinkTime\n");
1922#endif
1923 return O32_GetCaretBlinkTime();
1924}
1925//******************************************************************************
1926//******************************************************************************
1927BOOL WIN32API GetCaretPos( PPOINT arg1)
1928{
1929#ifdef DEBUG
1930 WriteLog("USER32: GetCaretPos\n");
1931#endif
1932 return O32_GetCaretPos(arg1);
1933}
1934//******************************************************************************
1935//******************************************************************************
1936BOOL WIN32API GetClipCursor( PRECT arg1)
1937{
1938#ifdef DEBUG
1939 WriteLog("USER32: GetClipCursor\n");
1940#endif
1941 return O32_GetClipCursor(arg1);
1942}
1943//******************************************************************************
1944//******************************************************************************
1945HANDLE WIN32API GetClipboardData( UINT arg1)
1946{
1947#ifdef DEBUG
1948 WriteLog("USER32: GetClipboardData\n");
1949#endif
1950 return O32_GetClipboardData(arg1);
1951}
1952//******************************************************************************
1953//******************************************************************************
1954int WIN32API GetClipboardFormatNameA( UINT arg1, LPSTR arg2, int arg3)
1955{
1956#ifdef DEBUG
1957 WriteLog("USER32: GetClipboardFormatNameA %s\n", arg2);
1958#endif
1959 return O32_GetClipboardFormatName(arg1, arg2, arg3);
1960}
1961//******************************************************************************
1962//******************************************************************************
1963int WIN32API GetClipboardFormatNameW(UINT arg1, LPWSTR arg2, int arg3)
1964{
1965 int rc;
1966 char *astring = UnicodeToAsciiString(arg2);
1967
1968#ifdef DEBUG
1969 WriteLog("USER32: GetClipboardFormatNameW %s\n", astring);
1970#endif
1971 rc = O32_GetClipboardFormatName(arg1, astring, arg3);
1972 FreeAsciiString(astring);
1973 return(rc);
1974}
1975//******************************************************************************
1976//******************************************************************************
1977HWND WIN32API GetClipboardOwner(void)
1978{
1979#ifdef DEBUG
1980 WriteLog("USER32: GetClipboardOwner\n");
1981#endif
1982 return O32_GetClipboardOwner();
1983}
1984//******************************************************************************
1985//******************************************************************************
1986HWND WIN32API GetClipboardViewer(void)
1987{
1988#ifdef DEBUG
1989 WriteLog("USER32: GetClipboardViewer\n");
1990#endif
1991 return O32_GetClipboardViewer();
1992}
1993//******************************************************************************
1994//******************************************************************************
1995DWORD WIN32API GetDialogBaseUnits(void)
1996{
1997#ifdef DEBUG
1998 WriteLog("USER32: GetDialogBaseUnits\n");
1999#endif
2000 return O32_GetDialogBaseUnits();
2001}
2002//******************************************************************************
2003//******************************************************************************
2004UINT WIN32API GetDlgItemInt( HWND arg1, int arg2, PBOOL arg3, BOOL arg4)
2005{
2006#ifdef DEBUG
2007 WriteLog("USER32: GetDlgItemInt\n");
2008#endif
2009 return O32_GetDlgItemInt(arg1, arg2, arg3, arg4);
2010}
2011
2012
2013/*****************************************************************************
2014 * Name : UINT WIN32API GetDlgItemTextW
2015 * Purpose : Determine the text of a window control
2016 * Parameters: HWND arg1
2017 * int arg2
2018 * LPWSTR arg3
2019 * UINT arg4
2020 * Variables :
2021 * Result :
2022 * Remark :
2023 * Status : UNTESTED UNKNOWN STUB
2024 *
2025 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2026 *****************************************************************************/
2027
2028UINT WIN32API GetDlgItemTextW(HWND arg1,
2029 int arg2,
2030 LPWSTR arg3,
2031 UINT arg4)
2032{
2033 LPSTR lpBuffer; /* temporary buffer for the ascii result */
2034 UINT uiResult; /* return value of the ascii variant */
2035
2036 dprintf(("USER32: GetDlgItemTextW(%08xh,%08xh,%08xh,%08xh)\n",
2037 arg1,
2038 arg2,
2039 arg3,
2040 arg4));
2041
2042
2043 lpBuffer = (LPSTR)malloc(arg4); /* allocate temporary buffer */
2044 uiResult = GetDlgItemTextA(arg1, /* call ascii variant */
2045 arg2,
2046 lpBuffer,
2047 arg4);
2048
2049 AsciiToUnicodeN(lpBuffer, /* now convert result to unicode */
2050 arg3,
2051 arg4);
2052
2053 free(lpBuffer); /* free the temporary buffer */
2054
2055 return (uiResult); /* OK, that's it */
2056}
2057
2058
2059//******************************************************************************
2060//******************************************************************************
2061UINT WIN32API GetDoubleClickTime(void)
2062{
2063#ifdef DEBUG
2064 WriteLog("USER32: GetDoubleClickTime\n");
2065#endif
2066 return O32_GetDoubleClickTime();
2067}
2068//******************************************************************************
2069//******************************************************************************
2070HWND WIN32API GetForegroundWindow(void)
2071{
2072#ifdef DEBUG
2073 WriteLog("USER32: GetForegroundWindow\n");
2074#endif
2075 return O32_GetForegroundWindow();
2076}
2077//******************************************************************************
2078//******************************************************************************
2079BOOL WIN32API GetIconInfo( HICON arg1, LPICONINFO arg2)
2080{
2081#ifdef DEBUG
2082 WriteLog("USER32: GetIconInfo\n");
2083#endif
2084 return O32_GetIconInfo(arg1, arg2);
2085}
2086//******************************************************************************
2087//******************************************************************************
2088int WIN32API GetKeyNameTextA( LPARAM arg1, LPSTR arg2, int arg3)
2089{
2090#ifdef DEBUG
2091 WriteLog("USER32: GetKeyNameTextA\n");
2092#endif
2093 return O32_GetKeyNameText(arg1, arg2, arg3);
2094}
2095//******************************************************************************
2096//******************************************************************************
2097int WIN32API GetKeyNameTextW( LPARAM arg1, LPWSTR arg2, int arg3)
2098{
2099#ifdef DEBUG
2100 WriteLog("USER32: GetKeyNameTextW DOES NOT WORK\n");
2101#endif
2102 // NOTE: This will not work as is (needs UNICODE support)
2103 return 0;
2104// return O32_GetKeyNameText(arg1, arg2, arg3);
2105}
2106//******************************************************************************
2107//******************************************************************************
2108int WIN32API GetKeyboardType( int arg1)
2109{
2110#ifdef DEBUG
2111 WriteLog("USER32: GetKeyboardType\n");
2112#endif
2113 return O32_GetKeyboardType(arg1);
2114}
2115//******************************************************************************
2116//******************************************************************************
2117HWND WIN32API GetLastActivePopup( HWND arg1)
2118{
2119#ifdef DEBUG
2120 WriteLog("USER32: GetLastActivePopup\n");
2121#endif
2122 return O32_GetLastActivePopup(arg1);
2123}
2124//******************************************************************************
2125//******************************************************************************
2126LONG WIN32API GetMessageExtraInfo(void)
2127{
2128 dprintf(("USER32: GetMessageExtraInfo\n"));
2129 return O32_GetMessageExtraInfo();
2130}
2131//******************************************************************************
2132//******************************************************************************
2133DWORD WIN32API GetMessagePos(void)
2134{
2135 dprintf(("USER32: GetMessagePos\n"));
2136 return O32_GetMessagePos();
2137}
2138//******************************************************************************
2139//******************************************************************************
2140LONG WIN32API GetMessageTime(void)
2141{
2142 dprintf(("USER32: GetMessageTime\n"));
2143 return O32_GetMessageTime();
2144}
2145//******************************************************************************
2146//******************************************************************************
2147BOOL WIN32API GetMessageW(LPMSG arg1, HWND arg2, UINT arg3, UINT arg4)
2148{
2149 BOOL rc;
2150
2151 // NOTE: This will not work as is (needs UNICODE support)
2152 rc = O32_GetMessage(arg1, arg2, arg3, arg4);
2153 dprintf(("USER32: GetMessageW %X returned %d\n", arg2, rc));
2154 return(rc);
2155}
2156//******************************************************************************
2157//******************************************************************************
2158HWND WIN32API GetNextDlgGroupItem( HWND arg1, HWND arg2, BOOL arg3)
2159{
2160#ifdef DEBUG
2161 WriteLog("USER32: GetNextDlgGroupItem\n");
2162#endif
2163 return O32_GetNextDlgGroupItem(arg1, arg2, arg3);
2164}
2165//******************************************************************************
2166//******************************************************************************
2167HWND WIN32API GetOpenClipboardWindow(void)
2168{
2169#ifdef DEBUG
2170 WriteLog("USER32: GetOpenClipboardWindow\n");
2171#endif
2172 return O32_GetOpenClipboardWindow();
2173}
2174//******************************************************************************
2175//******************************************************************************
2176HWND WIN32API GetParent( HWND arg1)
2177{
2178#ifdef DEBUG
2179//// WriteLog("USER32: GetParent\n");
2180#endif
2181 return O32_GetParent(arg1);
2182}
2183//******************************************************************************
2184//******************************************************************************
2185int WIN32API GetPriorityClipboardFormat( PUINT arg1, int arg2)
2186{
2187#ifdef DEBUG
2188 WriteLog("USER32: GetPriorityClipboardFormat\n");
2189#endif
2190 return O32_GetPriorityClipboardFormat(arg1, arg2);
2191}
2192//******************************************************************************
2193//******************************************************************************
2194HANDLE WIN32API GetPropA( HWND arg1, LPCSTR arg2)
2195{
2196#ifdef DEBUG
2197 if((int)arg2 >> 16 != 0)
2198 WriteLog("USER32: GetPropA %s\n", arg2);
2199 else WriteLog("USER32: GetPropA %X\n", arg2);
2200#endif
2201 return O32_GetProp(arg1, arg2);
2202}
2203//******************************************************************************
2204//******************************************************************************
2205HANDLE WIN32API GetPropW(HWND arg1, LPCWSTR arg2)
2206{
2207 BOOL handle;
2208 char *astring;
2209
2210 if((int)arg2 >> 16 != 0)
2211 astring = UnicodeToAsciiString((LPWSTR)arg2);
2212 else astring = (char *)arg2;
2213#ifdef DEBUG
2214 if((int)arg2 >> 16 != 0)
2215 WriteLog("USER32: GetPropW %s\n", astring);
2216 else WriteLog("USER32: GetPropW %X\n", astring);
2217#endif
2218 handle = GetPropA(arg1, (LPCSTR)astring);
2219 if((int)arg2 >> 16 != 0)
2220 FreeAsciiString(astring);
2221
2222 return(handle);
2223}
2224//******************************************************************************
2225//******************************************************************************
2226DWORD WIN32API GetQueueStatus( UINT arg1)
2227{
2228#ifdef DEBUG
2229 WriteLog("USER32: GetQueueStatus\n");
2230#endif
2231 return O32_GetQueueStatus(arg1);
2232}
2233//******************************************************************************
2234//******************************************************************************
2235int WIN32API GetScrollPos(HWND hwnd, int fnBar)
2236{
2237 int pos;
2238
2239 pos = O32_GetScrollPos(hwnd, fnBar);
2240#ifdef DEBUG
2241 WriteLog("USER32: GetScrollPos of %X type %d returned %d\n", hwnd, fnBar, pos);
2242#endif
2243 return(pos);
2244}
2245//******************************************************************************
2246//******************************************************************************
2247BOOL WIN32API GetScrollRange( HWND arg1, int arg2, int * arg3, int * arg4)
2248{
2249#ifdef DEBUG
2250 WriteLog("USER32: GetScrollRange\n");
2251#endif
2252 return O32_GetScrollRange(arg1, arg2, arg3, arg4);
2253}
2254//******************************************************************************
2255//******************************************************************************
2256DWORD WIN32API GetTabbedTextExtentA( HDC arg1, LPCSTR arg2, int arg3, int arg4, int * arg5)
2257{
2258#ifdef DEBUG
2259 WriteLog("USER32: GetTabbedTextExtentA\n");
2260#endif
2261 return O32_GetTabbedTextExtent(arg1, arg2, arg3, arg4, arg5);
2262}
2263//******************************************************************************
2264//******************************************************************************
2265DWORD WIN32API GetTabbedTextExtentW( HDC arg1, LPCWSTR arg2, int arg3, int arg4, int * arg5)
2266{
2267 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
2268 DWORD rc;
2269
2270#ifdef DEBUG
2271 WriteLog("USER32: GetTabbedTextExtentW\n");
2272#endif
2273 rc = O32_GetTabbedTextExtent(arg1, astring, arg3, arg4, arg5);
2274 FreeAsciiString(astring);
2275 return rc;
2276}
2277//******************************************************************************
2278//******************************************************************************
2279HWND WIN32API GetTopWindow( HWND arg1)
2280{
2281#ifdef DEBUG
2282//// WriteLog("USER32: GetTopWindow\n");
2283#endif
2284 return O32_GetTopWindow(arg1);
2285}
2286//******************************************************************************
2287//******************************************************************************
2288int WIN32API GetUpdateRgn( HWND arg1, HRGN arg2, BOOL arg3)
2289{
2290#ifdef DEBUG
2291 WriteLog("USER32: GetUpdateRgn\n");
2292#endif
2293 return O32_GetUpdateRgn(arg1, arg2, arg3);
2294}
2295//******************************************************************************
2296//******************************************************************************
2297BOOL WIN32API GetWindowPlacement( HWND arg1, LPWINDOWPLACEMENT arg2)
2298{
2299#ifdef DEBUG
2300 WriteLog("USER32: GetWindowPlacement\n");
2301#endif
2302 return O32_GetWindowPlacement(arg1, arg2);
2303}
2304//******************************************************************************
2305
2306/***********************************************************************
2307 * GetInternalWindowPos (USER32.245)
2308 */
2309UINT WIN32API GetInternalWindowPos(HWND hwnd,
2310 LPRECT rectWnd,
2311 LPPOINT ptIcon )
2312{
2313 WINDOWPLACEMENT wndpl;
2314
2315 dprintf(("USER32: GetInternalWindowPos(%08xh,%08xh,%08xh)\n",
2316 hwnd,
2317 rectWnd,
2318 ptIcon));
2319
2320 if (O32_GetWindowPlacement( hwnd, &wndpl ))
2321 {
2322 if (rectWnd) *rectWnd = wndpl.rcNormalPosition;
2323 if (ptIcon) *ptIcon = wndpl.ptMinPosition;
2324 return wndpl.showCmd;
2325 }
2326 return 0;
2327}
2328
2329
2330//******************************************************************************
2331int WIN32API GetWindowTextLengthW( HWND arg1)
2332{
2333#ifdef DEBUG
2334 WriteLog("USER32: GetWindowTextLengthW\n");
2335#endif
2336 return O32_GetWindowTextLength(arg1);
2337}
2338//******************************************************************************
2339//******************************************************************************
2340int WIN32API GetWindowTextW(HWND hwnd, LPWSTR lpsz, int cch)
2341{
2342 char title[128];
2343 int rc;
2344
2345 rc = O32_GetWindowText(hwnd, title, sizeof(title));
2346#ifdef DEBUG
2347 WriteLog("USER32: GetWindowTextW returned %s\n", title);
2348#endif
2349 if(rc > cch) {
2350 title[cch-1] = 0;
2351 rc = cch;
2352 }
2353 AsciiToUnicode(title, lpsz);
2354 return(rc);
2355}
2356//******************************************************************************
2357//******************************************************************************
2358DWORD WIN32API GetWindowThreadProcessId(HWND arg1, PDWORD arg2)
2359{
2360#ifdef DEBUG
2361 WriteLog("USER32: GetWindowThreadProcessId\n");
2362#endif
2363 return O32_GetWindowThreadProcessId(arg1, arg2);
2364}
2365//******************************************************************************
2366//******************************************************************************
2367BOOL WIN32API HideCaret( HWND arg1)
2368{
2369#ifdef DEBUG
2370 WriteLog("USER32: HideCaret\n");
2371#endif
2372 return O32_HideCaret(arg1);
2373}
2374//******************************************************************************
2375//******************************************************************************
2376BOOL WIN32API InSendMessage(void)
2377{
2378#ifdef DEBUG
2379 WriteLog("USER32: InSendMessage\n");
2380#endif
2381 return O32_InSendMessage();
2382}
2383//******************************************************************************
2384//******************************************************************************
2385BOOL WIN32API IntersectRect( PRECT arg1, const RECT * arg2, const RECT * arg3)
2386{
2387#ifdef DEBUG
2388//// WriteLog("USER32: IntersectRect\n");
2389#endif
2390 return O32_IntersectRect(arg1, arg2, arg3);
2391}
2392//******************************************************************************
2393//******************************************************************************
2394BOOL WIN32API InvalidateRgn( HWND arg1, HRGN arg2, BOOL arg3)
2395{
2396#ifdef DEBUG
2397 WriteLog("USER32: InvalidateRgn\n");
2398#endif
2399 return O32_InvalidateRgn(arg1, arg2, arg3);
2400}
2401//******************************************************************************
2402//******************************************************************************
2403BOOL WIN32API InvertRect( HDC arg1, const RECT * arg2)
2404{
2405#ifdef DEBUG
2406 WriteLog("USER32: InvertRect\n");
2407#endif
2408 return O32_InvertRect(arg1, arg2);
2409}
2410//******************************************************************************
2411//******************************************************************************
2412BOOL WIN32API IsChild( HWND arg1, HWND arg2)
2413{
2414#ifdef DEBUG
2415 WriteLog("USER32: IsChild\n");
2416#endif
2417 return O32_IsChild(arg1, arg2);
2418}
2419//******************************************************************************
2420//******************************************************************************
2421BOOL WIN32API IsClipboardFormatAvailable( UINT arg1)
2422{
2423#ifdef DEBUG
2424 WriteLog("USER32: IsClipboardFormatAvailable\n");
2425#endif
2426 return O32_IsClipboardFormatAvailable(arg1);
2427}
2428//******************************************************************************
2429//******************************************************************************
2430BOOL WIN32API IsDialogMessageW( HWND arg1, LPMSG arg2)
2431{
2432#ifdef DEBUG
2433 WriteLog("USER32: IsDialogMessageW\n");
2434#endif
2435 // NOTE: This will not work as is (needs UNICODE support)
2436 return O32_IsDialogMessage(arg1, arg2);
2437}
2438
2439//******************************************************************************
2440//******************************************************************************
2441BOOL WIN32API IsRectEmpty( const RECT * arg1)
2442{
2443#ifdef DEBUG
2444 WriteLog("USER32: IsRectEmpty\n");
2445#endif
2446 return O32_IsRectEmpty(arg1);
2447}
2448//******************************************************************************
2449//******************************************************************************
2450BOOL WIN32API IsWindow( HWND arg1)
2451{
2452#ifdef DEBUG
2453 WriteLog("USER32: IsWindow\n");
2454#endif
2455 return O32_IsWindow(arg1);
2456}
2457//******************************************************************************
2458//******************************************************************************
2459BOOL WIN32API IsWindowEnabled( HWND arg1)
2460{
2461#ifdef DEBUG
2462 WriteLog("USER32: IsWindowEnabled\n");
2463#endif
2464 return O32_IsWindowEnabled(arg1);
2465}
2466//******************************************************************************
2467//******************************************************************************
2468BOOL WIN32API IsWindowVisible( HWND arg1)
2469{
2470#ifdef DEBUG
2471 WriteLog("USER32: IsWindowVisible\n");
2472#endif
2473 return O32_IsWindowVisible(arg1);
2474}
2475//******************************************************************************
2476//******************************************************************************
2477BOOL WIN32API IsZoomed( HWND arg1)
2478{
2479#ifdef DEBUG
2480 WriteLog("USER32: IsZoomed\n");
2481#endif
2482 return O32_IsZoomed(arg1);
2483}
2484//******************************************************************************
2485//******************************************************************************
2486BOOL WIN32API LockWindowUpdate( HWND arg1)
2487{
2488#ifdef DEBUG
2489 WriteLog("USER32: LockWindowUpdate\n");
2490#endif
2491 return O32_LockWindowUpdate(arg1);
2492}
2493//******************************************************************************
2494//******************************************************************************
2495BOOL WIN32API MapDialogRect( HWND arg1, PRECT arg2)
2496{
2497#ifdef DEBUG
2498 WriteLog("USER32: MapDialogRect\n");
2499#endif
2500 return O32_MapDialogRect(arg1, arg2);
2501}
2502//******************************************************************************
2503//******************************************************************************
2504UINT WIN32API MapVirtualKeyA( UINT arg1, UINT arg2)
2505{
2506#ifdef DEBUG
2507 WriteLog("USER32: MapVirtualKeyA\n");
2508#endif
2509 return O32_MapVirtualKey(arg1, arg2);
2510}
2511//******************************************************************************
2512//******************************************************************************
2513UINT WIN32API MapVirtualKeyW( UINT arg1, UINT arg2)
2514{
2515#ifdef DEBUG
2516 WriteLog("USER32: MapVirtualKeyW\n");
2517#endif
2518 // NOTE: This will not work as is (needs UNICODE support)
2519 return O32_MapVirtualKey(arg1, arg2);
2520}
2521//******************************************************************************
2522//******************************************************************************
2523int WIN32API MapWindowPoints( HWND arg1, HWND arg2, LPPOINT arg3, UINT arg4)
2524{
2525#ifdef DEBUG
2526 WriteLog("USER32: MapWindowPoints\n");
2527#endif
2528 return O32_MapWindowPoints(arg1, arg2, arg3, arg4);
2529}
2530//******************************************************************************
2531//******************************************************************************
2532int WIN32API MessageBoxW(HWND arg1, LPCWSTR arg2, LPCWSTR arg3, UINT arg4)
2533{
2534 char *astring1, *astring2;
2535 int rc;
2536
2537 astring1 = UnicodeToAsciiString((LPWSTR)arg2);
2538 astring2 = UnicodeToAsciiString((LPWSTR)arg3);
2539#ifdef DEBUG
2540 WriteLog("USER32: MessageBoxW %s %s\n", astring1, astring2);
2541#endif
2542 rc = O32_MessageBox(arg1, astring1, astring2, arg4);
2543 FreeAsciiString(astring1);
2544 FreeAsciiString(astring2);
2545 return(rc);
2546}
2547//******************************************************************************
2548//******************************************************************************
2549BOOL WIN32API OpenClipboard( HWND arg1)
2550{
2551#ifdef DEBUG
2552 WriteLog("USER32: OpenClipboard\n");
2553#endif
2554 return O32_OpenClipboard(arg1);
2555}
2556//******************************************************************************
2557//******************************************************************************
2558BOOL WIN32API PeekMessageW( LPMSG arg1, HWND arg2, UINT arg3, UINT arg4, UINT arg5)
2559{
2560#ifdef DEBUG
2561 WriteLog("USER32: PeekMessageW\n");
2562#endif
2563 // NOTE: This will not work as is (needs UNICODE support)
2564 return O32_PeekMessage(arg1, arg2, arg3, arg4, arg5);
2565}
2566//******************************************************************************
2567//******************************************************************************
2568// NOTE: Open32 function doesn't have the 'W'.
2569BOOL WIN32API PostMessageW( HWND arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
2570{
2571#ifdef DEBUG
2572 WriteLog("USER32: PostMessageW\n");
2573#endif
2574 // NOTE: This will not work as is (needs UNICODE support)
2575 return O32_PostMessage(arg1, arg2, arg3, arg4);
2576}
2577//******************************************************************************
2578//******************************************************************************
2579BOOL WIN32API PostThreadMessageA( DWORD arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
2580{
2581#ifdef DEBUG
2582 WriteLog("USER32: PostThreadMessageA\n");
2583#endif
2584 return O32_PostThreadMessage(arg1, arg2, arg3, arg4);
2585}
2586//******************************************************************************
2587//******************************************************************************
2588BOOL WIN32API PostThreadMessageW( DWORD arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
2589{
2590#ifdef DEBUG
2591 WriteLog("USER32: PostThreadMessageW\n");
2592#endif
2593 // NOTE: This will not work as is (needs UNICODE support)
2594 return O32_PostThreadMessage(arg1, arg2, arg3, arg4);
2595}
2596//******************************************************************************
2597//******************************************************************************
2598BOOL WIN32API PtInRect( const RECT * arg1, POINT arg2)
2599{
2600#ifdef DEBUG1
2601 WriteLog("USER32: PtInRect\n");
2602#endif
2603 return O32_PtInRect(arg1, arg2);
2604}
2605//******************************************************************************
2606//******************************************************************************
2607BOOL WIN32API RedrawWindow( HWND arg1, const RECT * arg2, HRGN arg3, UINT arg4)
2608{
2609 BOOL rc;
2610
2611 rc = O32_RedrawWindow(arg1, arg2, arg3, arg4);
2612#ifdef DEBUG
2613 WriteLog("USER32: RedrawWindow %X , %X, %X, %X returned %d\n", arg1, arg2, arg3, arg4, rc);
2614#endif
2615 InvalidateRect(arg1, arg2, TRUE);
2616 UpdateWindow(arg1);
2617 SendMessageA(arg1, WM_PAINT, 0, 0);
2618 return(rc);
2619}
2620//******************************************************************************
2621//******************************************************************************
2622UINT WIN32API RegisterClipboardFormatA( LPCSTR arg1)
2623{
2624#ifdef DEBUG
2625 WriteLog("USER32: RegisterClipboardFormatA\n");
2626#endif
2627 return O32_RegisterClipboardFormat(arg1);
2628}
2629//******************************************************************************
2630//******************************************************************************
2631UINT WIN32API RegisterClipboardFormatW(LPCWSTR arg1)
2632{
2633 UINT rc;
2634 char *astring = UnicodeToAsciiString((LPWSTR)arg1);
2635
2636#ifdef DEBUG
2637 WriteLog("USER32: RegisterClipboardFormatW %s\n", astring);
2638#endif
2639 rc = O32_RegisterClipboardFormat(astring);
2640 FreeAsciiString(astring);
2641#ifdef DEBUG
2642 WriteLog("USER32: RegisterClipboardFormatW returned %d\n", rc);
2643#endif
2644 return(rc);
2645}
2646//******************************************************************************
2647//******************************************************************************
2648UINT WIN32API RegisterWindowMessageW( LPCWSTR arg1)
2649{
2650 char *astring = UnicodeToAsciiString((LPWSTR)arg1);
2651 UINT rc;
2652
2653#ifdef DEBUG
2654 WriteLog("USER32: RegisterWindowMessageW\n");
2655#endif
2656 rc = O32_RegisterWindowMessage(astring);
2657 FreeAsciiString(astring);
2658 return rc;
2659}
2660//******************************************************************************
2661//******************************************************************************
2662HANDLE WIN32API RemovePropA( HWND arg1, LPCSTR arg2)
2663{
2664#ifdef DEBUG
2665 WriteLog("USER32: RemovePropA\n");
2666#endif
2667 return O32_RemoveProp(arg1, arg2);
2668}
2669//******************************************************************************
2670//******************************************************************************
2671HANDLE WIN32API RemovePropW( HWND arg1, LPCWSTR arg2)
2672{
2673 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
2674 HANDLE rc;
2675
2676#ifdef DEBUG
2677 WriteLog("USER32: RemovePropW\n");
2678#endif
2679 rc = O32_RemoveProp(arg1, astring);
2680 FreeAsciiString(astring);
2681 return rc;
2682}
2683//******************************************************************************
2684//******************************************************************************
2685BOOL WIN32API ReplyMessage( LRESULT arg1)
2686{
2687#ifdef DEBUG
2688 WriteLog("USER32: ReplyMessage\n");
2689#endif
2690 return O32_ReplyMessage(arg1);
2691}
2692//******************************************************************************
2693//******************************************************************************
2694BOOL WIN32API ScreenToClient( HWND arg1, LPPOINT arg2)
2695{
2696#ifdef DEBUG
2697 WriteLog("USER32: ScreenToClient\n");
2698#endif
2699 return O32_ScreenToClient(arg1, arg2);
2700}
2701//******************************************************************************
2702//******************************************************************************
2703BOOL WIN32API ScrollDC( HDC arg1, int arg2, int arg3, const RECT * arg4, const RECT * arg5, HRGN arg6, PRECT arg7)
2704{
2705#ifdef DEBUG
2706 WriteLog("USER32: ScrollDC\n");
2707#endif
2708 return O32_ScrollDC(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
2709}
2710//******************************************************************************
2711//******************************************************************************
2712BOOL WIN32API ScrollWindow( HWND arg1, int arg2, int arg3, const RECT * arg4, const RECT * arg5)
2713{
2714#ifdef DEBUG
2715 WriteLog("USER32: ScrollWindow\n");
2716#endif
2717 return O32_ScrollWindow(arg1, arg2, arg3, arg4, arg5);
2718}
2719//******************************************************************************
2720//******************************************************************************
2721BOOL WIN32API ScrollWindowEx( HWND arg1, int arg2, int arg3, const RECT * arg4, const RECT * arg5, HRGN arg6, PRECT arg7, UINT arg8)
2722{
2723#ifdef DEBUG
2724 WriteLog("USER32: ScrollWindowEx\n");
2725#endif
2726 return O32_ScrollWindowEx(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
2727}
2728//******************************************************************************
2729//******************************************************************************
2730LONG WIN32API SendDlgItemMessageW( HWND arg1, int arg2, UINT arg3, WPARAM arg4, LPARAM arg5)
2731{
2732#ifdef DEBUG
2733 WriteLog("USER32: SendDlgItemMessageW\n");
2734#endif
2735 return O32_SendDlgItemMessage(arg1, arg2, arg3, arg4, arg5);
2736}
2737//******************************************************************************
2738//******************************************************************************
2739LRESULT WIN32API SendMessageW( HWND arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
2740{
2741LRESULT rc;
2742
2743#ifdef DEBUG
2744 WriteLog("USER32: SendMessageW....\n");
2745#endif
2746 rc = O32_SendMessage(arg1, arg2, arg3, arg4);
2747#ifdef DEBUG
2748 WriteLog("USER32: SendMessageW %X %X %X %X returned %d\n", arg1, arg2, arg3, arg4, rc);
2749#endif
2750 return(rc);
2751}
2752//******************************************************************************
2753//******************************************************************************
2754BOOL WIN32API SetCaretBlinkTime( UINT arg1)
2755{
2756#ifdef DEBUG
2757 WriteLog("USER32: SetCaretBlinkTime\n");
2758#endif
2759 return O32_SetCaretBlinkTime(arg1);
2760}
2761//******************************************************************************
2762//******************************************************************************
2763BOOL WIN32API SetCaretPos( int arg1, int arg2)
2764{
2765 dprintf(("USER32: SetCaretPos\n"));
2766 return O32_SetCaretPos(arg1, arg2);
2767}
2768//******************************************************************************
2769//******************************************************************************
2770HANDLE WIN32API SetClipboardData( UINT arg1, HANDLE arg2)
2771{
2772 dprintf(("USER32: SetClipboardData\n"));
2773 return O32_SetClipboardData(arg1, arg2);
2774}
2775//******************************************************************************
2776//******************************************************************************
2777HWND WIN32API SetClipboardViewer( HWND arg1)
2778{
2779 dprintf(("USER32: SetClipboardViewer\n"));
2780 return O32_SetClipboardViewer(arg1);
2781}
2782//******************************************************************************
2783//******************************************************************************
2784BOOL WIN32API SetDlgItemTextW( HWND arg1, int arg2, LPCWSTR arg3)
2785{
2786char *astring = UnicodeToAsciiString((LPWSTR)arg3);
2787BOOL rc;
2788
2789#ifdef DEBUG
2790 WriteLog("USER32: SetDlgItemTextW\n");
2791#endif
2792 // NOTE: This will not work as is (needs UNICODE support)
2793 rc = O32_SetDlgItemText(arg1, arg2, astring);
2794 FreeAsciiString(astring);
2795 return rc;
2796}
2797//******************************************************************************
2798//******************************************************************************
2799BOOL WIN32API SetDoubleClickTime( UINT arg1)
2800{
2801#ifdef DEBUG
2802 WriteLog("USER32: SetDoubleClickTime\n");
2803#endif
2804 return O32_SetDoubleClickTime(arg1);
2805}
2806//******************************************************************************
2807//******************************************************************************
2808HWND WIN32API SetParent( HWND arg1, HWND arg2)
2809{
2810#ifdef DEBUG
2811 WriteLog("USER32: SetParent\n");
2812#endif
2813 return O32_SetParent(arg1, arg2);
2814}
2815//******************************************************************************
2816//******************************************************************************
2817BOOL WIN32API SetPropA( HWND arg1, LPCSTR arg2, HANDLE arg3)
2818{
2819#ifdef DEBUG
2820 if((int)arg2 >> 16 != 0)
2821 WriteLog("USER32: SetPropA %S\n", arg2);
2822 else WriteLog("USER32: SetPropA %X\n", arg2);
2823#endif
2824 return O32_SetProp(arg1, arg2, arg3);
2825}
2826//******************************************************************************
2827//******************************************************************************
2828BOOL WIN32API SetPropW(HWND arg1, LPCWSTR arg2, HANDLE arg3)
2829{
2830 BOOL rc;
2831 char *astring;
2832
2833 if((int)arg2 >> 16 != 0)
2834 astring = UnicodeToAsciiString((LPWSTR)arg2);
2835 else astring = (char *)arg2;
2836
2837#ifdef DEBUG
2838 if((int)arg2 >> 16 != 0)
2839 WriteLog("USER32: SetPropW %S\n", astring);
2840 else WriteLog("USER32: SetPropW %X\n", astring);
2841#endif
2842 rc = O32_SetProp(arg1, astring, arg3);
2843 if((int)astring >> 16 != 0)
2844 FreeAsciiString(astring);
2845 return(rc);
2846}
2847//******************************************************************************
2848//******************************************************************************
2849BOOL WIN32API SetRectEmpty( PRECT arg1)
2850{
2851#ifdef DEBUG
2852 WriteLog("USER32: SetRectEmpty\n");
2853#endif
2854 return O32_SetRectEmpty(arg1);
2855}
2856//******************************************************************************
2857//******************************************************************************
2858int WIN32API SetScrollPos( HWND arg1, int arg2, int arg3, BOOL arg4)
2859{
2860#ifdef DEBUG
2861 WriteLog("USER32: SetScrollPos\n");
2862#endif
2863 return O32_SetScrollPos(arg1, arg2, arg3, arg4);
2864}
2865//******************************************************************************
2866//******************************************************************************
2867BOOL WIN32API SetScrollRange( HWND arg1, int arg2, int arg3, int arg4, BOOL arg5)
2868{
2869#ifdef DEBUG
2870 WriteLog("USER32: SetScrollRange\n");
2871#endif
2872 return O32_SetScrollRange(arg1, arg2, arg3, arg4, arg5);
2873}
2874//******************************************************************************
2875//******************************************************************************
2876BOOL WIN32API SetWindowPlacement( HWND arg1, const WINDOWPLACEMENT * arg2)
2877{
2878 dprintf(("USER32: SetWindowPlacement\n"));
2879 return O32_SetWindowPlacement(arg1, arg2);
2880}
2881//******************************************************************************
2882//******************************************************************************
2883BOOL WIN32API SetWindowTextW( HWND arg1, LPCWSTR arg2)
2884{
2885 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
2886 BOOL rc;
2887
2888 rc = SetWindowTextA(arg1, (LPCSTR)astring);
2889 dprintf(("USER32: SetWindowTextW %X %s returned %d\n", arg1, astring, rc));
2890 FreeAsciiString(astring);
2891 return(rc);
2892}
2893//******************************************************************************
2894//******************************************************************************
2895BOOL WIN32API ShowCaret( HWND arg1)
2896{
2897 dprintf(("USER32: ShowCaret\n"));
2898 return O32_ShowCaret(arg1);
2899}
2900//******************************************************************************
2901//******************************************************************************
2902BOOL WIN32API ShowOwnedPopups( HWND arg1, BOOL arg2)
2903{
2904 dprintf(("USER32: ShowOwnedPopups\n"));
2905 return O32_ShowOwnedPopups(arg1, arg2);
2906}
2907//******************************************************************************
2908//******************************************************************************
2909BOOL WIN32API ShowScrollBar( HWND arg1, int arg2, BOOL arg3)
2910{
2911#ifdef DEBUG
2912 WriteLog("USER32: ShowScrollBar\n");
2913#endif
2914 return O32_ShowScrollBar(arg1, arg2, arg3);
2915}
2916//******************************************************************************
2917//******************************************************************************
2918BOOL WIN32API SwapMouseButton( BOOL arg1)
2919{
2920#ifdef DEBUG
2921 WriteLog("USER32: SwapMouseButton\n");
2922#endif
2923 return O32_SwapMouseButton(arg1);
2924}
2925//******************************************************************************
2926//******************************************************************************
2927BOOL WIN32API SystemParametersInfoA(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni)
2928{
2929 BOOL rc;
2930 NONCLIENTMETRICSA *cmetric = (NONCLIENTMETRICSA *)pvParam;
2931
2932 switch(uiAction) {
2933 case SPI_SCREENSAVERRUNNING:
2934 *(BOOL *)pvParam = FALSE;
2935 rc = TRUE;
2936 break;
2937 case SPI_GETDRAGFULLWINDOWS:
2938 *(BOOL *)pvParam = FALSE;
2939 rc = TRUE;
2940 break;
2941 case SPI_GETNONCLIENTMETRICS:
2942 memset(cmetric, 0, sizeof(NONCLIENTMETRICSA));
2943 cmetric->cbSize = sizeof(NONCLIENTMETRICSA);
2944 //CB: font info not valid, needs improvements
2945 O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfCaptionFont),0);
2946 O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfMenuFont),0);
2947 //CB: experimental change for statusbar (and tooltips)
2948
2949 //O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfStatusFont),0);
2950 lstrcpyA(cmetric->lfStatusFont.lfFaceName,"WarpSans");
2951 cmetric->lfStatusFont.lfHeight = 9;
2952
2953 O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfMessageFont),0);
2954 cmetric->iBorderWidth = GetSystemMetrics(SM_CXBORDER);
2955 cmetric->iScrollWidth = GetSystemMetrics(SM_CXHSCROLL);
2956 cmetric->iScrollHeight = GetSystemMetrics(SM_CYHSCROLL);
2957 cmetric->iCaptionWidth = 32; //TODO
2958 cmetric->iCaptionHeight = 16; //TODO
2959 cmetric->iSmCaptionWidth = GetSystemMetrics(SM_CXSMSIZE);
2960 cmetric->iSmCaptionHeight = GetSystemMetrics(SM_CYSMSIZE);
2961 cmetric->iMenuWidth = 32; //TODO
2962 cmetric->iMenuHeight = GetSystemMetrics(SM_CYMENU);
2963 rc = TRUE;
2964 break;
2965 case 104: //TODO: Undocumented
2966 rc = 16;
2967 break;
2968 default:
2969 rc = O32_SystemParametersInfo(uiAction, uiParam, pvParam, fWinIni);
2970 break;
2971 }
2972#ifdef DEBUG
2973 WriteLog("USER32: SystemParametersInfoA %d, returned %d\n", uiAction, rc);
2974#endif
2975 return(rc);
2976}
2977//******************************************************************************
2978//TODO: Check for more options that have different structs for Unicode!!!!
2979//******************************************************************************
2980BOOL WIN32API SystemParametersInfoW(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni)
2981{
2982 BOOL rc;
2983 NONCLIENTMETRICSW *clientMetricsW = (NONCLIENTMETRICSW *)pvParam;
2984 NONCLIENTMETRICSA clientMetricsA = {0};
2985 PVOID pvParamA;
2986 UINT uiParamA;
2987
2988 switch(uiAction) {
2989 case SPI_SETNONCLIENTMETRICS:
2990 clientMetricsA.cbSize = sizeof(NONCLIENTMETRICSA);
2991 clientMetricsA.iBorderWidth = clientMetricsW->iBorderWidth;
2992 clientMetricsA.iScrollWidth = clientMetricsW->iScrollWidth;
2993 clientMetricsA.iScrollHeight = clientMetricsW->iScrollHeight;
2994 clientMetricsA.iCaptionWidth = clientMetricsW->iCaptionWidth;
2995 clientMetricsA.iCaptionHeight = clientMetricsW->iCaptionHeight;
2996 ConvertFontWA(&clientMetricsW->lfCaptionFont, &clientMetricsA.lfCaptionFont);
2997 clientMetricsA.iSmCaptionWidth = clientMetricsW->iSmCaptionWidth;
2998 clientMetricsA.iSmCaptionHeight = clientMetricsW->iSmCaptionHeight;
2999 ConvertFontWA(&clientMetricsW->lfSmCaptionFont, &clientMetricsA.lfSmCaptionFont);
3000 clientMetricsA.iMenuWidth = clientMetricsW->iMenuWidth;
3001 clientMetricsA.iMenuHeight = clientMetricsW->iMenuHeight;
3002 ConvertFontWA(&clientMetricsW->lfMenuFont, &clientMetricsA.lfMenuFont);
3003 ConvertFontWA(&clientMetricsW->lfStatusFont, &clientMetricsA.lfStatusFont);
3004 ConvertFontWA(&clientMetricsW->lfMessageFont, &clientMetricsA.lfMessageFont);
3005 //no break
3006 case SPI_GETNONCLIENTMETRICS:
3007 uiParamA = sizeof(NONCLIENTMETRICSA);
3008 pvParamA = &clientMetricsA;
3009 break;
3010 default:
3011 pvParamA = pvParam;
3012 uiParamA = uiParam;
3013 break;
3014 }
3015 rc = SystemParametersInfoA(uiAction, uiParamA, pvParamA, fWinIni);
3016
3017 switch(uiAction) {
3018 case SPI_GETNONCLIENTMETRICS:
3019 clientMetricsW->cbSize = sizeof(*clientMetricsW);
3020 clientMetricsW->iBorderWidth = clientMetricsA.iBorderWidth;
3021 clientMetricsW->iScrollWidth = clientMetricsA.iScrollWidth;
3022 clientMetricsW->iScrollHeight = clientMetricsA.iScrollHeight;
3023 clientMetricsW->iCaptionWidth = clientMetricsA.iCaptionWidth;
3024 clientMetricsW->iCaptionHeight = clientMetricsA.iCaptionHeight;
3025 ConvertFontAW(&clientMetricsA.lfCaptionFont, &clientMetricsW->lfCaptionFont);
3026
3027 clientMetricsW->iSmCaptionWidth = clientMetricsA.iSmCaptionWidth;
3028 clientMetricsW->iSmCaptionHeight = clientMetricsA.iSmCaptionHeight;
3029 ConvertFontAW(&clientMetricsA.lfSmCaptionFont, &clientMetricsW->lfSmCaptionFont);
3030
3031 clientMetricsW->iMenuWidth = clientMetricsA.iMenuWidth;
3032 clientMetricsW->iMenuHeight = clientMetricsA.iMenuHeight;
3033 ConvertFontAW(&clientMetricsA.lfMenuFont, &clientMetricsW->lfMenuFont);
3034 ConvertFontAW(&clientMetricsA.lfStatusFont, &clientMetricsW->lfStatusFont);
3035 ConvertFontAW(&clientMetricsA.lfMessageFont, &clientMetricsW->lfMessageFont);
3036 break;
3037 }
3038#ifdef DEBUG
3039 WriteLog("USER32: SystemParametersInfoW %d, returned %d\n", uiAction, rc);
3040#endif
3041 return(rc);
3042}
3043//******************************************************************************
3044//******************************************************************************
3045LONG WIN32API TabbedTextOutA( HDC arg1, int arg2, int arg3, LPCSTR arg4, int arg5, int arg6, int * arg7, int arg8)
3046{
3047#ifdef DEBUG
3048 WriteLog("USER32: TabbedTextOutA\n");
3049#endif
3050 return O32_TabbedTextOut(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
3051}
3052//******************************************************************************
3053//******************************************************************************
3054LONG WIN32API TabbedTextOutW( HDC arg1, int arg2, int arg3, LPCWSTR arg4, int arg5, int arg6, int * arg7, int arg8)
3055{
3056 char *astring = UnicodeToAsciiString((LPWSTR)arg4);
3057 LONG rc;
3058
3059#ifdef DEBUG
3060 WriteLog("USER32: TabbedTextOutW\n");
3061#endif
3062 rc = O32_TabbedTextOut(arg1, arg2, arg3, astring, arg5, arg6, arg7, arg8);
3063 FreeAsciiString(astring);
3064 return rc;
3065}
3066//******************************************************************************
3067//******************************************************************************
3068int WIN32API TranslateAccelerator( HWND arg1, HACCEL arg2, LPMSG arg3)
3069{
3070#ifdef DEBUG
3071 WriteLog("USER32: TranslateAccelerator\n");
3072#endif
3073 return O32_TranslateAccelerator(arg1, arg2, arg3);
3074}
3075//******************************************************************************
3076//******************************************************************************
3077int WIN32API TranslateAcceleratorW( HWND arg1, HACCEL arg2, LPMSG arg3)
3078{
3079#ifdef DEBUG
3080 WriteLog("USER32: TranslateAcceleratorW\n");
3081#endif
3082 // NOTE: This will not work as is (needs UNICODE support)
3083 return O32_TranslateAccelerator(arg1, arg2, arg3);
3084}
3085//******************************************************************************
3086//******************************************************************************
3087BOOL WIN32API TranslateMDISysAccel( HWND arg1, LPMSG arg2)
3088{
3089#ifdef DEBUG
3090//// WriteLog("USER32: TranslateMDISysAccel\n");
3091#endif
3092 return O32_TranslateMDISysAccel(arg1, arg2);
3093}
3094//******************************************************************************
3095//******************************************************************************
3096BOOL WIN32API UnionRect( PRECT arg1, const RECT * arg2, const RECT * arg3)
3097{
3098#ifdef DEBUG
3099 WriteLog("USER32: UnionRect\n");
3100#endif
3101 return O32_UnionRect(arg1, arg2, arg3);
3102}
3103//******************************************************************************
3104//******************************************************************************
3105BOOL WIN32API ValidateRect( HWND arg1, const RECT * arg2)
3106{
3107#ifdef DEBUG
3108 WriteLog("USER32: ValidateRect\n");
3109#endif
3110 return O32_ValidateRect(arg1, arg2);
3111}
3112//******************************************************************************
3113//******************************************************************************
3114BOOL WIN32API ValidateRgn( HWND arg1, HRGN arg2)
3115{
3116#ifdef DEBUG
3117 WriteLog("USER32: ValidateRgn\n");
3118#endif
3119 return O32_ValidateRgn(arg1, arg2);
3120}
3121//******************************************************************************
3122//******************************************************************************
3123WORD WIN32API VkKeyScanW( WCHAR arg1)
3124{
3125#ifdef DEBUG
3126 WriteLog("USER32: VkKeyScanW\n");
3127#endif
3128 // NOTE: This will not work as is (needs UNICODE support)
3129 return O32_VkKeyScan((char)arg1);
3130}
3131//******************************************************************************
3132//******************************************************************************
3133BOOL WIN32API WaitMessage(void)
3134{
3135#ifdef DEBUG
3136 WriteLog("USER32: WaitMessage\n");
3137#endif
3138 return O32_WaitMessage();
3139}
3140//******************************************************************************
3141//******************************************************************************
3142BOOL WIN32API WinHelpW( HWND arg1, LPCWSTR arg2, UINT arg3, DWORD arg4)
3143{
3144 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
3145 BOOL rc;
3146
3147#ifdef DEBUG
3148 WriteLog("USER32: WinHelpW\n");
3149#endif
3150 rc = WinHelpA(arg1, astring, arg3, arg4);
3151 FreeAsciiString(astring);
3152 return rc;
3153}
3154//******************************************************************************
3155//******************************************************************************
3156HWND WIN32API WindowFromDC( HDC arg1)
3157{
3158#ifdef DEBUG
3159 WriteLog("USER32: WindowFromDC\n");
3160#endif
3161 return O32_WindowFromDC(arg1);
3162}
3163//******************************************************************************
3164//******************************************************************************
3165HWND WIN32API WindowFromPoint( POINT arg1)
3166{
3167#ifdef DEBUG
3168 WriteLog("USER32: WindowFromPoint\n");
3169#endif
3170 return O32_WindowFromPoint(arg1);
3171}
3172//******************************************************************************
3173//******************************************************************************
3174int WIN32API wvsprintfA( LPSTR arg1, LPCSTR arg2, va_list arg3)
3175{
3176#ifdef DEBUG
3177 WriteLog("USER32: wvsprintfA\n");
3178#endif
3179 return O32_wvsprintf(arg1, arg2, (LPCVOID *)arg3);
3180}
3181//******************************************************************************
3182//******************************************************************************
3183int WIN32API wvsprintfW(LPWSTR lpOut, LPCWSTR lpFmt, va_list argptr)
3184{
3185 int rc;
3186 char szOut[256];
3187 char *lpFmtA;
3188
3189 lpFmtA = UnicodeToAsciiString((LPWSTR)lpFmt);
3190#ifdef DEBUG
3191 WriteLog("USER32: wvsprintfW, DOES NOT HANDLE UNICODE STRINGS!\n");
3192 WriteLog("USER32: %s\n", lpFmt);
3193#endif
3194 rc = O32_wvsprintf(szOut, lpFmtA, (LPCVOID)argptr);
3195
3196 AsciiToUnicode(szOut, lpOut);
3197#ifdef DEBUG
3198 WriteLog("USER32: %s\n", lpOut);
3199#endif
3200 FreeAsciiString(lpFmtA);
3201 return(rc);
3202}
3203//******************************************************************************
3204//No need to support this
3205//******************************************************************************
3206BOOL WIN32API SetMessageQueue(int cMessagesMax)
3207{
3208#ifdef DEBUG
3209 WriteLog("USER32: SetMessageQueue\n");
3210#endif
3211 return(TRUE);
3212}
3213//******************************************************************************
3214//TODO: Not complete
3215//******************************************************************************
3216BOOL WIN32API GetScrollInfo(HWND hwnd, int fnBar, LPSCROLLINFO lpsi)
3217{
3218#ifdef DEBUG
3219 WriteLog("USER32: GetScrollInfo\n");
3220#endif
3221 if(lpsi == NULL)
3222 return(FALSE);
3223
3224 if(lpsi->fMask & SIF_POS)
3225 lpsi->nPos = GetScrollPos(hwnd, fnBar);
3226 if(lpsi->fMask & SIF_RANGE)
3227 GetScrollRange(hwnd, fnBar, &lpsi->nMin, &lpsi->nMax);
3228 if(lpsi->fMask & SIF_PAGE) {
3229#ifdef DEBUG
3230 WriteLog("USER32: GetScrollInfo, page info not implemented\n");
3231#endif
3232 lpsi->nPage = 25;
3233 }
3234 return(TRUE);
3235}
3236//******************************************************************************
3237//TODO: Not complete
3238//******************************************************************************
3239INT WIN32API SetScrollInfo(HWND hwnd, INT fnBar, const SCROLLINFO *lpsi, BOOL fRedraw)
3240{
3241 int smin, smax;
3242
3243#ifdef DEBUG
3244 WriteLog("USER32: SetScrollInfo\n");
3245#endif
3246 if(lpsi == NULL)
3247 return(FALSE);
3248
3249 if(lpsi->fMask & SIF_POS)
3250 SetScrollPos(hwnd, fnBar, lpsi->nPos, fRedraw);
3251 if(lpsi->fMask & SIF_RANGE)
3252 SetScrollRange(hwnd, fnBar, lpsi->nMin, lpsi->nMax, fRedraw);
3253 if(lpsi->fMask & SIF_PAGE) {
3254#ifdef DEBUG
3255 WriteLog("USER32: GetScrollInfo, page info not implemented\n");
3256#endif
3257 }
3258 if(lpsi->fMask & SIF_DISABLENOSCROLL) {
3259#ifdef DEBUG
3260 WriteLog("USER32: GetScrollInfo, disable scrollbar not yet implemented\n");
3261#endif
3262 }
3263 return(TRUE);
3264}
3265//******************************************************************************
3266//******************************************************************************
3267BOOL WIN32API GrayStringA(HDC hdc, HBRUSH hBrush, GRAYSTRINGPROC lpOutputFunc,
3268 LPARAM lpData, int nCount, int X, int Y, int nWidth,
3269 int nHeight)
3270{
3271 BOOL rc;
3272 COLORREF curclr;
3273
3274#ifdef DEBUG
3275 WriteLog("USER32: GrayStringA, not completely implemented\n");
3276#endif
3277 if(lpOutputFunc == NULL && lpData == NULL) {
3278#ifdef DEBUG
3279 WriteLog("USER32: lpOutputFunc == NULL && lpData == NULL\n");
3280#endif
3281 return(FALSE);
3282 }
3283 if(lpOutputFunc) {
3284 return(lpOutputFunc(hdc, lpData, nCount));
3285 }
3286 curclr = SetTextColor(hdc, GetSysColor(COLOR_GRAYTEXT));
3287 rc = TextOutA(hdc, X, Y, (char *)lpData, nCount);
3288 SetTextColor(hdc, curclr);
3289
3290 return(rc);
3291}
3292//******************************************************************************
3293//******************************************************************************
3294BOOL WIN32API GrayStringW(HDC hdc, HBRUSH hBrush, GRAYSTRINGPROC lpOutputFunc,
3295 LPARAM lpData, int nCount, int X, int Y, int nWidth,
3296 int nHeight)
3297{
3298 BOOL rc;
3299 char *astring;
3300 COLORREF curclr;
3301
3302#ifdef DEBUG
3303 WriteLog("USER32: GrayStringW, not completely implemented\n");
3304#endif
3305
3306 if(lpOutputFunc == NULL && lpData == NULL) {
3307#ifdef DEBUG
3308 WriteLog("USER32: lpOutputFunc == NULL && lpData == NULL\n");
3309#endif
3310 return(FALSE);
3311 }
3312 if(nCount == 0)
3313 nCount = UniStrlen((UniChar*)lpData);
3314
3315 if(lpOutputFunc) {
3316 return(lpOutputFunc(hdc, lpData, nCount));
3317 }
3318 astring = UnicodeToAsciiString((LPWSTR)lpData);
3319
3320 curclr = SetTextColor(hdc, GetSysColor(COLOR_GRAYTEXT));
3321 rc = TextOutA(hdc, X, Y, astring, nCount);
3322 SetTextColor(hdc, curclr);
3323
3324 FreeAsciiString(astring);
3325 return(rc);
3326}
3327//******************************************************************************
3328//TODO:
3329//******************************************************************************
3330int WIN32API CopyAcceleratorTableA(HACCEL hAccelSrc, LPACCEL lpAccelDest,
3331 int cAccelEntries)
3332{
3333#ifdef DEBUG
3334 WriteLog("USER32: CopyAcceleratorTableA, not implemented\n");
3335#endif
3336 return(0);
3337}
3338//******************************************************************************
3339//TODO:
3340//******************************************************************************
3341int WIN32API CopyAcceleratorTableW(HACCEL hAccelSrc, LPACCEL lpAccelDest,
3342 int cAccelEntries)
3343{
3344#ifdef DEBUG
3345 WriteLog("USER32: CopyAcceleratorTableW, not implemented\n");
3346#endif
3347 return(0);
3348}
3349//******************************************************************************
3350//******************************************************************************
3351LRESULT WIN32API SendMessageTimeoutA(HWND hwnd, UINT Msg, WPARAM wParam,
3352 LPARAM lParam, UINT fuFlags, UINT uTimeOut,
3353 LPDWORD lpdwResult)
3354{
3355#ifdef DEBUG
3356 WriteLog("USER32: SendMessageTimeoutA, partially implemented\n");
3357#endif
3358 //ignore fuFlags & wTimeOut
3359 *lpdwResult = SendMessageA(hwnd, Msg, wParam, lParam);
3360 return(TRUE);
3361}
3362//******************************************************************************
3363//******************************************************************************
3364LRESULT WIN32API SendMessageTimeoutW(HWND hwnd, UINT Msg, WPARAM wParam,
3365 LPARAM lParam, UINT fuFlags, UINT uTimeOut,
3366 LPDWORD lpdwResult)
3367{
3368#ifdef DEBUG
3369 WriteLog("USER32: SendMessageTimeoutW, partially implemented\n");
3370#endif
3371 return(SendMessageTimeoutA(hwnd, Msg, wParam, lParam, fuFlags, uTimeOut, lpdwResult));
3372}
3373//******************************************************************************
3374//******************************************************************************
3375HANDLE WIN32API CopyImage(HANDLE hImage, UINT uType, int cxDesired, int cyDesired, UINT fuFlags)
3376{
3377#ifdef DEBUG
3378 WriteLog("USER32: CopyImage, not implemented\n");
3379#endif
3380 switch(uType) {
3381 case IMAGE_BITMAP:
3382 case IMAGE_CURSOR:
3383 case IMAGE_ICON:
3384 default:
3385#ifdef DEBUG
3386 WriteLog("USER32: CopyImage, unknown type\n");
3387#endif
3388 return(NULL);
3389 }
3390 return(NULL);
3391}
3392//******************************************************************************
3393//******************************************************************************
3394BOOL WIN32API GetKeyboardState(PBYTE lpKeyState)
3395{
3396#ifdef DEBUG
3397 WriteLog("USER32: GetKeyboardState, not properly implemented\n");
3398#endif
3399 memset(lpKeyState, 0, 256);
3400 return(TRUE);
3401}
3402//******************************************************************************
3403//******************************************************************************
3404BOOL WIN32API SetKeyboardState(PBYTE lpKeyState)
3405{
3406#ifdef DEBUG
3407 WriteLog("USER32: SetKeyboardState, not implemented\n");
3408#endif
3409 return(TRUE);
3410}
3411//******************************************************************************
3412//******************************************************************************
3413BOOL WIN32API SendNotifyMessageA(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)
3414{
3415#ifdef DEBUG
3416 WriteLog("USER32: SendNotifyMessageA, not completely implemented\n");
3417#endif
3418 return(SendMessageA(hwnd, Msg, wParam, lParam));
3419}
3420//******************************************************************************
3421//******************************************************************************
3422BOOL WIN32API SendNotifyMessageW(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)
3423{
3424#ifdef DEBUG
3425 WriteLog("USER32: SendNotifyMessageW, not completely implemented\n");
3426#endif
3427 return(SendMessageA(hwnd, Msg, wParam, lParam));
3428}
3429//******************************************************************************
3430//2nd parameter not used according to SDK (yet?)
3431//******************************************************************************
3432VOID WIN32API SetLastErrorEx(DWORD dwErrCode, DWORD dwType)
3433{
3434#ifdef DEBUG
3435 WriteLog("USER32: SetLastErrorEx\n");
3436#endif
3437 SetLastError(dwErrCode);
3438}
3439//******************************************************************************
3440//******************************************************************************
3441LPARAM WIN32API SetMessageExtraInfo(LPARAM lParam)
3442{
3443#ifdef DEBUG
3444 WriteLog("USER32: SetMessageExtraInfo, not implemented\n");
3445#endif
3446 return(0);
3447}
3448//******************************************************************************
3449//******************************************************************************
3450BOOL WIN32API ActivateKeyboardLayout(HKL hkl, UINT fuFlags)
3451{
3452#ifdef DEBUG
3453 WriteLog("USER32: ActivateKeyboardLayout, not implemented\n");
3454#endif
3455 return(TRUE);
3456}
3457//******************************************************************************
3458//******************************************************************************
3459int WIN32API GetKeyboardLayoutList(int nBuff, HKL *lpList)
3460{
3461#ifdef DEBUG
3462 WriteLog("USER32: GetKeyboardLayoutList, not implemented\n");
3463#endif
3464 return(0);
3465}
3466//******************************************************************************
3467//******************************************************************************
3468HKL WIN32API GetKeyboardLayout(DWORD dwLayout)
3469{
3470#ifdef DEBUG
3471 WriteLog("USER32: GetKeyboardLayout, not implemented\n");
3472#endif
3473 return(0);
3474}
3475//******************************************************************************
3476//******************************************************************************
3477int WIN32API LookupIconIdFromDirectory(PBYTE presbits, BOOL fIcon)
3478{
3479#ifdef DEBUG
3480 WriteLog("USER32: LookupIconIdFromDirectory, not implemented\n");
3481#endif
3482 return(0);
3483}
3484//******************************************************************************
3485//******************************************************************************
3486int WIN32API LookupIconIdFromDirectoryEx(PBYTE presbits, BOOL fIcon,
3487 int cxDesired, int cyDesired,
3488 UINT Flags)
3489{
3490#ifdef DEBUG
3491 WriteLog("USER32: LookupIconIdFromDirectoryEx, not implemented\n");
3492#endif
3493 return(0);
3494}
3495//******************************************************************************
3496//DWORD idAttach; /* thread to attach */
3497//DWORD idAttachTo; /* thread to attach to */
3498//BOOL fAttach; /* attach or detach */
3499//******************************************************************************
3500BOOL WIN32API AttachThreadInput(DWORD idAttach, DWORD idAttachTo, BOOL fAttach)
3501{
3502#ifdef DEBUG
3503 WriteLog("USER32: AttachThreadInput, not implemented\n");
3504#endif
3505 return(TRUE);
3506}
3507//******************************************************************************
3508//******************************************************************************
3509BOOL WIN32API RegisterHotKey(HWND hwnd, int idHotKey, UINT fuModifiers, UINT uVirtKey)
3510{
3511#ifdef DEBUG
3512 WriteLog("USER32: RegisterHotKey, not implemented\n");
3513#endif
3514 return(TRUE);
3515}
3516//******************************************************************************
3517//******************************************************************************
3518BOOL WIN32API UnregisterHotKey(HWND hwnd, int idHotKey)
3519{
3520#ifdef DEBUG
3521 WriteLog("USER32: UnregisterHotKey, not implemented\n");
3522#endif
3523 return(TRUE);
3524}
3525//******************************************************************************
3526//******************************************************************************
3527BOOL WIN32API DrawStateA(HDC hdc, HBRUSH hbc, DRAWSTATEPROC lpOutputFunc,
3528 LPARAM lData, WPARAM wData, int x, int y, int cx,
3529 int cy, UINT fuFlags)
3530{
3531#ifdef DEBUG
3532 WriteLog("USER32: DrawStateA, not implemented\n");
3533#endif
3534 return(TRUE);
3535}
3536//******************************************************************************
3537//******************************************************************************
3538//******************************************************************************
3539//******************************************************************************
3540BOOL WIN32API SetWindowContextHelpId(HWND hwnd, DWORD dwContextHelpId)
3541{
3542#ifdef DEBUG
3543 WriteLog("USER32: SetWindowContextHelpId, not implemented\n");
3544#endif
3545 return(TRUE);
3546}
3547//******************************************************************************
3548//******************************************************************************
3549DWORD WIN32API GetWindowContextHelpId(HWND hwnd)
3550{
3551#ifdef DEBUG
3552 WriteLog("USER32: GetWindowContextHelpId, not implemented\n");
3553#endif
3554 return(0);
3555}
3556//******************************************************************************
3557//restores iconized window to previous size/position
3558//******************************************************************************
3559BOOL WIN32API OpenIcon(HWND hwnd)
3560{
3561#ifdef DEBUG
3562 WriteLog("USER32: OpenIcon\n");
3563#endif
3564 if(!IsIconic(hwnd))
3565 return FALSE;
3566 ShowWindow(hwnd, SW_SHOWNORMAL);
3567 return TRUE;
3568}
3569//******************************************************************************
3570//******************************************************************************
3571BOOL WIN32API IsWindowUnicode(HWND hwnd)
3572{
3573#ifdef DEBUG
3574 WriteLog("USER32: IsWindowUnicode, not implemented\n");
3575#endif
3576 return(FALSE);
3577}
3578//******************************************************************************
3579//******************************************************************************
3580BOOL WIN32API GetMonitorInfoA(HMONITOR,LPMONITORINFO)
3581{
3582#ifdef DEBUG
3583 WriteLog("USER32: GetMonitorInfoA not supported!!\n");
3584#endif
3585 return(FALSE);
3586}
3587//******************************************************************************
3588//******************************************************************************
3589BOOL WIN32API GetMonitorInfoW(HMONITOR,LPMONITORINFO)
3590{
3591#ifdef DEBUG
3592 WriteLog("USER32: GetMonitorInfoW not supported!!\n");
3593#endif
3594 return(FALSE);
3595}
3596//******************************************************************************
3597//******************************************************************************
3598HMONITOR WIN32API MonitorFromWindow(HWND hwnd, DWORD dwFlags)
3599{
3600#ifdef DEBUG
3601 WriteLog("USER32: MonitorFromWindow not correctly supported??\n");
3602#endif
3603 return(0);
3604}
3605//******************************************************************************
3606//******************************************************************************
3607HMONITOR WIN32API MonitorFromRect(LPRECT rect, DWORD dwFlags)
3608{
3609#ifdef DEBUG
3610 WriteLog("USER32: MonitorFromRect not correctly supported??\n");
3611#endif
3612 return(0);
3613}
3614//******************************************************************************
3615//******************************************************************************
3616HMONITOR WIN32API MonitorFromPoint(POINT point, DWORD dwflags)
3617{
3618#ifdef DEBUG
3619 WriteLog("USER32: MonitorFromPoint not correctly supported??\n");
3620#endif
3621 return(0);
3622}
3623//******************************************************************************
3624//******************************************************************************
3625BOOL WIN32API EnumDisplayMonitors(HDC,LPRECT,MONITORENUMPROC,LPARAM)
3626{
3627#ifdef DEBUG
3628 WriteLog("USER32: EnumDisplayMonitors not supported??\n");
3629#endif
3630 return(FALSE);
3631}
3632//******************************************************************************
3633//******************************************************************************
3634BOOL WIN32API EnumDisplaySettingsA(LPCSTR lpszDeviceName, DWORD iModeNum,
3635 LPDEVMODEA lpDevMode)
3636{
3637#ifdef DEBUG
3638 WriteLog("USER32: EnumDisplaySettingsA FAKED\n");
3639#endif
3640 switch(iModeNum) {
3641 case 0:
3642 lpDevMode->dmBitsPerPel = 16;
3643 lpDevMode->dmPelsWidth = 768;
3644 lpDevMode->dmPelsHeight = 1024;
3645 lpDevMode->dmDisplayFlags = 0;
3646 lpDevMode->dmDisplayFrequency = 70;
3647 break;
3648 case 1:
3649 lpDevMode->dmBitsPerPel = 16;
3650 lpDevMode->dmPelsWidth = 640;
3651 lpDevMode->dmPelsHeight = 480;
3652 lpDevMode->dmDisplayFlags = 0;
3653 lpDevMode->dmDisplayFrequency = 70;
3654 break;
3655 default:
3656 return(FALSE);
3657 }
3658 return(TRUE);
3659}
3660//******************************************************************************
3661//******************************************************************************
3662LONG WIN32API ChangeDisplaySettingsA(LPDEVMODEA lpDevMode, DWORD dwFlags)
3663{
3664#ifdef DEBUG
3665 if(lpDevMode) {
3666 WriteLog("USER32: ChangeDisplaySettingsA FAKED %X\n", dwFlags);
3667 WriteLog("USER32: ChangeDisplaySettingsA lpDevMode->dmBitsPerPel %d\n", lpDevMode->dmBitsPerPel);
3668 WriteLog("USER32: ChangeDisplaySettingsA lpDevMode->dmPelsWidth %d\n", lpDevMode->dmPelsWidth);
3669 WriteLog("USER32: ChangeDisplaySettingsA lpDevMode->dmPelsHeight %d\n", lpDevMode->dmPelsHeight);
3670 }
3671#endif
3672 return(DISP_CHANGE_SUCCESSFUL);
3673}
3674//******************************************************************************
3675//******************************************************************************
3676
3677
3678/*****************************************************************************
3679 * Name : BOOL WIN32API AnyPopup
3680 * Purpose : The AnyPopup function indicates whether an owned, visible,
3681 * top-level pop-up, or overlapped window exists on the screen. The
3682 * function searches the entire Windows screen, not just the calling
3683 * application's client area.
3684 * Parameters: VOID
3685 * Variables :
3686 * Result : If a pop-up window exists, the return value is TRUE even if the
3687 * pop-up window is completely covered by other windows. Otherwise,
3688 * it is FALSE.
3689 * Remark : AnyPopup is a Windows version 1.x function and is retained for
3690 * compatibility purposes. It is generally not useful.
3691 * Status : UNTESTED STUB
3692 *
3693 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3694 *****************************************************************************/
3695
3696BOOL WIN32API AnyPopup(VOID)
3697{
3698 dprintf(("USER32:AnyPopup() not implemented.\n"));
3699
3700 return (FALSE);
3701}
3702
3703
3704/*****************************************************************************
3705 * Name : long WIN32API BroadcastSystemMessage
3706 * Purpose : The BroadcastSystemMessage function sends a message to the given
3707 * recipients. The recipients can be applications, installable
3708 * drivers, Windows-based network drivers, system-level device
3709 * drivers, or any combination of these system components.
3710 * Parameters: DWORD dwFlags,
3711 LPDWORD lpdwRecipients,
3712 UINT uiMessage,
3713 WPARAM wParam,
3714 LPARAM lParam
3715 * Variables :
3716 * Result : If the function succeeds, the return value is a positive value.
3717 * If the function is unable to broadcast the message, the return value is -1.
3718 * If the dwFlags parameter is BSF_QUERY and at least one recipient returned FALSE to the corresponding message, the return value is zero.
3719 * Remark :
3720 * Status : UNTESTED STUB
3721 *
3722 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3723 *****************************************************************************/
3724
3725long WIN32API BroadcastSystemMessage(DWORD dwFlags,
3726 LPDWORD lpdwRecipients,
3727 UINT uiMessage,
3728 WPARAM wParam,
3729 LPARAM lParam)
3730{
3731 dprintf(("USER32:BroadcastSystemMessage(%08xh,%08xh,%08xh,%08xh,%08x) not implemented.\n",
3732 dwFlags,
3733 lpdwRecipients,
3734 uiMessage,
3735 wParam,
3736 lParam));
3737
3738 return (-1);
3739}
3740
3741
3742/*****************************************************************************
3743 * Name : WORD WIN32API CascadeWindows
3744 * Purpose : The CascadeWindows function cascades the specified windows or
3745 * the child windows of the specified parent window.
3746 * Parameters: HWND hwndParent handle of parent window
3747 * UINT wHow types of windows not to arrange
3748 * CONST RECT * lpRect rectangle to arrange windows in
3749 * UINT cKids number of windows to arrange
3750 * const HWND FAR * lpKids array of window handles
3751 * Variables :
3752 * Result : If the function succeeds, the return value is the number of windows arranged.
3753 * If the function fails, the return value is zero.
3754 * Remark :
3755 * Status : UNTESTED STUB
3756 *
3757 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3758 *****************************************************************************/
3759
3760WORD WIN32API CascadeWindows(HWND hwndParent,
3761 UINT wHow,
3762 CONST LPRECT lpRect,
3763 UINT cKids,
3764 const HWND *lpKids)
3765{
3766 dprintf(("USER32:CascadeWindows(%08xh,%u,%08xh,%u,%08x) not implemented.\n",
3767 hwndParent,
3768 wHow,
3769 lpRect,
3770 cKids,
3771 lpKids));
3772
3773 return (0);
3774}
3775
3776
3777/*****************************************************************************
3778 * Name : LONG WIN32API ChangeDisplaySettingsW
3779 * Purpose : The ChangeDisplaySettings function changes the display settings
3780 * to the specified graphics mode.
3781 * Parameters: LPDEVMODEW lpDevModeW
3782 * DWORD dwFlags
3783 * Variables :
3784 * Result : DISP_CHANGE_SUCCESSFUL The settings change was successful.
3785 * DISP_CHANGE_RESTART The computer must be restarted in order for the graphics mode to work.
3786 * DISP_CHANGE_BADFLAGS An invalid set of flags was passed in.
3787 * DISP_CHANGE_FAILED The display driver failed the specified graphics mode.
3788 * DISP_CHANGE_BADMODE The graphics mode is not supported.
3789 * DISP_CHANGE_NOTUPDATED Unable to write settings to the registry.
3790 * Remark :
3791 * Status : UNTESTED STUB
3792 *
3793 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3794 *****************************************************************************/
3795
3796LONG WIN32API ChangeDisplaySettingsW(LPDEVMODEW lpDevMode,
3797 DWORD dwFlags)
3798{
3799 dprintf(("USER32:ChangeDisplaySettingsW(%08xh,%08x) not implemented.\n",
3800 lpDevMode,
3801 dwFlags));
3802
3803 return (ChangeDisplaySettingsA((LPDEVMODEA)lpDevMode,
3804 dwFlags));
3805}
3806
3807/*****************************************************************************
3808 * Name : BOOL WIN32API CloseDesktop
3809 * Purpose : The CloseDesktop function closes an open handle of a desktop
3810 * object. A desktop is a secure object contained within a window
3811 * station object. A desktop has a logical display surface and
3812 * contains windows, menus and hooks.
3813 * Parameters: HDESK hDesktop
3814 * Variables :
3815 * Result : If the function succeeds, the return value is TRUE.
3816 * If the functions fails, the return value is FALSE. To get
3817 * extended error information, call GetLastError.
3818 * Remark :
3819 * Status : UNTESTED STUB
3820 *
3821 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3822 *****************************************************************************/
3823
3824BOOL WIN32API CloseDesktop(HDESK hDesktop)
3825{
3826 dprintf(("USER32:CloseDesktop(%08x) not implemented.\n",
3827 hDesktop));
3828
3829 return (FALSE);
3830}
3831
3832
3833/*****************************************************************************
3834 * Name : BOOL WIN32API CloseWindowStation
3835 * Purpose : The CloseWindowStation function closes an open window station handle.
3836 * Parameters: HWINSTA hWinSta
3837 * Variables :
3838 * Result :
3839 * Remark : If the function succeeds, the return value is TRUE.
3840 * If the functions fails, the return value is FALSE. To get
3841 * extended error information, call GetLastError.
3842 * Status : UNTESTED STUB
3843 *
3844 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3845 *****************************************************************************/
3846
3847BOOL WIN32API CloseWindowStation(HWINSTA hWinSta)
3848{
3849 dprintf(("USER32:CloseWindowStation(%08x) not implemented.\n",
3850 hWinSta));
3851
3852 return (FALSE);
3853}
3854
3855
3856/*****************************************************************************
3857 * Name : HDESK WIN32API CreateDesktopA
3858 * Purpose : The CreateDesktop function creates a new desktop on the window
3859 * station associated with the calling process.
3860 * Parameters: LPCTSTR lpszDesktop name of the new desktop
3861 * LPCTSTR lpszDevice name of display device to assign to the desktop
3862 * LPDEVMODE pDevMode reserved; must be NULL
3863 * DWORD dwFlags flags to control interaction with other applications
3864 * DWORD dwDesiredAccess specifies access of returned handle
3865 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the desktop
3866 * Variables :
3867 * Result : If the function succeeds, the return value is a handle of the
3868 * newly created desktop.
3869 * If the function fails, the return value is NULL. To get extended
3870 * error information, call GetLastError.
3871 * Remark :
3872 * Status : UNTESTED STUB
3873 *
3874 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3875 *****************************************************************************/
3876
3877HDESK WIN32API CreateDesktopA(LPCTSTR lpszDesktop,
3878 LPCTSTR lpszDevice,
3879 LPDEVMODEA pDevMode,
3880 DWORD dwFlags,
3881 DWORD dwDesiredAccess,
3882 LPSECURITY_ATTRIBUTES lpsa)
3883{
3884 dprintf(("USER32:CreateDesktopA(%s,%s,%08xh,%08xh,%08xh,%08x) not implemented.\n",
3885 lpszDesktop,
3886 lpszDevice,
3887 pDevMode,
3888 dwFlags,
3889 dwDesiredAccess,
3890 lpsa));
3891
3892 return (NULL);
3893}
3894
3895
3896/*****************************************************************************
3897 * Name : HDESK WIN32API CreateDesktopW
3898 * Purpose : The CreateDesktop function creates a new desktop on the window
3899 * station associated with the calling process.
3900 * Parameters: LPCTSTR lpszDesktop name of the new desktop
3901 * LPCTSTR lpszDevice name of display device to assign to the desktop
3902 * LPDEVMODE pDevMode reserved; must be NULL
3903 * DWORD dwFlags flags to control interaction with other applications
3904 * DWORD dwDesiredAccess specifies access of returned handle
3905 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the desktop
3906 * Variables :
3907 * Result : If the function succeeds, the return value is a handle of the
3908 * newly created desktop.
3909 * If the function fails, the return value is NULL. To get extended
3910 * error information, call GetLastError.
3911 * Remark :
3912 * Status : UNTESTED STUB
3913 *
3914 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3915 *****************************************************************************/
3916
3917HDESK WIN32API CreateDesktopW(LPCTSTR lpszDesktop,
3918 LPCTSTR lpszDevice,
3919 LPDEVMODEW pDevMode,
3920 DWORD dwFlags,
3921 DWORD dwDesiredAccess,
3922 LPSECURITY_ATTRIBUTES lpsa)
3923{
3924 dprintf(("USER32:CreateDesktopW(%s,%s,%08xh,%08xh,%08xh,%08x) not implemented.\n",
3925 lpszDesktop,
3926 lpszDevice,
3927 pDevMode,
3928 dwFlags,
3929 dwDesiredAccess,
3930 lpsa));
3931
3932 return (NULL);
3933}
3934
3935
3936/*****************************************************************************
3937 * Name : HWINSTA WIN32API CreateWindowStationA
3938 * Purpose : The CreateWindowStation function creates a window station object.
3939 * It returns a handle that can be used to access the window station.
3940 * A window station is a secure object that contains a set of global
3941 * atoms, a clipboard, and a set of desktop objects.
3942 * Parameters: LPTSTR lpwinsta name of the new window station
3943 * DWORD dwReserved reserved; must be NULL
3944 * DWORD dwDesiredAccess specifies access of returned handle
3945 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the window station
3946 * Variables :
3947 * Result : If the function succeeds, the return value is the handle to the
3948 * newly created window station.
3949 * If the function fails, the return value is NULL. To get extended
3950 * error information, call GetLastError.
3951 * Remark :
3952 * Status : UNTESTED STUB
3953 *
3954 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3955 *****************************************************************************/
3956
3957HWINSTA WIN32API CreateWindowStationA(LPTSTR lpWinSta,
3958 DWORD dwReserved,
3959 DWORD dwDesiredAccess,
3960 LPSECURITY_ATTRIBUTES lpsa)
3961{
3962 dprintf(("USER32:CreateWindowStationA(%s,%08xh,%08xh,%08x) not implemented.\n",
3963 lpWinSta,
3964 dwReserved,
3965 dwDesiredAccess,
3966 lpsa));
3967
3968 return (NULL);
3969}
3970
3971
3972/*****************************************************************************
3973 * Name : HWINSTA WIN32API CreateWindowStationW
3974 * Purpose : The CreateWindowStation function creates a window station object.
3975 * It returns a handle that can be used to access the window station.
3976 * A window station is a secure object that contains a set of global
3977 * atoms, a clipboard, and a set of desktop objects.
3978 * Parameters: LPTSTR lpwinsta name of the new window station
3979 * DWORD dwReserved reserved; must be NULL
3980 * DWORD dwDesiredAccess specifies access of returned handle
3981 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the window station
3982 * Variables :
3983 * Result : If the function succeeds, the return value is the handle to the
3984 * newly created window station.
3985 * If the function fails, the return value is NULL. To get extended
3986 * error information, call GetLastError.
3987 * Remark :
3988 * Status : UNTESTED STUB
3989 *
3990 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3991 *****************************************************************************/
3992
3993HWINSTA WIN32API CreateWindowStationW(LPWSTR lpWinSta,
3994 DWORD dwReserved,
3995 DWORD dwDesiredAccess,
3996 LPSECURITY_ATTRIBUTES lpsa)
3997{
3998 dprintf(("USER32:CreateWindowStationW(%s,%08xh,%08xh,%08x) not implemented.\n",
3999 lpWinSta,
4000 dwReserved,
4001 dwDesiredAccess,
4002 lpsa));
4003
4004 return (NULL);
4005}
4006
4007/*****************************************************************************
4008 * Name : BOOL WIN32API DragDetect
4009 * Purpose : The DragDetect function captures the mouse and tracks its movement
4010 * Parameters: HWND hwnd
4011 * POINT pt
4012 * Variables :
4013 * Result : If the user moved the mouse outside of the drag rectangle while
4014 * holding the left button down, the return value is TRUE.
4015 * If the user did not move the mouse outside of the drag rectangle
4016 * while holding the left button down, the return value is FALSE.
4017 * Remark :
4018 * Status : UNTESTED STUB
4019 *
4020 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4021 *****************************************************************************/
4022
4023BOOL WIN32API DragDetect(HWND hwnd,
4024 POINT pt)
4025{
4026 dprintf(("USER32:DragDetect(%08xh,...) not implemented.\n",
4027 hwnd));
4028
4029 return (FALSE);
4030}
4031
4032
4033/*****************************************************************************
4034 * Name : BOOL WIN32API DrawAnimatedRects
4035 * Purpose : The DrawAnimatedRects function draws a wire-frame rectangle
4036 * and animates it to indicate the opening of an icon or the
4037 * minimizing or maximizing of a window.
4038 * Parameters: HWND hwnd handle of clipping window
4039 * int idAni type of animation
4040 * CONST RECT * lprcFrom address of rectangle coordinates (minimized)
4041 * CONST RECT * lprcTo address of rectangle coordinates (restored)
4042 * Variables :
4043 * Result : If the function succeeds, the return value is TRUE.
4044 * If the function fails, the return value is FALSE.
4045 * Remark :
4046 * Status : UNTESTED STUB
4047 *
4048 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4049 *****************************************************************************/
4050
4051BOOL WIN32API DrawAnimatedRects(HWND hwnd,
4052 int idAni,
4053 CONST RECT *lprcFrom,
4054 CONST RECT *lprcTo)
4055{
4056 dprintf(("USER32:DrawAnimatedRects (%08xh,%u,%08xh,%08x) not implemented.\n",
4057 hwnd,
4058 idAni,
4059 lprcFrom,
4060 lprcTo));
4061
4062 return (TRUE);
4063}
4064
4065
4066/*****************************************************************************
4067 * Name : VOID WIN32API DrawCaption
4068 * Purpose : The DrawCaption function draws a window caption.
4069 * Parameters: HDC hdc handle of device context
4070 * LPRECT lprc address of bounding rectangle coordinates
4071 * HFONT hfont handle of font for caption
4072 * HICON hicon handle of icon in caption
4073 * LPSTR lpszText address of caption string
4074 * WORD wFlags drawing options
4075 * Variables :
4076 * Result :
4077 * Remark :
4078 * Status : UNTESTED STUB
4079 *
4080 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4081 *****************************************************************************/
4082
4083BOOL WIN32API DrawCaption (HWND hwnd,
4084 HDC hdc,
4085 const RECT *lprc,
4086 UINT wFlags)
4087{
4088 dprintf(("USER32:DrawCaption (%08xh,%08xh,%08xh,%08xh) not implemented.\n",
4089 hwnd,
4090 hdc,
4091 lprc,
4092 wFlags));
4093
4094 return FALSE;
4095}
4096
4097
4098/*****************************************************************************
4099 * Name :
4100 * Purpose :
4101 * Parameters:
4102 * Variables :
4103 * Result :
4104 * Remark :
4105 * Status : UNTESTED STUB
4106 *
4107 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4108 *****************************************************************************/
4109
4110BOOL WIN32API DrawStateW(HDC hdc,
4111 HBRUSH hBrush,
4112 DRAWSTATEPROC lpOutputFunc,
4113 LPARAM lParam,
4114 WPARAM wParam,
4115 int x,
4116 int y,
4117 int cx,
4118 int cy,
4119 UINT fuFlags)
4120{
4121 dprintf(("USER32:DrawStateW (%08xh,%08xh,%08xh,%08xh,%08xh,%d,%d,%d,%d,%08x) not implemented.\n",
4122 hdc,
4123 hBrush,
4124 lpOutputFunc,
4125 lParam,
4126 wParam,
4127 x,
4128 y,
4129 cx,
4130 cy,
4131 fuFlags));
4132
4133 return(DrawStateA(hdc,
4134 hBrush,
4135 lpOutputFunc,
4136 lParam,
4137 wParam,
4138 x,
4139 y,
4140 cx,
4141 cy,
4142 fuFlags));
4143}
4144
4145
4146/*****************************************************************************
4147 * Name : BOOL WIN32API EnumDesktopWindows
4148 * Purpose : The EnumDesktopWindows function enumerates all windows in a
4149 * desktop by passing the handle of each window, in turn, to an
4150 * application-defined callback function.
4151 * Parameters: HDESK hDesktop handle of desktop to enumerate
4152 * WNDENUMPROC lpfn points to application's callback function
4153 * LPARAM lParam 32-bit value to pass to the callback function
4154 * Variables :
4155 * Result : If the function succeeds, the return value is TRUE.
4156 * If the function fails, the return value is FALSE. To get
4157 * extended error information, call GetLastError.
4158 * Remark :
4159 * Status : UNTESTED STUB
4160 *
4161 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4162 *****************************************************************************/
4163
4164BOOL WIN32API EnumDesktopWindows(HDESK hDesktop,
4165 WNDENUMPROC lpfn,
4166 LPARAM lParam)
4167{
4168 dprintf(("USER32:EnumDesktopWindows (%08xh,%08xh,%08x) not implemented.\n",
4169 hDesktop,
4170 lpfn,
4171 lParam));
4172
4173 return (FALSE);
4174}
4175
4176
4177/*****************************************************************************
4178 * Name : BOOL WIN32API EnumDesktopsA
4179 * Purpose : The EnumDesktops function enumerates all desktops in the window
4180 * station assigned to the calling process. The function does so by
4181 * passing the name of each desktop, in turn, to an application-
4182 * defined callback function.
4183 * Parameters: HWINSTA hwinsta handle of window station to enumerate
4184 * DESKTOPENUMPROC lpEnumFunc points to application's callback function
4185 * LPARAM lParam 32-bit value to pass to the callback function
4186 * Variables :
4187 * Result : If the function succeeds, the return value is TRUE.
4188 * If the function fails, the return value is FALSE. To get extended
4189 * error information, call GetLastError.
4190 * Remark :
4191 * Status : UNTESTED STUB
4192 *
4193 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4194 *****************************************************************************/
4195
4196BOOL WIN32API EnumDesktopsA(HWINSTA hWinSta,
4197 DESKTOPENUMPROCA lpEnumFunc,
4198 LPARAM lParam)
4199{
4200 dprintf(("USER32:EnumDesktopsA (%08xh,%08xh,%08x) not implemented.\n",
4201 hWinSta,
4202 lpEnumFunc,
4203 lParam));
4204
4205 return (FALSE);
4206}
4207
4208
4209/*****************************************************************************
4210 * Name : BOOL WIN32API EnumDesktopsW
4211 * Purpose : The EnumDesktops function enumerates all desktops in the window
4212 * station assigned to the calling process. The function does so by
4213 * passing the name of each desktop, in turn, to an application-
4214 * defined callback function.
4215 * Parameters: HWINSTA hwinsta handle of window station to enumerate
4216 * DESKTOPENUMPROC lpEnumFunc points to application's callback function
4217 * LPARAM lParam 32-bit value to pass to the callback function
4218 * Variables :
4219 * Result : If the function succeeds, the return value is TRUE.
4220 * If the function fails, the return value is FALSE. To get extended
4221 * error information, call GetLastError.
4222 * Remark :
4223 * Status : UNTESTED STUB
4224 *
4225 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4226 *****************************************************************************/
4227
4228BOOL WIN32API EnumDesktopsW(HWINSTA hWinSta,
4229 DESKTOPENUMPROCW lpEnumFunc,
4230 LPARAM lParam)
4231{
4232 dprintf(("USER32:EnumDesktopsW (%08xh,%08xh,%08x) not implemented.\n",
4233 hWinSta,
4234 lpEnumFunc,
4235 lParam));
4236
4237 return (FALSE);
4238}
4239
4240
4241
4242/*****************************************************************************
4243 * Name : BOOL WIN32API EnumDisplaySettingsW
4244 * Purpose : The EnumDisplaySettings function obtains information about one
4245 * of a display device's graphics modes. You can obtain information
4246 * for all of a display device's graphics modes by making a series
4247 * of calls to this function.
4248 * Parameters: LPCTSTR lpszDeviceName specifies the display device
4249 * DWORD iModeNum specifies the graphics mode
4250 * LPDEVMODE lpDevMode points to structure to receive settings
4251 * Variables :
4252 * Result : If the function succeeds, the return value is TRUE.
4253 * If the function fails, the return value is FALSE.
4254 * Remark :
4255 * Status : UNTESTED STUB
4256 *
4257 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4258 *****************************************************************************/
4259
4260BOOL WIN32API EnumDisplaySettingsW(LPCSTR lpszDeviceName,
4261 DWORD iModeNum,
4262 LPDEVMODEW lpDevMode)
4263{
4264 dprintf(("USER32:EnumDisplaySettingsW (%s,%08xh,%08x) not implemented.\n",
4265 lpszDeviceName,
4266 iModeNum,
4267 lpDevMode));
4268
4269 return (EnumDisplaySettingsA(lpszDeviceName,
4270 iModeNum,
4271 (LPDEVMODEA)lpDevMode));
4272}
4273
4274
4275/*****************************************************************************
4276 * Name : BOOL WIN32API EnumWindowStationsA
4277 * Purpose : The EnumWindowStations function enumerates all windowstations
4278 * in the system by passing the name of each window station, in
4279 * turn, to an application-defined callback function.
4280 * Parameters:
4281 * Variables : WINSTAENUMPROC lpEnumFunc points to application's callback function
4282 * LPARAM lParam 32-bit value to pass to the callback function
4283 * Result : If the function succeeds, the return value is TRUE.
4284 * If the function fails the return value is FALSE. To get extended
4285 * error information, call GetLastError.
4286 * Remark :
4287 * Status : UNTESTED STUB
4288 *
4289 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4290 *****************************************************************************/
4291
4292BOOL WIN32API EnumWindowStationsA(WINSTAENUMPROCA lpEnumFunc,
4293 LPARAM lParam)
4294{
4295 dprintf(("USER32:EnumWindowStationsA (%08xh,%08x) not implemented.\n",
4296 lpEnumFunc,
4297 lParam));
4298
4299 return (FALSE);
4300}
4301
4302
4303/*****************************************************************************
4304 * Name : BOOL WIN32API EnumWindowStationsW
4305 * Purpose : The EnumWindowStations function enumerates all windowstations
4306 * in the system by passing the name of each window station, in
4307 * turn, to an application-defined callback function.
4308 * Parameters:
4309 * Variables : WINSTAENUMPROC lpEnumFunc points to application's callback function
4310 * LPARAM lParam 32-bit value to pass to the callback function
4311 * Result : If the function succeeds, the return value is TRUE.
4312 * If the function fails the return value is FALSE. To get extended
4313 * error information, call GetLastError.
4314 * Remark :
4315 * Status : UNTESTED STUB
4316 *
4317 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4318 *****************************************************************************/
4319
4320BOOL WIN32API EnumWindowStationsW(WINSTAENUMPROCW lpEnumFunc,
4321 LPARAM lParam)
4322{
4323 dprintf(("USER32:EnumWindowStationsW (%08xh,%08x) not implemented.\n",
4324 lpEnumFunc,
4325 lParam));
4326
4327 return (FALSE);
4328}
4329
4330
4331/*****************************************************************************
4332 * Name : HWND WIN32API FindWindowExW
4333 * Purpose : The FindWindowEx function retrieves the handle of a window whose
4334 * class name and window name match the specified strings. The
4335 * function searches child windows, beginning with the one following
4336 * the given child window.
4337 * Parameters: HWND hwndParent handle of parent window
4338 * HWND hwndChildAfter handle of a child window
4339 * LPCTSTR lpszClass address of class name
4340 * LPCTSTR lpszWindow address of window name
4341 * Variables :
4342 * Result : If the function succeeds, the return value is the handle of the
4343 * window that has the specified class and window names.
4344 * If the function fails, the return value is NULL. To get extended
4345 * error information, call GetLastError.
4346 * Remark :
4347 * Status : UNTESTED STUB
4348 *
4349 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4350 *****************************************************************************/
4351
4352HWND WIN32API FindWindowExW(HWND hwndParent,
4353 HWND hwndChildAfter,
4354 LPCWSTR lpszClass,
4355 LPCWSTR lpszWindow)
4356{
4357 dprintf(("USER32:FindWindowExW (%08xh,%08xh,%s,%s) not implemented.\n",
4358 hwndParent,
4359 hwndChildAfter,
4360 lpszClass,
4361 lpszWindow));
4362
4363 return (NULL);
4364}
4365
4366/*****************************************************************************
4367 * Name : BOOL WIN32API GetInputState
4368 * Purpose : The GetInputState function determines whether there are
4369 * mouse-button or keyboard messages in the calling thread's message queue.
4370 * Parameters:
4371 * Variables :
4372 * Result : If the queue contains one or more new mouse-button or keyboard
4373 * messages, the return value is TRUE.
4374 * If the function fails, the return value is FALSE.
4375 * Remark :
4376 * Status : UNTESTED STUB
4377 *
4378 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4379 *****************************************************************************/
4380
4381BOOL WIN32API GetInputState(VOID)
4382{
4383 dprintf(("USER32:GetInputState () not implemented.\n"));
4384
4385 return (FALSE);
4386}
4387
4388
4389/*****************************************************************************
4390 * Name : UINT WIN32API GetKBCodePage
4391 * Purpose : The GetKBCodePage function is provided for compatibility with
4392 * earlier versions of Windows. In the Win32 application programming
4393 * interface (API) it just calls the GetOEMCP function.
4394 * Parameters:
4395 * Variables :
4396 * Result : If the function succeeds, the return value is an OEM code-page
4397 * identifier, or it is the default identifier if the registry
4398 * value is not readable. For a list of OEM code-page identifiers,
4399 * see GetOEMCP.
4400 * Remark :
4401 * Status : UNTESTED
4402 *
4403 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4404 *****************************************************************************/
4405
4406UINT WIN32API GetKBCodePage(VOID)
4407{
4408 return (GetOEMCP());
4409}
4410
4411
4412/*****************************************************************************
4413 * Name : BOOL WIN32API GetKeyboardLayoutNameA
4414 * Purpose : The GetKeyboardLayoutName function retrieves the name of the
4415 * active keyboard layout.
4416 * Parameters: LPTSTR pwszKLID address of buffer for layout name
4417 * Variables :
4418 * Result : If the function succeeds, the return value is TRUE.
4419 * If the function fails, the return value is FALSE. To get extended
4420 * error information, call GetLastError.
4421 * Remark :
4422 * Status : UNTESTED STUB
4423 *
4424 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4425 *****************************************************************************/
4426
4427BOOL WIN32API GetKeyboardLayoutNameA(LPTSTR pwszKLID)
4428{
4429 dprintf(("USER32:GetKeyboardLayoutNameA (%08x) not implemented.",
4430 pwszKLID));
4431
4432 return(FALSE);
4433}
4434
4435
4436/*****************************************************************************
4437 * Name : BOOL WIN32API GetKeyboardLayoutNameW
4438 * Purpose : The GetKeyboardLayoutName function retrieves the name of the
4439 * active keyboard layout.
4440 * Parameters: LPTSTR pwszKLID address of buffer for layout name
4441 * Variables :
4442 * Result : If the function succeeds, the return value is TRUE.
4443 * If the function fails, the return value is FALSE. To get extended
4444 * error information, call GetLastError.
4445 * Remark :
4446 * Status : UNTESTED STUB
4447 *
4448 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4449 *****************************************************************************/
4450
4451BOOL WIN32API GetKeyboardLayoutNameW(LPWSTR pwszKLID)
4452{
4453 dprintf(("USER32:GetKeyboardLayoutNameW (%08x) not implemented.",
4454 pwszKLID));
4455
4456 return(FALSE);
4457}
4458
4459
4460
4461
4462/*****************************************************************************
4463 * Name : HWINSTA WIN32API GetProcessWindowStation
4464 * Purpose : The GetProcessWindowStation function returns a handle of the
4465 * window station associated with the calling process.
4466 * Parameters:
4467 * Variables :
4468 * Result : If the function succeeds, the return value is a handle of the
4469 * window station associated with the calling process.
4470 * If the function fails, the return value is NULL. This can occur
4471 * if the calling process is not an application written for Windows
4472 * NT. To get extended error information, call GetLastError.
4473 * Remark :
4474 * Status : UNTESTED STUB
4475 *
4476 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4477 *****************************************************************************/
4478
4479HWINSTA WIN32API GetProcessWindowStation(VOID)
4480{
4481 dprintf(("USER32:GetProcessWindowStation () not implemented.\n"));
4482
4483 return (NULL);
4484}
4485
4486
4487
4488/*****************************************************************************
4489 * Name : HDESK WIN32API GetThreadDesktop
4490 * Purpose : The GetThreadDesktop function returns a handle to the desktop
4491 * associated with a specified thread.
4492 * Parameters: DWORD dwThreadId thread identifier
4493 * Variables :
4494 * Result : If the function succeeds, the return value is the handle of the
4495 * desktop associated with the specified thread.
4496 * Remark :
4497 * Status : UNTESTED STUB
4498 *
4499 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4500 *****************************************************************************/
4501
4502HDESK WIN32API GetThreadDesktop(DWORD dwThreadId)
4503{
4504 dprintf(("USER32:GetThreadDesktop (%u) not implemented.\n",
4505 dwThreadId));
4506
4507 return (NULL);
4508}
4509
4510
4511/*****************************************************************************
4512 * Name : BOOL WIN32API GetUserObjectInformationA
4513 * Purpose : The GetUserObjectInformation function returns information about
4514 * a window station or desktop object.
4515 * Parameters: HANDLE hObj handle of object to get information for
4516 * int nIndex type of information to get
4517 * PVOID pvInfo points to buffer that receives the information
4518 * DWORD nLength size, in bytes, of pvInfo buffer
4519 * LPDWORD lpnLengthNeeded receives required size, in bytes, of pvInfo buffer
4520 * Variables :
4521 * Result : If the function succeeds, the return value is TRUE.
4522 * If the function fails, the return value is FALSE. To get extended
4523 * error information, call GetLastError.
4524 * Remark :
4525 * Status : UNTESTED STUB
4526 *
4527 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4528 *****************************************************************************/
4529
4530BOOL WIN32API GetUserObjectInformationA(HANDLE hObj,
4531 int nIndex,
4532 PVOID pvInfo,
4533 DWORD nLength,
4534 LPDWORD lpnLengthNeeded)
4535{
4536 dprintf(("USER32:GetUserObjectInformationA (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
4537 hObj,
4538 nIndex,
4539 pvInfo,
4540 nLength,
4541 lpnLengthNeeded));
4542
4543 return (FALSE);
4544}
4545
4546
4547/*****************************************************************************
4548 * Name : BOOL WIN32API GetUserObjectInformationW
4549 * Purpose : The GetUserObjectInformation function returns information about
4550 * a window station or desktop object.
4551 * Parameters: HANDLE hObj handle of object to get information for
4552 * int nIndex type of information to get
4553 * PVOID pvInfo points to buffer that receives the information
4554 * DWORD nLength size, in bytes, of pvInfo buffer
4555 * LPDWORD lpnLengthNeeded receives required size, in bytes, of pvInfo buffer
4556 * Variables :
4557 * Result : If the function succeeds, the return value is TRUE.
4558 * If the function fails, the return value is FALSE. To get extended
4559 * error information, call GetLastError.
4560 * Remark :
4561 * Status : UNTESTED STUB
4562 *
4563 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4564 *****************************************************************************/
4565
4566BOOL WIN32API GetUserObjectInformationW(HANDLE hObj,
4567 int nIndex,
4568 PVOID pvInfo,
4569 DWORD nLength,
4570 LPDWORD lpnLengthNeeded)
4571{
4572 dprintf(("USER32:GetUserObjectInformationW (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
4573 hObj,
4574 nIndex,
4575 pvInfo,
4576 nLength,
4577 lpnLengthNeeded));
4578
4579 return (FALSE);
4580}
4581
4582
4583/*****************************************************************************
4584 * Name : BOOL WIN32API GetUserObjectSecurity
4585 * Purpose : The GetUserObjectSecurity function retrieves security information
4586 * for the specified user object.
4587 * Parameters: HANDLE hObj handle of user object
4588 * SECURITY_INFORMATION * pSIRequested address of requested security information
4589 * LPSECURITY_DESCRIPTOR pSID address of security descriptor
4590 * DWORD nLength size of buffer for security descriptor
4591 * LPDWORD lpnLengthNeeded address of required size of buffer
4592 * Variables :
4593 * Result : If the function succeeds, the return value is TRUE.
4594 * If the function fails, the return value is FALSE. To get extended
4595 * error information, call GetLastError.
4596 * Remark :
4597 * Status : UNTESTED STUB
4598 *
4599 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4600 *****************************************************************************/
4601
4602BOOL WIN32API GetUserObjectSecurity(HANDLE hObj,
4603 SECURITY_INFORMATION * pSIRequested,
4604 LPSECURITY_DESCRIPTOR pSID,
4605 DWORD nLength,
4606 LPDWORD lpnLengthNeeded)
4607{
4608 dprintf(("USER32:GetUserObjectSecurity (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
4609 hObj,
4610 pSIRequested,
4611 pSID,
4612 nLength,
4613 lpnLengthNeeded));
4614
4615 return (FALSE);
4616}
4617
4618
4619
4620/*****************************************************************************
4621 * Name : int WIN32API GetWindowRgn
4622 * Purpose : The GetWindowRgn function obtains a copy of the window region of a window.
4623 * Parameters: HWND hWnd handle to window whose window region is to be obtained
4624 * HRGN hRgn handle to region that receives a copy of the window region
4625 * Variables :
4626 * Result : NULLREGION, SIMPLEREGION, COMPLEXREGION, ERROR
4627 * Remark :
4628 * Status : UNTESTED STUB
4629 *
4630 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4631 *****************************************************************************/
4632
4633int WIN32API GetWindowRgn (HWND hWnd,
4634 HRGN hRgn)
4635{
4636 dprintf(("USER32:GetWindowRgn (%08xh,%08x) not implemented.\n",
4637 hWnd,
4638 hRgn));
4639
4640 return (NULLREGION);
4641}
4642
4643
4644
4645/*****************************************************************************
4646 * Name : HCURSOR WIN32API LoadCursorFromFileA
4647 * Purpose : The LoadCursorFromFile function creates a cursor based on data
4648 * contained in a file. The file is specified by its name or by a
4649 * system cursor identifier. The function returns a handle to the
4650 * newly created cursor. Files containing cursor data may be in
4651 * either cursor (.CUR) or animated cursor (.ANI) format.
4652 * Parameters: LPCTSTR lpFileName pointer to cursor file, or system cursor id
4653 * Variables :
4654 * Result : If the function is successful, the return value is a handle to
4655 * the new cursor.
4656 * If the function fails, the return value is NULL. To get extended
4657 * error information, call GetLastError. GetLastError may return
4658 * the following
4659 * Remark :
4660 * Status : UNTESTED STUB
4661 *
4662 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4663 *****************************************************************************/
4664
4665HCURSOR WIN32API LoadCursorFromFileA(LPCTSTR lpFileName)
4666{
4667 dprintf(("USER32:LoadCursorFromFileA (%s) not implemented.\n",
4668 lpFileName));
4669
4670 return (NULL);
4671}
4672
4673
4674/*****************************************************************************
4675 * Name : HCURSOR WIN32API LoadCursorFromFileW
4676 * Purpose : The LoadCursorFromFile function creates a cursor based on data
4677 * contained in a file. The file is specified by its name or by a
4678 * system cursor identifier. The function returns a handle to the
4679 * newly created cursor. Files containing cursor data may be in
4680 * either cursor (.CUR) or animated cursor (.ANI) format.
4681 * Parameters: LPCTSTR lpFileName pointer to cursor file, or system cursor id
4682 * Variables :
4683 * Result : If the function is successful, the return value is a handle to
4684 * the new cursor.
4685 * If the function fails, the return value is NULL. To get extended
4686 * error information, call GetLastError. GetLastError may return
4687 * the following
4688 * Remark :
4689 * Status : UNTESTED STUB
4690 *
4691 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4692 *****************************************************************************/
4693
4694HCURSOR WIN32API LoadCursorFromFileW(LPCWSTR lpFileName)
4695{
4696 dprintf(("USER32:LoadCursorFromFileW (%s) not implemented.\n",
4697 lpFileName));
4698
4699 return (NULL);
4700}
4701
4702
4703/*****************************************************************************
4704 * Name : HLK WIN32API LoadKeyboardLayoutA
4705 * Purpose : The LoadKeyboardLayout function loads a new keyboard layout into
4706 * the system. Several keyboard layouts can be loaded at a time, but
4707 * only one per process is active at a time. Loading multiple keyboard
4708 * layouts makes it possible to rapidly switch between layouts.
4709 * Parameters:
4710 * Variables :
4711 * Result : If the function succeeds, the return value is the handle of the
4712 * keyboard layout.
4713 * If the function fails, the return value is NULL. To get extended
4714 * error information, call GetLastError.
4715 * Remark :
4716 * Status : UNTESTED STUB
4717 *
4718 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4719 *****************************************************************************/
4720
4721HKL WIN32API LoadKeyboardLayoutA(LPCTSTR pwszKLID,
4722 UINT Flags)
4723{
4724 dprintf(("USER32:LeadKeyboardLayoutA (%s,%u) not implemented.\n",
4725 pwszKLID,
4726 Flags));
4727
4728 return (NULL);
4729}
4730
4731
4732/*****************************************************************************
4733 * Name : HLK WIN32API LoadKeyboardLayoutW
4734 * Purpose : The LoadKeyboardLayout function loads a new keyboard layout into
4735 * the system. Several keyboard layouts can be loaded at a time, but
4736 * only one per process is active at a time. Loading multiple keyboard
4737 * layouts makes it possible to rapidly switch between layouts.
4738 * Parameters:
4739 * Variables :
4740 * Result : If the function succeeds, the return value is the handle of the
4741 * keyboard layout.
4742 * If the function fails, the return value is NULL. To get extended
4743 * error information, call GetLastError.
4744 * Remark :
4745 * Status : UNTESTED STUB
4746 *
4747 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4748 *****************************************************************************/
4749
4750HKL WIN32API LoadKeyboardLayoutW(LPCWSTR pwszKLID,
4751 UINT Flags)
4752{
4753 dprintf(("USER32:LeadKeyboardLayoutW (%s,%u) not implemented.\n",
4754 pwszKLID,
4755 Flags));
4756
4757 return (NULL);
4758}
4759
4760
4761/*****************************************************************************
4762 * Name : UINT WIN32API MapVirtualKeyExA
4763 * Purpose : The MapVirtualKeyEx function translates (maps) a virtual-key
4764 * code into a scan code or character value, or translates a scan
4765 * code into a virtual-key code. The function translates the codes
4766 * using the input language and physical keyboard layout identified
4767 * by the given keyboard layout handle.
4768 * Parameters:
4769 * Variables :
4770 * Result : The return value is either a scan code, a virtual-key code, or
4771 * a character value, depending on the value of uCode and uMapType.
4772 * If there is no translation, the return value is zero.
4773 * Remark :
4774 * Status : UNTESTED STUB
4775 *
4776 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4777 *****************************************************************************/
4778
4779UINT WIN32API MapVirtualKeyExA(UINT uCode,
4780 UINT uMapType,
4781 HKL dwhkl)
4782{
4783 dprintf(("USER32:MapVirtualKeyExA (%u,%u,%08x) not implemented.\n",
4784 uCode,
4785 uMapType,
4786 dwhkl));
4787
4788 return (0);
4789}
4790
4791
4792/*****************************************************************************
4793 * Name : UINT WIN32API MapVirtualKeyExW
4794 * Purpose : The MapVirtualKeyEx function translates (maps) a virtual-key
4795 * code into a scan code or character value, or translates a scan
4796 * code into a virtual-key code. The function translates the codes
4797 * using the input language and physical keyboard layout identified
4798 * by the given keyboard layout handle.
4799 * Parameters:
4800 * Variables :
4801 * Result : The return value is either a scan code, a virtual-key code, or
4802 * a character value, depending on the value of uCode and uMapType.
4803 * If there is no translation, the return value is zero.
4804 * Remark :
4805 * Status : UNTESTED STUB
4806
4807 *
4808 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4809 *****************************************************************************/
4810
4811UINT WIN32API MapVirtualKeyExW(UINT uCode,
4812 UINT uMapType,
4813 HKL dwhkl)
4814{
4815 dprintf(("USER32:MapVirtualKeyExW (%u,%u,%08x) not implemented.\n",
4816 uCode,
4817 uMapType,
4818 dwhkl));
4819
4820 return (0);
4821}
4822
4823
4824/*****************************************************************************
4825 * Name : int WIN32API MessageBoxExA
4826 * Purpose : The MessageBoxEx function creates, displays, and operates a message box.
4827 * Parameters: HWND hWnd handle of owner window
4828 * LPCTSTR lpText address of text in message box
4829 * LPCTSTR lpCaption address of title of message box
4830 * UINT uType style of message box
4831 * WORD wLanguageId language identifier
4832 * Variables :
4833 * Result : If the function succeeds, the return value is a nonzero menu-item
4834 * value returned by the dialog box.
4835 * Remark :
4836 * Status : UNTESTED STUB
4837 *
4838 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4839 *****************************************************************************/
4840
4841int WIN32API MessageBoxExA(HWND hWnd,
4842 LPCTSTR lpText,
4843 LPCTSTR lpCaption,
4844 UINT uType,
4845 WORD wLanguageId)
4846{
4847 dprintf(("USER32:MessageBoxExA (%08xh,%s,%s,%u,%08w) not implemented.\n",
4848 hWnd,
4849 lpText,
4850 lpCaption,
4851 uType,
4852 wLanguageId));
4853
4854 return (MessageBoxA(hWnd,
4855 lpText,
4856 lpCaption,
4857 uType));
4858}
4859
4860
4861/*****************************************************************************
4862 * Name : int WIN32API MessageBoxExW
4863 * Purpose : The MessageBoxEx function creates, displays, and operates a message box.
4864 * Parameters: HWND hWnd handle of owner window
4865 * LPCTSTR lpText address of text in message box
4866 * LPCTSTR lpCaption address of title of message box
4867 * UINT uType style of message box
4868 * WORD wLanguageId language identifier
4869 * Variables :
4870 * Result : If the function succeeds, the return value is a nonzero menu-item
4871 * value returned by the dialog box.
4872 * Remark :
4873 * Status : UNTESTED STUB
4874 *
4875 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4876 *****************************************************************************/
4877
4878int WIN32API MessageBoxExW(HWND hWnd,
4879 LPCWSTR lpText,
4880 LPCWSTR lpCaption,
4881 UINT uType,
4882 WORD wLanguageId)
4883{
4884
4885 dprintf(("USER32:MessageBoxExW (%08xh,%x,%x,%u,%08w) not implemented.\n",
4886 hWnd,
4887 lpText,
4888 lpCaption,
4889 uType,
4890 wLanguageId));
4891
4892 return MessageBoxW(hWnd, lpText, lpCaption, uType);
4893}
4894
4895
4896/*****************************************************************************
4897 * Name : BOOL WIN32API MessageBoxIndirectW
4898 * Purpose : The MessageBoxIndirect function creates, displays, and operates
4899 * a message box. The message box contains application-defined
4900 * message text and title, any icon, and any combination of
4901 * predefined push buttons.
4902 * Parameters:
4903 * Variables :
4904 * Result :
4905 * Remark :
4906 * Status : UNTESTED STUB
4907 *
4908 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4909 *****************************************************************************/
4910
4911BOOL WIN32API MessageBoxIndirectW(LPMSGBOXPARAMSW lpMsgBoxParams)
4912{
4913 dprintf(("USER32:MessageBoxIndirectW (%08x) not implemented.\n",
4914 lpMsgBoxParams));
4915
4916 return (FALSE);
4917}
4918
4919
4920/*****************************************************************************
4921 * Name : BOOL WIN32API MessageBoxIndirectA
4922 * Purpose : The MessageBoxIndirect function creates, displays, and operates
4923 * a message box. The message box contains application-defined
4924 * message text and title, any icon, and any combination of
4925 * predefined push buttons.
4926 * Parameters:
4927 * Variables :
4928 * Result :
4929 * Remark :
4930 * Status : UNTESTED STUB
4931 *
4932 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4933 *****************************************************************************/
4934
4935BOOL WIN32API MessageBoxIndirectA(LPMSGBOXPARAMSA lpMsgBoxParams)
4936{
4937 dprintf(("USER32:MessageBoxIndirectA (%08x) not implemented.\n",
4938 lpMsgBoxParams));
4939
4940 return (FALSE);
4941}
4942
4943
4944/*****************************************************************************
4945 * Name : DWORD WIN32API OemKeyScan
4946 * Purpose : The OemKeyScan function maps OEM ASCII codes 0 through 0x0FF
4947 * into the OEM scan codes and shift states. The function provides
4948 * information that allows a program to send OEM text to another
4949 * program by simulating keyboard input.
4950 * Parameters:
4951 * Variables :
4952 * Result :
4953 * Remark :
4954 * Status : UNTESTED STUB
4955 *
4956 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4957 *****************************************************************************/
4958
4959DWORD WIN32API OemKeyScan(WORD wOemChar)
4960{
4961 dprintf(("USER32:OemKeyScan (%u) not implemented.\n",
4962 wOemChar));
4963
4964 return (wOemChar);
4965}
4966
4967
4968/*****************************************************************************
4969 * Name : HDESK WIN32API OpenDesktopA
4970 * Purpose : The OpenDesktop function returns a handle to an existing desktop.
4971 * A desktop is a secure object contained within a window station
4972 * object. A desktop has a logical display surface and contains
4973 * windows, menus and hooks.
4974 * Parameters: LPCTSTR lpszDesktopName name of the desktop to open
4975 * DWORD dwFlags flags to control interaction with other applications
4976 * BOOL fInherit specifies whether returned handle is inheritable
4977 * DWORD dwDesiredAccess specifies access of returned handle
4978 * Variables :
4979 * Result : If the function succeeds, the return value is the handle to the
4980 * opened desktop.
4981 * If the function fails, the return value is NULL. To get extended
4982 * error information, call GetLastError.
4983 * Remark :
4984 * Status : UNTESTED STUB
4985 *
4986 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4987 *****************************************************************************/
4988
4989HDESK WIN32API OpenDesktopA(LPCTSTR lpszDesktopName,
4990 DWORD dwFlags,
4991 BOOL fInherit,
4992 DWORD dwDesiredAccess)
4993{
4994 dprintf(("USER32:OpenDesktopA (%s,%08xh,%08xh,%08x) not implemented.\n",
4995 lpszDesktopName,
4996 dwFlags,
4997 fInherit,
4998 dwDesiredAccess));
4999
5000 return (NULL);
5001}
5002
5003
5004/*****************************************************************************
5005 * Name : HDESK WIN32API OpenDesktopW
5006 * Purpose : The OpenDesktop function returns a handle to an existing desktop.
5007 * A desktop is a secure object contained within a window station
5008 * object. A desktop has a logical display surface and contains
5009 * windows, menus and hooks.
5010 * Parameters: LPCTSTR lpszDesktopName name of the desktop to open
5011 * DWORD dwFlags flags to control interaction with other applications
5012 * BOOL fInherit specifies whether returned handle is inheritable
5013 * DWORD dwDesiredAccess specifies access of returned handle
5014 * Variables :
5015 * Result : If the function succeeds, the return value is the handle to the
5016 * opened desktop.
5017 * If the function fails, the return value is NULL. To get extended
5018 * error information, call GetLastError.
5019 * Remark :
5020 * Status : UNTESTED STUB
5021 *
5022 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5023 *****************************************************************************/
5024
5025HDESK WIN32API OpenDesktopW(LPCTSTR lpszDesktopName,
5026 DWORD dwFlags,
5027 BOOL fInherit,
5028 DWORD dwDesiredAccess)
5029{
5030 dprintf(("USER32:OpenDesktopW (%s,%08xh,%08xh,%08x) not implemented.\n",
5031 lpszDesktopName,
5032 dwFlags,
5033 fInherit,
5034 dwDesiredAccess));
5035
5036 return (NULL);
5037}
5038
5039
5040/*****************************************************************************
5041 * Name : HDESK WIN32API OpenInputDesktop
5042 * Purpose : The OpenInputDesktop function returns a handle to the desktop
5043 * that receives user input. The input desktop is a desktop on the
5044 * window station associated with the logged-on user.
5045 * Parameters: DWORD dwFlags flags to control interaction with other applications
5046 * BOOL fInherit specifies whether returned handle is inheritable
5047 * DWORD dwDesiredAccess specifies access of returned handle
5048 * Variables :
5049 * Result : If the function succeeds, the return value is a handle of the
5050 * desktop that receives user input.
5051 * If the function fails, the return value is NULL. To get extended
5052 * error information, call GetLastError.
5053 * Remark :
5054 * Status : UNTESTED STUB
5055 *
5056 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5057 *****************************************************************************/
5058
5059HDESK WIN32API OpenInputDesktop(DWORD dwFlags,
5060 BOOL fInherit,
5061 DWORD dwDesiredAccess)
5062{
5063 dprintf(("USER32:OpenInputDesktop (%08xh,%08xh,%08x) not implemented.\n",
5064 dwFlags,
5065 fInherit,
5066 dwDesiredAccess));
5067
5068 return (NULL);
5069}
5070
5071
5072/*****************************************************************************
5073 * Name : HWINSTA WIN32API OpenWindowStationA
5074 * Purpose : The OpenWindowStation function returns a handle to an existing
5075 * window station.
5076 * Parameters: LPCTSTR lpszWinStaName name of the window station to open
5077 * BOOL fInherit specifies whether returned handle is inheritable
5078 * DWORD dwDesiredAccess specifies access of returned handle
5079 * Variables :
5080 * Result : If the function succeeds, the return value is the handle to the
5081 * specified window station.
5082 * If the function fails, the return value is NULL. To get extended
5083 * error information, call GetLastError.
5084 * Remark :
5085 * Status : UNTESTED STUB
5086 *
5087 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5088 *****************************************************************************/
5089
5090HWINSTA WIN32API OpenWindowStationA(LPCTSTR lpszWinStaName,
5091 BOOL fInherit,
5092 DWORD dwDesiredAccess)
5093{
5094 dprintf(("USER32:OpenWindowStatieonA (%s,%08xh,%08x) not implemented.\n",
5095 lpszWinStaName,
5096 fInherit,
5097 dwDesiredAccess));
5098
5099 return (NULL);
5100}
5101
5102
5103/*****************************************************************************
5104 * Name : HWINSTA WIN32API OpenWindowStationW
5105 * Purpose : The OpenWindowStation function returns a handle to an existing
5106 * window station.
5107 * Parameters: LPCTSTR lpszWinStaName name of the window station to open
5108 * BOOL fInherit specifies whether returned handle is inheritable
5109 * DWORD dwDesiredAccess specifies access of returned handle
5110 * Variables :
5111 * Result : If the function succeeds, the return value is the handle to the
5112 * specified window station.
5113 * If the function fails, the return value is NULL. To get extended
5114 * error information, call GetLastError.
5115
5116
5117 * Remark :
5118 * Status : UNTESTED STUB
5119 *
5120 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5121 *****************************************************************************/
5122
5123HWINSTA WIN32API OpenWindowStationW(LPCTSTR lpszWinStaName,
5124 BOOL fInherit,
5125 DWORD dwDesiredAccess)
5126{
5127 dprintf(("USER32:OpenWindowStatieonW (%s,%08xh,%08x) not implemented.\n",
5128 lpszWinStaName,
5129 fInherit,
5130 dwDesiredAccess));
5131
5132 return (NULL);
5133}
5134
5135
5136/*****************************************************************************
5137 * Name : BOOL WIN32API PaintDesktop
5138 * Purpose : The PaintDesktop function fills the clipping region in the
5139 * specified device context with the desktop pattern or wallpaper.
5140 * The function is provided primarily for shell desktops.
5141 * Parameters:
5142 * Variables :
5143 * Result : If the function succeeds, the return value is TRUE.
5144 * If the function fails, the return value is FALSE.
5145 * Remark :
5146 * Status : UNTESTED STUB
5147 *
5148 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5149 *****************************************************************************/
5150
5151BOOL WIN32API PaintDesktop(HDC hdc)
5152{
5153 dprintf(("USER32:PaintDesktop (%08x) not implemented.\n",
5154 hdc));
5155
5156 return (FALSE);
5157}
5158
5159
5160/*****************************************************************************
5161 * Name : BOOL WIN32API SendMessageCallbackA
5162 * Purpose : The SendMessageCallback function sends the specified message to
5163 * a window or windows. The function calls the window procedure for
5164 * the specified window and returns immediately. After the window
5165 * procedure processes the message, the system calls the specified
5166 * callback function, passing the result of the message processing
5167 * and an application-defined value to the callback function.
5168 * Parameters: HWND hwnd handle of destination window
5169 * UINT uMsg message to send
5170 * WPARAM wParam first message parameter
5171 * LPARAM lParam second message parameter
5172 * SENDASYNCPROC lpResultCallBack function to receive message value
5173 * DWORD dwData value to pass to callback function
5174 * Variables :
5175 * Result : If the function succeeds, the return value is TRUE.
5176 * If the function fails, the return value is FALSE. To get extended
5177 * error information, call GetLastError.
5178 * Remark :
5179 * Status : UNTESTED STUB
5180 *
5181 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5182 *****************************************************************************/
5183
5184BOOL WIN32API SendMessageCallbackA(HWND hWnd,
5185 UINT uMsg,
5186 WPARAM wParam,
5187 LPARAM lParam,
5188 SENDASYNCPROC lpResultCallBack,
5189 DWORD dwData)
5190{
5191 dprintf(("USER32:SendMessageCallBackA (%08xh,%08xh,%08xh,%08xh,%08xh,%08x) not implemented.\n",
5192 hWnd,
5193 uMsg,
5194 wParam,
5195 lParam,
5196 lpResultCallBack,
5197 dwData));
5198
5199 return (FALSE);
5200}
5201
5202
5203/*****************************************************************************
5204 * Name : BOOL WIN32API SendMessageCallbackW
5205 * Purpose : The SendMessageCallback function sends the specified message to
5206 * a window or windows. The function calls the window procedure for
5207 * the specified window and returns immediately. After the window
5208 * procedure processes the message, the system calls the specified
5209 * callback function, passing the result of the message processing
5210 * and an application-defined value to the callback function.
5211 * Parameters: HWND hwnd handle of destination window
5212 * UINT uMsg message to send
5213 * WPARAM wParam first message parameter
5214 * LPARAM lParam second message parameter
5215 * SENDASYNCPROC lpResultCallBack function to receive message value
5216 * DWORD dwData value to pass to callback function
5217 * Variables :
5218 * Result : If the function succeeds, the return value is TRUE.
5219 * If the function fails, the return value is FALSE. To get extended
5220 * error information, call GetLastError.
5221 * Remark :
5222 * Status : UNTESTED STUB
5223 *
5224 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5225 *****************************************************************************/
5226
5227BOOL WIN32API SendMessageCallbackW(HWND hWnd,
5228 UINT uMsg,
5229 WPARAM wParam,
5230 LPARAM lParam,
5231 SENDASYNCPROC lpResultCallBack,
5232 DWORD dwData)
5233{
5234 dprintf(("USER32:SendMessageCallBackW (%08xh,%08xh,%08xh,%08xh,%08xh,%08x) not implemented.\n",
5235 hWnd,
5236 uMsg,
5237 wParam,
5238 lParam,
5239 lpResultCallBack,
5240 dwData));
5241
5242 return (FALSE);
5243}
5244
5245
5246/*****************************************************************************
5247 * Name : VOID WIN32API SetDebugErrorLevel
5248 * Purpose : The SetDebugErrorLevel function sets the minimum error level at
5249 * which Windows will generate debugging events and pass them to a debugger.
5250 * Parameters: DWORD dwLevel debugging error level
5251 * Variables :
5252 * Result :
5253 * Remark :
5254 * Status : UNTESTED STUB
5255 *
5256 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5257 *****************************************************************************/
5258
5259VOID WIN32API SetDebugErrorLevel(DWORD dwLevel)
5260{
5261 dprintf(("USER32:SetDebugErrorLevel (%08x) not implemented.\n",
5262 dwLevel));
5263}
5264
5265
5266/*****************************************************************************
5267 * Name : BOOL WIN32API SetProcessWindowStation
5268 * Purpose : The SetProcessWindowStation function assigns a window station
5269 * to the calling process. This enables the process to access
5270 * objects in the window station such as desktops, the clipboard,
5271 * and global atoms. All subsequent operations on the window station
5272 * use the access rights granted to hWinSta.
5273 * Parameters:
5274 * Variables :
5275 * Result : If the function succeeds, the return value is TRUE.
5276 * If the function fails, the return value is FALSE. To get extended
5277 * error information, call GetLastError.
5278 * Remark :
5279 * Status : UNTESTED STUB
5280 *
5281 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5282 *****************************************************************************/
5283
5284BOOL WIN32API SetProcessWindowStation(HWINSTA hWinSta)
5285{
5286 dprintf(("USER32:SetProcessWindowStation (%08x) not implemented.\n",
5287 hWinSta));
5288
5289 return (FALSE);
5290}
5291
5292
5293/*****************************************************************************
5294 * Name : BOOL WIN32API SetSystemCursor
5295 * Purpose : The SetSystemCursor function replaces the contents of the system
5296 * cursor specified by dwCursorId with the contents of the cursor
5297 * specified by hCursor, and then destroys hCursor. This function
5298 * lets an application customize the system cursors.
5299 * Parameters: HCURSOR hCursor set specified system cursor to this cursor's
5300 * contents, then destroy this
5301 * DWORD dwCursorID system cursor specified by its identifier
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 SetSystemCursor(HCURSOR hCursor,
5313 DWORD dwCursorId)
5314{
5315 dprintf(("USER32:SetSystemCursor (%08xh,%08x) not implemented.\n",
5316 hCursor,
5317 dwCursorId));
5318
5319 return (FALSE);
5320}
5321
5322
5323/*****************************************************************************
5324 * Name : BOOL WIN32API SetThreadDesktop
5325 * Purpose : The SetThreadDesktop function assigns a desktop to the calling
5326 * thread. All subsequent operations on the desktop use the access
5327 * rights granted to hDesk.
5328 * Parameters: HDESK hDesk handle of the desktop to assign to this thread
5329 * Variables :
5330 * Result : If the function succeeds, the return value is TRUE.
5331 * If the function fails, the return value is FALSE. To get extended
5332 * error information, call GetLastError.
5333 * Remark :
5334 * Status : UNTESTED STUB
5335 *
5336 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5337 *****************************************************************************/
5338
5339BOOL WIN32API SetThreadDesktop(HDESK hDesktop)
5340{
5341 dprintf(("USER32:SetThreadDesktop (%08x) not implemented.\n",
5342 hDesktop));
5343
5344 return (FALSE);
5345}
5346
5347
5348/*****************************************************************************
5349 * Name : BOOL WIN32API SetUserObjectInformationA
5350 * Purpose : The SetUserObjectInformation function sets information about a
5351 * window station or desktop object.
5352 * Parameters: HANDLE hObject handle of the object for which to set information
5353 * int nIndex type of information to set
5354 * PVOID lpvInfo points to a buffer that contains the information
5355 * DWORD cbInfo size, in bytes, of lpvInfo buffer
5356 * Variables :
5357 * Result : If the function succeeds, the return value is TRUE.
5358 * If the function fails the return value is FALSE. To get extended
5359 * error information, call GetLastError.
5360 * Remark :
5361 * Status : UNTESTED STUB
5362 *
5363 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5364 *****************************************************************************/
5365
5366BOOL WIN32API SetUserObjectInformationA(HANDLE hObject,
5367 int nIndex,
5368 PVOID lpvInfo,
5369 DWORD cbInfo)
5370{
5371 dprintf(("USER32:SetUserObjectInformationA (%08xh,%u,%08xh,%08x) not implemented.\n",
5372 hObject,
5373 nIndex,
5374 lpvInfo,
5375 cbInfo));
5376
5377 return (FALSE);
5378}
5379
5380
5381/*****************************************************************************
5382 * Name : BOOL WIN32API SetUserObjectInformationW
5383 * Purpose : The SetUserObjectInformation function sets information about a
5384 * window station or desktop object.
5385 * Parameters: HANDLE hObject handle of the object for which to set information
5386 * int nIndex type of information to set
5387 * PVOID lpvInfo points to a buffer that contains the information
5388 * DWORD cbInfo size, in bytes, of lpvInfo buffer
5389 * Variables :
5390 * Result : If the function succeeds, the return value is TRUE.
5391 * If the function fails the return value is FALSE. To get extended
5392 * error information, call GetLastError.
5393 * Remark :
5394 * Status : UNTESTED STUB
5395 *
5396 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5397 *****************************************************************************/
5398
5399BOOL WIN32API SetUserObjectInformationW(HANDLE hObject,
5400 int nIndex,
5401 PVOID lpvInfo,
5402 DWORD cbInfo)
5403{
5404 dprintf(("USER32:SetUserObjectInformationW (%08xh,%u,%08xh,%08x) not implemented.\n",
5405 hObject,
5406 nIndex,
5407 lpvInfo,
5408 cbInfo));
5409
5410 return (FALSE);
5411}
5412
5413
5414/*****************************************************************************
5415 * Name : BOOL WIN32API SetUserObjectSecurity
5416 * Purpose : The SetUserObjectSecurity function sets the security of a user
5417 * object. This can be, for example, a window or a DDE conversation
5418 * Parameters: HANDLE hObject handle of user object
5419 * SECURITY_INFORMATION * psi address of security information
5420 * LPSECURITY_DESCRIPTOR psd address of security descriptor
5421 * Variables :
5422 * Result : If the function succeeds, the return value is TRUE.
5423 * If the function fails, the return value is FALSE. To get extended
5424 * error information, call GetLastError.
5425 * Remark :
5426 * Status : UNTESTED STUB
5427 *
5428 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5429 *****************************************************************************/
5430
5431BOOL WIN32API SetUserObjectSecurity(HANDLE hObject,
5432 SECURITY_INFORMATION * psi,
5433 LPSECURITY_DESCRIPTOR psd)
5434{
5435 dprintf(("USER32:SetUserObjectSecuroty (%08xh,%08xh,%08x) not implemented.\n",
5436 hObject,
5437 psi,
5438 psd));
5439
5440 return (FALSE);
5441}
5442
5443
5444/*****************************************************************************
5445 * Name : int WIN32API SetWindowRgn
5446 * Purpose : The SetWindowRgn function sets the window region of a window. The
5447 * window region determines the area within the window where the
5448 * operating system permits drawing. The operating system does not
5449 * display any portion of a window that lies outside of the window region
5450 * Parameters: HWND hWnd handle to window whose window region is to be set
5451 * HRGN hRgn handle to region
5452 * BOOL bRedraw window redraw flag
5453 * Variables :
5454 * Result : If the function succeeds, the return value is non-zero.
5455 * If the function fails, the return value is zero.
5456 * Remark :
5457 * Status : UNTESTED STUB
5458 *
5459 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5460 *****************************************************************************/
5461
5462int WIN32API SetWindowRgn(HWND hWnd,
5463 HRGN hRgn,
5464 BOOL bRedraw)
5465{
5466 dprintf(("USER32:SetWindowRgn (%08xh,%08xh,%u) not implemented.\n",
5467 hWnd,
5468 hRgn,
5469 bRedraw));
5470
5471 return (0);
5472}
5473
5474
5475/*****************************************************************************
5476 * Name : BOOL WIN32API SetWindowsHookW
5477 * Purpose : The SetWindowsHook function is not implemented in the Win32 API.
5478 * Win32-based applications should use the SetWindowsHookEx function.
5479 * Parameters:
5480 * Variables :
5481 * Result :
5482 * Remark : ARGH ! MICROSOFT !
5483 * Status : UNTESTED STUB
5484 *
5485 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5486 *****************************************************************************/
5487
5488HHOOK WIN32API SetWindowsHookW(int nFilterType, HOOKPROC pfnFilterProc)
5489
5490{
5491 return (FALSE);
5492}
5493
5494
5495/*****************************************************************************
5496 * Name : BOOL WIN32API ShowWindowAsync
5497 * Purpose : The ShowWindowAsync function sets the show state of a window
5498 * created by a different thread.
5499 * Parameters: HWND hwnd handle of window
5500 * int nCmdShow show state of window
5501 * Variables :
5502 * Result : If the window was previously visible, the return value is TRUE.
5503 * If the window was previously hidden, the return value is FALSE.
5504 * Remark :
5505 * Status : UNTESTED STUB
5506 *
5507 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5508 *****************************************************************************/
5509
5510BOOL WIN32API ShowWindowAsync (HWND hWnd,
5511 int nCmdShow)
5512{
5513 dprintf(("USER32:ShowWindowAsync (%08xh,%08x) not implemented.\n",
5514 hWnd,
5515 nCmdShow));
5516
5517 return (FALSE);
5518}
5519
5520
5521/*****************************************************************************
5522 * Name : BOOL WIN32API SwitchDesktop
5523 * Purpose : The SwitchDesktop function makes a desktop visible and activates
5524 * it. This enables the desktop to receive input from the user. The
5525 * calling process must have DESKTOP_SWITCHDESKTOP access to the
5526 * desktop for the SwitchDesktop function to succeed.
5527 * Parameters:
5528 * Variables :
5529 * Result : If the function succeeds, the return value is TRUE.
5530 * If the function fails, the return value is FALSE. To get extended
5531 * error information, call GetLastError.
5532 * Remark :
5533 * Status : UNTESTED STUB
5534 *
5535 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5536 *****************************************************************************/
5537
5538BOOL WIN32API SwitchDesktop(HDESK hDesktop)
5539{
5540 dprintf(("USER32:SwitchDesktop (%08x) not implemented.\n",
5541 hDesktop));
5542
5543 return (FALSE);
5544}
5545
5546
5547/*****************************************************************************
5548 * Name : WORD WIN32API TileWindows
5549 * Purpose : The TileWindows function tiles the specified windows, or the child
5550 * windows of the specified parent window.
5551 * Parameters: HWND hwndParent handle of parent window
5552 * WORD wFlags types of windows not to arrange
5553 * LPCRECT lpRect rectangle to arrange windows in
5554 * WORD cChildrenb number of windows to arrange
5555 * const HWND *ahwndChildren array of window handles
5556 * Variables :
5557 * Result : If the function succeeds, the return value is the number of
5558 * windows arranged.
5559 * If the function fails, the return value is zero.
5560 * Remark :
5561 * Status : UNTESTED STUB
5562 *
5563 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5564 *****************************************************************************/
5565
5566WORD WIN32API TileWindows(HWND hwndParent,
5567 UINT wFlags,
5568 const LPRECT lpRect,
5569 UINT cChildrenb,
5570 const HWND *ahwndChildren)
5571{
5572 dprintf(("USER32:TileWindows (%08xh,%08xh,%08xh,%08xh,%08x) not implemented.\n",
5573 hwndParent,
5574 wFlags,
5575 lpRect,
5576 cChildrenb,
5577 ahwndChildren));
5578
5579 return (0);
5580}
5581
5582
5583/*****************************************************************************
5584 * Name : int WIN32API ToAscii
5585 * Purpose : The ToAscii function translates the specified virtual-key code
5586 * and keyboard state to the corresponding Windows character or characters.
5587 * Parameters: UINT uVirtKey virtual-key code
5588 * UINT uScanCode scan code
5589 * PBYTE lpbKeyState address of key-state array
5590 * LPWORD lpwTransKey buffer for translated key
5591 * UINT fuState active-menu flag
5592 * Variables :
5593 * Result : 0 The specified virtual key has no translation for the current
5594 * state of the keyboard.
5595 * 1 One Windows character was copied to the buffer.
5596 * 2 Two characters were copied to the buffer. This usually happens
5597 * when a dead-key character (accent or diacritic) stored in the
5598 * keyboard layout cannot be composed with the specified virtual
5599 * key to form a single character.
5600 * Remark :
5601 * Status : UNTESTED STUB
5602 *
5603 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5604 *****************************************************************************/
5605
5606int WIN32API ToAscii(UINT uVirtKey,
5607 UINT uScanCode,
5608 PBYTE lpbKeyState,
5609 LPWORD lpwTransKey,
5610 UINT fuState)
5611{
5612 dprintf(("USER32:ToAscii (%u,%u,%08xh,%08xh,%u) not implemented.\n",
5613 uVirtKey,
5614 uScanCode,
5615 lpbKeyState,
5616 lpwTransKey,
5617 fuState));
5618
5619 return (0);
5620}
5621
5622
5623/*****************************************************************************
5624 * Name : int WIN32API ToAsciiEx
5625 * Purpose : The ToAscii function translates the specified virtual-key code
5626 * and keyboard state to the corresponding Windows character or characters.
5627 * Parameters: UINT uVirtKey virtual-key code
5628 * UINT uScanCode scan code
5629 * PBYTE lpbKeyState address of key-state array
5630 * LPWORD lpwTransKey buffer for translated key
5631 * UINT fuState active-menu flag
5632 * HLK hlk keyboard layout handle
5633 * Variables :
5634 * Result : 0 The specified virtual key has no translation for the current
5635 * state of the keyboard.
5636 * 1 One Windows character was copied to the buffer.
5637 * 2 Two characters were copied to the buffer. This usually happens
5638 * when a dead-key character (accent or diacritic) stored in the
5639 * keyboard layout cannot be composed with the specified virtual
5640 * key to form a single character.
5641 * Remark :
5642 * Status : UNTESTED STUB
5643 *
5644 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5645 *****************************************************************************/
5646
5647int WIN32API ToAsciiEx(UINT uVirtKey,
5648 UINT uScanCode,
5649 PBYTE lpbKeyState,
5650 LPWORD lpwTransKey,
5651 UINT fuState,
5652 HKL hkl)
5653{
5654 dprintf(("USER32:ToAsciiEx (%u,%u,%08xh,%08xh,%u,%08x) not implemented.\n",
5655 uVirtKey,
5656 uScanCode,
5657 lpbKeyState,
5658 lpwTransKey,
5659 fuState,
5660 hkl));
5661
5662 return (0);
5663}
5664
5665
5666/*****************************************************************************
5667 * Name : int WIN32API ToUnicode
5668 * Purpose : The ToUnicode function translates the specified virtual-key code
5669 * and keyboard state to the corresponding Unicode character or characters.
5670 * Parameters: UINT wVirtKey virtual-key code
5671 * UINT wScanCode scan code
5672 * PBYTE lpKeyState address of key-state array
5673 * LPWSTR pwszBuff buffer for translated key
5674 * int cchBuff size of translated key buffer
5675 * UINT wFlags set of function-conditioning flags
5676 * Variables :
5677 * Result : - 1 The specified virtual key is a dead-key character (accent or
5678 * diacritic). This value is returned regardless of the keyboard
5679 * layout, even if several characters have been typed and are
5680 * stored in the keyboard state. If possible, even with Unicode
5681 * keyboard layouts, the function has written a spacing version of
5682 * the dead-key character to the buffer specified by pwszBuffer.
5683 * For example, the function writes the character SPACING ACUTE
5684 * (0x00B4), rather than the character NON_SPACING ACUTE (0x0301).
5685 * 0 The specified virtual key has no translation for the current
5686 * state of the keyboard. Nothing was written to the buffer
5687 * specified by pwszBuffer.
5688 * 1 One character was written to the buffer specified by pwszBuffer.
5689 * 2 or more Two or more characters were written to the buffer specified by
5690 * pwszBuff. The most common cause for this is that a dead-key
5691 * character (accent or diacritic) stored in the keyboard layout
5692 * could not be combined with the specified virtual key to form a
5693 * single character.
5694 * Remark :
5695 * Status : UNTESTED STUB
5696 *
5697 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5698 *****************************************************************************/
5699
5700int WIN32API ToUnicode(UINT uVirtKey,
5701 UINT uScanCode,
5702 PBYTE lpKeyState,
5703 LPWSTR pwszBuff,
5704 int cchBuff,
5705 UINT wFlags)
5706{
5707 dprintf(("USER32:ToUnicode (%u,%u,%08xh,%08xh,%u,%08x) not implemented.\n",
5708 uVirtKey,
5709 uScanCode,
5710 lpKeyState,
5711 pwszBuff,
5712 cchBuff,
5713 wFlags));
5714
5715 return (0);
5716}
5717
5718
5719/*****************************************************************************
5720 * Name : BOOL WIN32API UnloadKeyboardLayout
5721 * Purpose : The UnloadKeyboardLayout function removes a keyboard layout.
5722 * Parameters: HKL hkl handle of keyboard layout
5723 * Variables :
5724 * Result : If the function succeeds, the return value is the handle of the
5725 * keyboard layout; otherwise, it is NULL. To get extended error
5726 * information, use the GetLastError function.
5727 * Remark :
5728 * Status : UNTESTED STUB
5729 *
5730 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5731 *****************************************************************************/
5732
5733BOOL WIN32API UnloadKeyboardLayout (HKL hkl)
5734{
5735 dprintf(("USER32:UnloadKeyboardLayout (%08x) not implemented.\n",
5736 hkl));
5737
5738 return (0);
5739}
5740
5741
5742/*****************************************************************************
5743 * Name : SHORT WIN32API VkKeyScanExW
5744 * Purpose : The VkKeyScanEx function translates a character to the
5745 * corresponding virtual-key code and shift state. The function
5746 * translates the character using the input language and physical
5747 * keyboard layout identified by the given keyboard layout handle.
5748 * Parameters: UINT uChar character to translate
5749 * HKL hkl keyboard layout handle
5750 * Variables :
5751 * Result : see docs
5752 * Remark :
5753 * Status : UNTESTED STUB
5754 *
5755 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5756 *****************************************************************************/
5757
5758WORD WIN32API VkKeyScanExW(WCHAR uChar,
5759 HKL hkl)
5760{
5761 dprintf(("USER32:VkKeyScanExW (%u,%08x) not implemented.\n",
5762 uChar,
5763 hkl));
5764
5765 return (uChar);
5766}
5767
5768
5769/*****************************************************************************
5770 * Name : SHORT WIN32API VkKeyScanExA
5771 * Purpose : The VkKeyScanEx function translates a character to the
5772 * corresponding virtual-key code and shift state. The function
5773 * translates the character using the input language and physical
5774 * keyboard layout identified by the given keyboard layout handle.
5775 * Parameters: UINT uChar character to translate
5776 * HKL hkl keyboard layout handle
5777 * Variables :
5778 * Result : see docs
5779 * Remark :
5780 * Status : UNTESTED STUB
5781 *
5782 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5783 *****************************************************************************/
5784
5785WORD WIN32API VkKeyScanExA(CHAR uChar,
5786 HKL hkl)
5787{
5788 dprintf(("USER32:VkKeyScanExA (%u,%08x) not implemented.\n",
5789 uChar,
5790 hkl));
5791
5792 return (uChar);
5793}
5794
5795
5796/*****************************************************************************
5797 * Name : VOID WIN32API keybd_event
5798 * Purpose : The keybd_event function synthesizes a keystroke. The system
5799 * can use such a synthesized keystroke to generate a WM_KEYUP or
5800 * WM_KEYDOWN message. The keyboard driver's interrupt handler calls
5801 * the keybd_event function.
5802 * Parameters: BYTE bVk virtual-key code
5803
5804 * BYTE bScan hardware scan code
5805 * DWORD dwFlags flags specifying various function options
5806 * DWORD dwExtraInfo additional data associated with keystroke
5807 * Variables :
5808 * Result :
5809 * Remark :
5810 * Status : UNTESTED STUB
5811 *
5812 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5813 *****************************************************************************/
5814
5815VOID WIN32API keybd_event (BYTE bVk,
5816 BYTE bScan,
5817 DWORD dwFlags,
5818 DWORD dwExtraInfo)
5819{
5820 dprintf(("USER32:keybd_event (%u,%u,%08xh,%08x) not implemented.\n",
5821 bVk,
5822 bScan,
5823 dwFlags,
5824 dwExtraInfo));
5825}
5826
5827
5828/*****************************************************************************
5829 * Name : VOID WIN32API mouse_event
5830 * Purpose : The mouse_event function synthesizes mouse motion and button clicks.
5831 * Parameters: DWORD dwFlags flags specifying various motion/click variants
5832 * DWORD dx horizontal mouse position or position change
5833 * DWORD dy vertical mouse position or position change
5834 * DWORD cButtons unused, reserved for future use, set to zero
5835 * DWORD dwExtraInfo 32 bits of application-defined information
5836 * Variables :
5837 * Result :
5838 * Remark :
5839 * Status : UNTESTED STUB
5840 *
5841 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5842 *****************************************************************************/
5843
5844VOID WIN32API mouse_event(DWORD dwFlags,
5845 DWORD dx,
5846 DWORD dy,
5847 DWORD cButtons,
5848 DWORD dwExtraInfo)
5849{
5850 dprintf(("USER32:mouse_event (%08xh,%u,%u,%u,%08x) not implemented.\n",
5851 dwFlags,
5852 dx,
5853 dy,
5854 cButtons,
5855 dwExtraInfo));
5856}
5857
5858
5859/*****************************************************************************
5860 * Name : BOOL WIN32API SetShellWindow
5861 * Purpose : Unknown
5862 * Parameters: Unknown
5863 * Variables :
5864 * Result :
5865 * Remark :
5866 * Status : UNTESTED UNKNOWN STUB
5867 *
5868 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
5869 *****************************************************************************/
5870
5871BOOL WIN32API SetShellWindow(DWORD x1)
5872{
5873 dprintf(("USER32: SetShellWindow(%08x) not implemented.\n",
5874 x1));
5875
5876 return (FALSE); /* default */
5877}
5878
5879
5880/*****************************************************************************
5881 * Name : BOOL WIN32API PlaySoundEvent
5882 * Purpose : Unknown
5883 * Parameters: Unknown
5884 * Variables :
5885 * Result :
5886 * Remark :
5887 * Status : UNTESTED UNKNOWN STUB
5888 *
5889 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
5890 *****************************************************************************/
5891
5892BOOL WIN32API PlaySoundEvent(DWORD x1)
5893{
5894 dprintf(("USER32: PlaySoundEvent(%08x) not implemented.\n",
5895 x1));
5896
5897 return (FALSE); /* default */
5898}
5899
5900
5901/*****************************************************************************
5902 * Name : BOOL WIN32API TileChildWindows
5903 * Purpose : Unknown
5904 * Parameters: Unknown
5905 * Variables :
5906 * Result :
5907 * Remark :
5908 * Status : UNTESTED UNKNOWN STUB
5909 *
5910 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
5911 *****************************************************************************/
5912
5913BOOL WIN32API TileChildWindows(DWORD x1,
5914 DWORD x2)
5915{
5916 dprintf(("USER32: TileChildWindows(%08xh,%08xh) not implemented.\n",
5917 x1,
5918 x2));
5919
5920 return (FALSE); /* default */
5921}
5922
5923
5924/*****************************************************************************
5925 * Name : BOOL WIN32API SetSysColorsTemp
5926 * Purpose : Unknown
5927 * Parameters: Unknown
5928 * Variables :
5929 * Result :
5930 * Remark :
5931 * Status : UNTESTED UNKNOWN STUB
5932 *
5933 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
5934 *****************************************************************************/
5935
5936BOOL WIN32API SetSysColorsTemp(void)
5937{
5938 dprintf(("USER32: SetSysColorsTemp() not implemented.\n"));
5939
5940 return (FALSE); /* default */
5941}
5942
5943
5944/*****************************************************************************
5945 * Name : BOOL WIN32API RegisterNetworkCapabilities
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 RegisterNetworkCapabilities(DWORD x1,
5957 DWORD x2)
5958{
5959 dprintf(("USER32: RegisterNetworkCapabilities(%08xh,%08xh) not implemented.\n",
5960 x1,
5961 x2));
5962
5963 return (FALSE); /* default */
5964}
5965
5966
5967/*****************************************************************************
5968 * Name : BOOL WIN32API EndTask
5969 * Purpose : Unknown
5970 * Parameters: Unknown
5971 * Variables :
5972 * Result :
5973 * Remark :
5974 * Status : UNTESTED UNKNOWN STUB
5975 *
5976 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
5977 *****************************************************************************/
5978
5979BOOL WIN32API EndTask(DWORD x1,
5980 DWORD x2,
5981 DWORD x3)
5982{
5983 dprintf(("USER32: EndTask(%08xh,%08xh,%08xh) not implemented.\n",
5984 x1,
5985 x2,
5986 x3));
5987
5988 return (FALSE); /* default */
5989}
5990
5991
5992/*****************************************************************************
5993 * Name : BOOL WIN32API SwitchToThisWindow
5994 * Purpose : Unknown
5995 * Parameters: Unknown
5996 * Variables :
5997 * Result :
5998 * Remark :
5999 * Status : UNTESTED UNKNOWN STUB
6000 *
6001 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6002 *****************************************************************************/
6003
6004BOOL WIN32API SwitchToThisWindow(HWND hwnd,
6005 BOOL x2)
6006{
6007 dprintf(("USER32: SwitchToThisWindow(%08xh,%08xh) not implemented.\n",
6008 hwnd,
6009 x2));
6010
6011 return (FALSE); /* default */
6012}
6013
6014
6015/*****************************************************************************
6016 * Name : BOOL WIN32API GetNextQueueWindow
6017 * Purpose : Unknown
6018 * Parameters: Unknown
6019 * Variables :
6020 * Result :
6021 * Remark :
6022 * Status : UNTESTED UNKNOWN STUB
6023 *
6024 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6025 *****************************************************************************/
6026
6027BOOL WIN32API GetNextQueueWindow(DWORD x1,
6028 DWORD x2)
6029{
6030 dprintf(("USER32: GetNextQueueWindow(%08xh,%08xh) not implemented.\n",
6031 x1,
6032 x2));
6033
6034 return (FALSE); /* default */
6035}
6036
6037
6038/*****************************************************************************
6039 * Name : BOOL WIN32API YieldTask
6040 * Purpose : Unknown
6041 * Parameters: Unknown
6042 * Variables :
6043 * Result :
6044 * Remark :
6045 * Status : UNTESTED UNKNOWN STUB
6046 *
6047 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6048 *****************************************************************************/
6049
6050BOOL WIN32API YieldTask(void)
6051{
6052 dprintf(("USER32: YieldTask() not implemented.\n"));
6053
6054 return (FALSE); /* default */
6055}
6056
6057
6058/*****************************************************************************
6059 * Name : BOOL WIN32API WinOldAppHackoMatic
6060 * Purpose : Unknown
6061 * Parameters: Unknown
6062 * Variables :
6063 * Result :
6064 * Remark :
6065 * Status : UNTESTED UNKNOWN STUB
6066 *
6067 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6068 *****************************************************************************/
6069
6070BOOL WIN32API WinOldAppHackoMatic(DWORD x1)
6071{
6072 dprintf(("USER32: WinOldAppHackoMatic(%08x) not implemented.\n",
6073 x1));
6074
6075 return (FALSE); /* default */
6076}
6077
6078
6079/*****************************************************************************
6080 * Name : BOOL WIN32API DragObject
6081 * Purpose : Unknown
6082 * Parameters: Unknown
6083 * Variables :
6084 * Result :
6085 * Remark :
6086 * Status : UNTESTED UNKNOWN STUB
6087 *
6088 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6089 *****************************************************************************/
6090
6091DWORD WIN32API DragObject(HWND x1,HWND x2,UINT x3,DWORD x4,HCURSOR x5)
6092{
6093 dprintf(("USER32: DragObject(%08x,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
6094 x1,
6095 x2,
6096 x3,
6097 x4,
6098 x5));
6099
6100 return (FALSE); /* default */
6101}
6102
6103
6104/*****************************************************************************
6105 * Name : BOOL WIN32API CascadeChildWindows
6106 * Purpose : Unknown
6107 * Parameters: Unknown
6108 * Variables :
6109 * Result :
6110 * Remark :
6111 * Status : UNTESTED UNKNOWN STUB
6112 *
6113 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6114 *****************************************************************************/
6115
6116BOOL WIN32API CascadeChildWindows(DWORD x1,
6117 DWORD x2)
6118{
6119 dprintf(("USER32: CascadeChildWindows(%08xh,%08xh) not implemented.\n",
6120 x1,
6121 x2));
6122
6123 return (FALSE); /* default */
6124}
6125
6126
6127/*****************************************************************************
6128 * Name : BOOL WIN32API RegisterSystemThread
6129 * Purpose : Unknown
6130 * Parameters: Unknown
6131 * Variables :
6132 * Result :
6133 * Remark :
6134 * Status : UNTESTED UNKNOWN STUB
6135 *
6136 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6137 *****************************************************************************/
6138
6139BOOL WIN32API RegisterSystemThread(DWORD x1,
6140 DWORD x2)
6141{
6142 dprintf(("USER32: RegisterSystemThread(%08xh,%08xh) not implemented.\n",
6143 x1,
6144 x2));
6145
6146 return (FALSE); /* default */
6147}
6148
6149
6150/*****************************************************************************
6151 * Name : BOOL WIN32API IsHungThread
6152 * Purpose : Unknown
6153 * Parameters: Unknown
6154 * Variables :
6155 * Result :
6156 * Remark :
6157 * Status : UNTESTED UNKNOWN STUB
6158 *
6159 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6160 *****************************************************************************/
6161
6162BOOL WIN32API IsHungThread(DWORD x1)
6163{
6164 dprintf(("USER32: IsHungThread(%08xh) not implemented.\n",
6165 x1));
6166
6167 return (FALSE); /* default */
6168}
6169
6170
6171/*****************************************************************************
6172 * Name : BOOL WIN32API SysErrorBox
6173 * Purpose : Unknown
6174 * Parameters: Unknown
6175 * Variables :
6176 * Result :
6177 * Remark : HARDERR like ?
6178 * Status : UNTESTED UNKNOWN STUB
6179 *
6180 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6181 *****************************************************************************/
6182
6183BOOL WIN32API SysErrorBox(DWORD x1,
6184 DWORD x2,
6185 DWORD x3)
6186{
6187 dprintf(("USER32: SysErrorBox(%08xh,%08xh,%08xh) not implemented.\n",
6188 x1,
6189 x2,
6190 x3));
6191
6192 return (FALSE); /* default */
6193}
6194
6195
6196/*****************************************************************************
6197 * Name : BOOL WIN32API UserSignalProc
6198 * Purpose : Unknown
6199 * Parameters: Unknown
6200 * Variables :
6201 * Result :
6202 * Remark :
6203 * Status : UNTESTED UNKNOWN STUB
6204 *
6205 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6206 *****************************************************************************/
6207
6208BOOL WIN32API UserSignalProc(DWORD x1,
6209 DWORD x2,
6210 DWORD x3,
6211 DWORD x4)
6212{
6213 dprintf(("USER32: SysErrorBox(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
6214 x1,
6215 x2,
6216 x3,
6217 x4));
6218
6219 return (FALSE); /* default */
6220}
6221
6222
6223/*****************************************************************************
6224 * Name : BOOL WIN32API GetShellWindow
6225 * Purpose : Unknown
6226 * Parameters: Unknown
6227 * Variables :
6228 * Result :
6229 * Remark :
6230 * Status : UNTESTED UNKNOWN STUB
6231 *
6232 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6233 *****************************************************************************/
6234
6235HWND WIN32API GetShellWindow(void)
6236{
6237 dprintf(("USER32: GetShellWindow() not implemented.\n"));
6238
6239 return (0); /* default */
6240}
6241
6242
6243
6244/***********************************************************************
6245 * RegisterTasklist32 [USER32.436]
6246 */
6247DWORD WIN32API RegisterTasklist (DWORD x)
6248{
6249 dprintf(("USER32: RegisterTasklist(%08xh) not implemented.\n",
6250 x));
6251
6252 return TRUE;
6253}
6254
6255
6256/***********************************************************************
6257 * DrawCaptionTemp32A [USER32.599]
6258 *
6259 * PARAMS
6260 *
6261 * RETURNS
6262 * Success:
6263 * Failure:
6264 */
6265
6266BOOL WIN32API DrawCaptionTempA(HWND hwnd,
6267 HDC hdc,
6268 const RECT *rect,
6269 HFONT hFont,
6270 HICON hIcon,
6271 LPCSTR str,
6272 UINT uFlags)
6273{
6274 RECT rc = *rect;
6275
6276 dprintf(("USER32: DrawCaptionTempA(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh)\n",
6277 hwnd,
6278 hdc,
6279 rect,
6280 hFont,
6281 hIcon,
6282 str,
6283 uFlags));
6284
6285 /* drawing background */
6286 if (uFlags & DC_INBUTTON)
6287 {
6288 O32_FillRect (hdc,
6289 &rc,
6290 GetSysColorBrush (COLOR_3DFACE));
6291
6292 if (uFlags & DC_ACTIVE)
6293 {
6294 HBRUSH hbr = O32_SelectObject (hdc,
6295 GetSysColorBrush (COLOR_ACTIVECAPTION));
6296 O32_PatBlt (hdc,
6297 rc.left,
6298 rc.top,
6299 rc.right - rc.left,
6300 rc.bottom - rc.top,
6301 0xFA0089);
6302
6303 O32_SelectObject (hdc,
6304 hbr);
6305 }
6306 }
6307 else
6308 {
6309 O32_FillRect (hdc,
6310 &rc,
6311 GetSysColorBrush ((uFlags & DC_ACTIVE) ?
6312 COLOR_ACTIVECAPTION : COLOR_INACTIVECAPTION));
6313 }
6314
6315
6316 /* drawing icon */
6317 if ((uFlags & DC_ICON) && !(uFlags & DC_SMALLCAP))
6318 {
6319 POINT pt;
6320
6321 pt.x = rc.left + 2;
6322 pt.y = (rc.bottom + rc.top - O32_GetSystemMetrics(SM_CYSMICON)) / 2;
6323
6324 if (hIcon)
6325 {
6326 DrawIconEx (hdc,
6327 pt.x,
6328 pt.y,
6329 hIcon,
6330 O32_GetSystemMetrics(SM_CXSMICON),
6331 O32_GetSystemMetrics(SM_CYSMICON),
6332 0,
6333 0,
6334 DI_NORMAL);
6335 }
6336 else
6337 {
6338 /* @@@PH 1999/06/08 not ported yet, just don't draw any icon
6339 WND *wndPtr = WIN_FindWndPtr(hwnd);
6340 HICON hAppIcon = 0;
6341
6342 if (wndPtr->class->hIconSm)
6343 hAppIcon = wndPtr->class->hIconSm;
6344 else
6345 if (wndPtr->class->hIcon)
6346 hAppIcon = wndPtr->class->hIcon;
6347
6348 DrawIconEx (hdc,
6349 pt.x,
6350 pt.y,
6351 hAppIcon,
6352 GetSystemMetrics(SM_CXSMICON),
6353 GetSystemMetrics(SM_CYSMICON),
6354 0,
6355 0,
6356 DI_NORMAL);
6357
6358 WIN_ReleaseWndPtr(wndPtr);
6359 */
6360 }
6361
6362 rc.left += (rc.bottom - rc.top);
6363 }
6364
6365 /* drawing text */
6366 if (uFlags & DC_TEXT)
6367 {
6368 HFONT hOldFont;
6369
6370 if (uFlags & DC_INBUTTON)
6371 O32_SetTextColor (hdc,
6372 O32_GetSysColor (COLOR_BTNTEXT));
6373 else
6374 if (uFlags & DC_ACTIVE)
6375 O32_SetTextColor (hdc,
6376 O32_GetSysColor (COLOR_CAPTIONTEXT));
6377 else
6378 O32_SetTextColor (hdc,
6379 O32_GetSysColor (COLOR_INACTIVECAPTIONTEXT));
6380
6381 O32_SetBkMode (hdc,
6382 TRANSPARENT);
6383
6384 if (hFont)
6385 hOldFont = O32_SelectObject (hdc,
6386 hFont);
6387 else
6388 {
6389 NONCLIENTMETRICSA nclm;
6390 HFONT hNewFont;
6391
6392 nclm.cbSize = sizeof(NONCLIENTMETRICSA);
6393 O32_SystemParametersInfo (SPI_GETNONCLIENTMETRICS,
6394 0,
6395 &nclm,
6396 0);
6397 hNewFont = O32_CreateFontIndirect ((uFlags & DC_SMALLCAP) ?
6398 &nclm.lfSmCaptionFont : &nclm.lfCaptionFont);
6399 hOldFont = O32_SelectObject (hdc,
6400 hNewFont);
6401 }
6402
6403 if (str)
6404 O32_DrawText (hdc,
6405 str,
6406 -1,
6407 &rc,
6408 DT_SINGLELINE | DT_VCENTER | DT_NOPREFIX | DT_LEFT);
6409 else
6410 {
6411 CHAR szText[128];
6412 INT nLen;
6413
6414 nLen = O32_GetWindowText (hwnd,
6415 szText,
6416 128);
6417
6418 O32_DrawText (hdc,
6419 szText,
6420 nLen,
6421 &rc,
6422 DT_SINGLELINE | DT_VCENTER | DT_NOPREFIX | DT_LEFT);
6423 }
6424
6425 if (hFont)
6426 O32_SelectObject (hdc,
6427 hOldFont);
6428 else
6429 O32_DeleteObject (O32_SelectObject (hdc,
6430 hOldFont));
6431 }
6432
6433 /* drawing focus ??? */
6434 if (uFlags & 0x2000)
6435 {
6436 dprintf(("USER32: DrawCaptionTempA undocumented flag (0x2000)!\n"));
6437 }
6438
6439 return 0;
6440}
6441
6442
6443/***********************************************************************
6444 * DrawCaptionTemp32W [USER32.602]
6445 *
6446 * PARAMS
6447 *
6448 * RETURNS
6449 * Success:
6450 * Failure:
6451 */
6452
6453BOOL WIN32API DrawCaptionTempW (HWND hwnd,
6454 HDC hdc,
6455 const RECT *rect,
6456 HFONT hFont,
6457 HICON hIcon,
6458 LPCWSTR str,
6459 UINT uFlags)
6460{
6461 LPSTR strAscii = UnicodeToAsciiString((LPWSTR)str);
6462
6463 BOOL res = DrawCaptionTempA (hwnd,
6464 hdc,
6465 rect,
6466 hFont,
6467 hIcon,
6468 strAscii,
6469 uFlags);
6470
6471 FreeAsciiString(strAscii);
6472
6473 return res;
6474}
6475
Note: See TracBrowser for help on using the repository browser.