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

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

Icon cleanup

File size: 229.3 KB
Line 
1/* $Id: user32.cpp,v 1.21 1999-08-19 12:53:55 sandervl Exp $ */
2
3/*
4 * Win32 misc user32 API functions for OS/2
5 *
6 * Copyright 1998 Sander van Leeuwen
7 * Copyright 1998 Patrick Haller
8 * Copyright 1998 Peter Fitzsimmons
9 * Copyright 1999 Christoph Bratschi
10 *
11 *
12 * Project Odin Software License can be found in LICENSE.TXT
13 *
14 */
15/*****************************************************************************
16 * Name : USER32.CPP
17 * Purpose : This module maps all Win32 functions contained in USER32.DLL
18 * to their OS/2-specific counterparts as far as possible.
19 *****************************************************************************/
20
21#include <os2win.h>
22#include "misc.h"
23
24#include "user32.h"
25#include "wndproc.h"
26#include "wndclass.h"
27#include "usrcall.h"
28#include "syscolor.h"
29
30#include <wchar.h>
31#include <stdlib.h>
32#include <string.h>
33#include <winicon.h>
34
35//undocumented stuff
36// WIN32API CalcChildScroll
37// WIN32API CascadeChildWindows
38// WIN32API ClientThreadConnect
39// WIN32API DragObject
40// WIN32API DrawFrame
41// WIN32API EditWndProc
42// WIN32API EndTask
43// WIN32API GetInputDesktop
44// WIN32API GetNextQueueWindow
45// WIN32API GetShellWindow
46// WIN32API InitSharedTable
47// WIN32API InitTask
48// WIN32API IsHungThread
49// WIN32API LockWindowStation
50// WIN32API ModifyAccess
51// WIN32API PlaySoundEvent
52// WIN32API RegisterLogonProcess
53// WIN32API RegisterNetworkCapabilities
54// WIN32API RegisterSystemThread
55// WIN32API SetDeskWallpaper
56// WIN32API SetDesktopBitmap
57// WIN32API SetInternalWindowPos
58// WIN32API SetLogonNotifyWindow
59// WIN32API SetShellWindow
60// WIN32API SetSysColorsTemp
61// WIN32API SetWindowFullScreenState
62// WIN32API SwitchToThisWindow
63// WIN32API SysErrorBox
64// WIN32API TileChildWindows
65// WIN32API UnlockWindowStation
66// WIN32API UserClientDllInitialize
67// WIN32API UserSignalProc
68// WIN32API WinOldAppHackoMatic
69// WIN32API WNDPROC_CALLBACK
70// WIN32API YieldTask
71
72
73
74
75//******************************************************************************
76//******************************************************************************
77HWND WIN32API GetActiveWindow()
78{
79 return(O32_GetActiveWindow());
80}
81//******************************************************************************
82//******************************************************************************
83int __cdecl wsprintfA(char *lpOut, LPCSTR lpFmt, ...)
84{
85 int rc;
86 va_list argptr;
87
88#ifdef DEBUG
89 WriteLog("USER32: wsprintfA\n");
90 WriteLog("USER32: %s\n", lpFmt);
91#endif
92 va_start(argptr, lpFmt);
93 rc = O32_wvsprintf(lpOut, (char *)lpFmt, argptr);
94 va_end(argptr);
95#ifdef DEBUG
96 WriteLog("USER32: %s\n", lpOut);
97#endif
98 return(rc);
99}
100//******************************************************************************
101//******************************************************************************
102int __cdecl wsprintfW(LPWSTR lpOut, LPCWSTR lpFmt, ...)
103{
104 int rc;
105 char *lpFmtA;
106 char szOut[512];
107 va_list argptr;
108
109 dprintf(("USER32: wsprintfW(%08xh,%08xh).\n",
110 lpOut,
111 lpFmt));
112
113 lpFmtA = UnicodeToAsciiString((LPWSTR)lpFmt);
114
115 /* @@@PH 98/07/13 transform "%s" to "%ls" does the unicode magic */
116 {
117 PSZ pszTemp;
118 PSZ pszTemp1;
119 ULONG ulStrings;
120 ULONG ulIndex; /* temporary string counter */
121
122 for (ulStrings = 0, /* determine number of placeholders */
123 pszTemp = lpFmtA;
124
125 (pszTemp != NULL) &&
126 (*pszTemp != 0);
127
128 ulStrings++)
129 {
130 pszTemp = strstr(pszTemp,
131 "%s");
132 if (pszTemp != NULL) /* skip 2 characters */
133 {
134 pszTemp++;
135 pszTemp++;
136 }
137 else
138 break; /* leave loop immediately */
139 }
140
141 if (ulStrings != 0) /* transformation required ? */
142 {
143 /* now reallocate lpFmt */
144 ulStrings += strlen(lpFmtA); /* calculate total string length */
145 pszTemp = lpFmtA; /* save string pointer */
146 pszTemp1 = lpFmtA; /* save string pointer */
147
148 /* @@@PH allocation has to be compatible to FreeAsciiString !!! */
149 lpFmtA = (char *)malloc(ulStrings + 1);
150 if (lpFmtA == NULL) /* check proper allocation */
151 return (0); /* raise error condition */
152
153 for (ulIndex = 0;
154 ulIndex <= ulStrings;
155 ulIndex++,
156 pszTemp++)
157 {
158 if ((pszTemp[0] == '%') &&
159 (pszTemp[1] == 's') )
160 {
161 /* replace %s by %ls */
162 lpFmtA[ulIndex++] = '%';
163 lpFmtA[ulIndex ] = 'l';
164 lpFmtA[ulIndex+1] = 's';
165 }
166 else
167 lpFmtA[ulIndex] = *pszTemp; /* just copy over the character */
168 }
169
170 lpFmtA[ulStrings] = 0; /* string termination */
171
172 FreeAsciiString(pszTemp1); /* the original string is obsolete */
173 }
174 }
175
176 dprintf(("USER32: wsprintfW (%s).\n",
177 lpFmt));
178
179 va_start(argptr,
180 lpFmt);
181
182 rc = O32_wvsprintf(szOut,
183 lpFmtA,
184 argptr);
185
186 AsciiToUnicode(szOut,
187 lpOut);
188
189 FreeAsciiString(lpFmtA);
190 return(rc);
191}
192//******************************************************************************
193//******************************************************************************
194int WIN32API MessageBoxA(HWND hwndOwner, LPCTSTR lpszText, LPCTSTR lpszTitle, UINT fuStyle)
195{
196 dprintf(("USER32: MessageBoxA %s %s\n", lpszText, lpszTitle));
197 return(O32_MessageBox(hwndOwner, lpszText, lpszTitle, fuStyle));
198}
199//******************************************************************************
200//******************************************************************************
201BOOL WIN32API MessageBeep( UINT arg1)
202{
203#ifdef DEBUG
204 WriteLog("USER32: MessageBeep\n");
205#endif
206 return O32_MessageBeep(arg1);
207}
208//******************************************************************************
209//******************************************************************************
210LONG WIN32API SendDlgItemMessageA( HWND arg1, int arg2, UINT arg3, WPARAM arg4, LPARAM arg5)
211{
212#ifdef DEBUG
213 WriteLog("USER32: SendDlgItemMessageA\n");
214#endif
215 return O32_SendDlgItemMessage(arg1, arg2, arg3, arg4, arg5);
216}
217//******************************************************************************
218//******************************************************************************
219VOID WIN32API PostQuitMessage( int arg1)
220{
221 dprintf(("USER32: PostQuitMessage\n"));
222 O32_PostQuitMessage(arg1);
223}
224//******************************************************************************
225// Not implemented by Open32 (31-5-99 Christoph Bratschi)
226//******************************************************************************
227BOOL WIN32API IsDlgButtonChecked( HWND arg1, UINT arg2)
228{
229#ifdef DEBUG
230 WriteLog("USER32: IsDlgButtonChecked\n");
231#endif
232// return O32_IsDlgButtonChecked(arg1, arg2);
233 return (BOOL)SendDlgItemMessageA(arg1,arg2,BM_GETCHECK,0,0);
234}
235//******************************************************************************
236//******************************************************************************
237int WIN32API GetWindowTextLengthA( HWND arg1)
238{
239 dprintf(("USER32: GetWindowTextLength\n"));
240 return O32_GetWindowTextLength(arg1);
241}
242//******************************************************************************
243//******************************************************************************
244int WIN32API GetWindowTextA( HWND arg1, LPSTR arg2, int arg3)
245{
246 dprintf(("USER32: GetWindowTextA\n"));
247 return O32_GetWindowText(arg1, arg2, arg3);
248}
249//******************************************************************************
250
251/*******************************************************************
252 * InternalGetWindowText (USER32.326)
253 */
254int WIN32API InternalGetWindowText(HWND hwnd,
255 LPWSTR lpString,
256 INT nMaxCount )
257{
258 dprintf(("USER32: InternalGetWindowText(%08xh,%08xh,%08xh) not properly implemented.\n",
259 hwnd,
260 lpString,
261 nMaxCount));
262
263 return GetWindowTextW(hwnd,lpString,nMaxCount);
264}
265
266
267//******************************************************************************
268BOOL WIN32API GetWindowRect( HWND arg1, PRECT arg2)
269{
270 BOOL rc;
271
272 rc = O32_GetWindowRect(arg1, arg2);
273 dprintf(("USER32: GetWindowRect %X returned %d\n", arg1, rc));
274 return(rc);
275}
276//******************************************************************************
277//******************************************************************************
278HWND WIN32API GetNextDlgTabItem( HWND arg1, HWND arg2, BOOL arg3)
279{
280 dprintf(("USER32: GetNextDlgTabItem\n"));
281 return O32_GetNextDlgTabItem(arg1, arg2, arg3);
282}
283//******************************************************************************
284//******************************************************************************
285BOOL WIN32API GetMessageA( LPMSG arg1, HWND arg2, UINT arg3, UINT arg4)
286{
287//// dprintf(("USER32: GetMessage\n"));
288 return O32_GetMessage(arg1, arg2, arg3, arg4);
289}
290//******************************************************************************
291//******************************************************************************
292HWND WIN32API GetFocus(void)
293{
294// dprintf(("USER32: GetFocus\n"));
295 return O32_GetFocus();
296}
297//******************************************************************************
298//******************************************************************************
299HWND WIN32API GetDlgItem(HWND arg1, int arg2)
300{
301 HWND rc;
302
303 rc = O32_GetDlgItem(arg1, arg2);
304 dprintf(("USER32: GetDlgItem %d returned %d\n", arg2, rc));
305 return(rc);
306}
307//******************************************************************************
308//******************************************************************************
309int WIN32API GetDlgCtrlID( HWND arg1)
310{
311 dprintf(("USER32: GetDlgCtrlID\n"));
312 return O32_GetDlgCtrlID(arg1);
313}
314//******************************************************************************
315//******************************************************************************
316HWND WIN32API GetDesktopWindow(void)
317{
318 dprintf(("USER32: GetDesktopWindow\n"));
319 return O32_GetDesktopWindow();
320}
321//******************************************************************************
322//******************************************************************************
323BOOL WIN32API EnumThreadWindows(DWORD dwThreadId, WNDENUMPROC lpfn, LPARAM lParam)
324{
325 BOOL rc;
326 EnumWindowCallback *callback = new EnumWindowCallback(lpfn, lParam);
327
328 dprintf(("USER32: EnumThreadWindows\n"));
329 rc = O32_EnumThreadWindows(dwThreadId, callback->GetOS2Callback(), (LPARAM)callback);
330 if(callback)
331 delete callback;
332 return(rc);
333}
334//******************************************************************************
335//******************************************************************************
336BOOL WIN32API EndDialog( HWND arg1, int arg2)
337{
338 BOOL rc;
339
340 dprintf(("USER32: EndDialog\n"));
341 rc = O32_EndDialog(arg1, arg2);
342 return(rc);
343}
344//******************************************************************************
345//******************************************************************************
346LONG WIN32API DispatchMessageA( const MSG * arg1)
347{
348//// dprintf(("USER32: DispatchMessage\n"));
349 return O32_DispatchMessage(arg1);
350}
351//******************************************************************************
352//******************************************************************************
353BOOL WIN32API OffsetRect( PRECT arg1, int arg2, int arg3)
354{
355#ifdef DEBUG
356//// WriteLog("USER32: OffsetRect\n");
357#endif
358 return O32_OffsetRect(arg1, arg2, arg3);
359}
360//******************************************************************************
361//******************************************************************************
362BOOL WIN32API CopyRect( PRECT arg1, const RECT * arg2)
363{
364// ddprintf(("USER32: CopyRect\n"));
365 return O32_CopyRect(arg1, arg2);
366}
367//******************************************************************************
368// Not implemented by Open32 (5-31-99 Christoph Bratschi)
369//******************************************************************************
370BOOL WIN32API CheckDlgButton( HWND arg1, int arg2, UINT arg3)
371{
372#ifdef DEBUG
373 WriteLog("USER32: CheckDlgButton\n");
374#endif
375// return O32_CheckDlgButton(arg1, arg2, arg3);
376 return (BOOL)SendDlgItemMessageA(arg1,arg2,BM_SETCHECK,arg3,0);
377}
378//******************************************************************************
379//******************************************************************************
380HWND WIN32API SetFocus( HWND arg1)
381{
382 dprintf(("USER32: SetFocus\n"));
383 return O32_SetFocus(arg1);
384}
385//******************************************************************************
386//******************************************************************************
387BOOL WIN32API TranslateMessage( const MSG * arg1)
388{
389#ifdef DEBUG
390//// WriteLog("USER32: TranslateMessage\n");
391#endif
392 return O32_TranslateMessage(arg1);
393}
394//******************************************************************************
395//******************************************************************************
396BOOL WIN32API SetWindowPos( HWND arg1, HWND arg2, int arg3, int arg4, int arg5, int arg6, UINT arg7)
397{
398#ifdef DEBUG
399 WriteLog("USER32: SetWindowPos\n");
400#endif
401 return O32_SetWindowPos(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
402}
403//******************************************************************************
404//******************************************************************************
405BOOL WIN32API ShowWindow(HWND arg1, int arg2)
406{
407#ifdef DEBUG
408 WriteLog("USER32: ShowWindow %X %d\n", arg1, arg2);
409#endif
410 return O32_ShowWindow(arg1, arg2);
411}
412//******************************************************************************
413//******************************************************************************
414BOOL WIN32API SetWindowTextA(HWND arg1, LPCSTR arg2)
415{
416#ifdef DEBUG
417 WriteLog("USER32: SetWindowText %s\n", arg2);
418#endif
419 return O32_SetWindowText(arg1, arg2);
420}
421//******************************************************************************
422//******************************************************************************
423BOOL WIN32API SetForegroundWindow(HWND arg1)
424{
425#ifdef DEBUG
426 WriteLog("USER32: SetForegroundWindow\n");
427#endif
428 return O32_SetForegroundWindow(arg1);
429}
430//******************************************************************************
431//******************************************************************************
432int WIN32API ReleaseDC( HWND arg1, HDC arg2)
433{
434#ifdef DEBUG
435 WriteLog("USER32: ReleaseDC\n");
436#endif
437 return O32_ReleaseDC(arg1, arg2);
438}
439//******************************************************************************
440//******************************************************************************
441BOOL WIN32API InvalidateRect(HWND arg1, const RECT *arg2, BOOL arg3)
442{
443#ifdef DEBUG
444 if(arg2)
445 WriteLog("USER32: InvalidateRect for window %X (%d,%d)(%d,%d) %d\n", arg1, arg2->left, arg2->top, arg2->right, arg2->bottom, arg3);
446 else WriteLog("USER32: InvalidateRect for window %X NULL, %d\n", arg1, arg3);
447#endif
448 return O32_InvalidateRect(arg1, arg2, arg3);
449}
450//******************************************************************************
451//******************************************************************************
452BOOL WIN32API GetUpdateRect( HWND arg1, PRECT arg2, BOOL arg3)
453{
454#ifdef DEBUG
455 WriteLog("USER32: GetUpdateRect\n");
456#endif
457 return O32_GetUpdateRect(arg1, arg2, arg3);
458}
459//******************************************************************************
460//******************************************************************************
461HDC WIN32API GetDC( HWND arg1)
462{
463 HDC hdc;
464
465 hdc = O32_GetDC(arg1);
466#ifdef DEBUG
467 WriteLog("USER32: GetDC of %X returns %X\n", arg1, hdc);
468#endif
469 return(hdc);
470}
471//******************************************************************************
472//******************************************************************************
473HDC WIN32API GetDCEx(HWND arg1, HRGN arg2, DWORD arg3)
474{
475#ifdef DEBUG
476 WriteLog("USER32: GetDCEx\n");
477#endif
478 return O32_GetDCEx(arg1, arg2, arg3);
479}
480//******************************************************************************
481//******************************************************************************
482BOOL WIN32API GetClientRect( HWND hwnd, PRECT pRect)
483{
484 BOOL rc;
485
486 rc = O32_GetClientRect(hwnd, pRect);
487 dprintf(("USER32: GetClientRect of %X returned (%d,%d) (%d,%d)\n", hwnd, pRect->left, pRect->top, pRect->right, pRect->bottom));
488 return rc;
489}
490//******************************************************************************
491//******************************************************************************
492HWND WIN32API FindWindowA(LPCSTR arg1, LPCSTR arg2)
493{
494#ifdef DEBUG
495 WriteLog("USER32: FindWindow\n");
496#endif
497 return O32_FindWindow(arg1, arg2);
498}
499//******************************************************************************
500//******************************************************************************
501HWND WIN32API FindWindowExA(HWND arg1, HWND arg2, LPCSTR arg3, LPCSTR arg4)
502{
503#ifdef DEBUG
504 WriteLog("USER32: FindWindowExA, not completely implemented\n");
505#endif
506 return O32_FindWindow(arg3, arg4);
507}
508//******************************************************************************
509//******************************************************************************
510BOOL WIN32API FlashWindow( HWND arg1, BOOL arg2)
511{
512#ifdef DEBUG
513 WriteLog("USER32: FlashWindow\n");
514#endif
515 return O32_FlashWindow(arg1, arg2);
516}
517//******************************************************************************
518//******************************************************************************
519BOOL WIN32API EndPaint( HWND arg1, const PAINTSTRUCT * arg2)
520{
521#ifdef DEBUG
522 WriteLog("USER32: EndPaint\n");
523#endif
524 return O32_EndPaint(arg1, arg2);
525}
526//******************************************************************************
527//******************************************************************************
528BOOL WIN32API MoveWindow(HWND arg1, int arg2, int arg3, int arg4, int arg5, BOOL arg6)
529{
530 BOOL rc;
531
532 rc = O32_MoveWindow(arg1, arg2, arg3, arg4, arg5, arg6);
533 dprintf(("USER32: MoveWindow %X to (%d,%d) size (%d,%d), repaint = %d returned %d\n", arg1, arg2, arg3, arg4, arg5, arg6, rc));
534 return(rc);
535}
536//******************************************************************************
537//******************************************************************************
538HWND WIN32API CreateWindowExA(DWORD dwExStyle,
539 LPCSTR arg2,
540 LPCSTR arg3,
541 DWORD dwStyle,
542 int x,
543 int y,
544 int nWidth,
545 int nHeight,
546 HWND parent,
547 HMENU arg10,
548 HINSTANCE arg11,
549 PVOID arg12)
550{
551 HWND hwnd;
552 Win32WindowProc *window = NULL;
553
554 /* @@@PH 98/06/12 CreateWindow crashes somewhere in Open32 */
555 if(arg3 == NULL)
556 arg3 = (LPCSTR)"CRASH, CRASH";
557
558 // 6-12-99 CB: WS_CLIPCHILDREN not set -> controls not redrawn
559 // Problems with group boxes
560 //SvL: Not necessary anymore (EB's fixes)
561// dwStyle |= WS_CLIPCHILDREN;
562
563 //SvL: Correct window style (like Wine does)
564 if(dwStyle & WS_CHILD) {
565 dwStyle |= WS_CLIPSIBLINGS;
566 if(!(dwStyle & WS_POPUP)) {
567 dwStyle |= WS_CAPTION;
568 }
569 }
570 if(dwExStyle & WS_EX_DLGMODALFRAME)
571 {
572 dwStyle &= ~WS_THICKFRAME;
573 }
574
575#ifdef DEBUG
576 WriteLog("USER32: CreateWindow: dwExStyle = %X\n", dwExStyle);
577 if((int)arg2 >> 16 != 0)
578 WriteLog("USER32: CreateWindow: classname = %s\n", arg2);
579 else WriteLog("USER32: CreateWindow: classname = %X\n", arg2);
580 WriteLog("USER32: CreateWindow: windowname= %s\n", arg3);
581 WriteLog("USER32: CreateWindow: dwStyle = %X\n", dwStyle);
582 WriteLog("USER32: CreateWindow: x = %d\n", x);
583 WriteLog("USER32: CreateWindow: y = %d\n", y);
584 WriteLog("USER32: CreateWindow: nWidth = %d\n", nWidth);
585 WriteLog("USER32: CreateWindow: nHeight = %d\n", nHeight);
586 WriteLog("USER32: CreateWindow: parent = %X\n", parent);
587 WriteLog("USER32: CreateWindow: hwmenu = %X\n", arg10);
588 WriteLog("USER32: CreateWindow: hinstance = %X\n", arg11);
589 WriteLog("USER32: CreateWindow: param = %X\n", arg12);
590 #endif
591
592 if((int) arg2 >> 16 != 0 && strcmp(arg2, "COMBOBOX") == 0)
593 {
594 dprintf(("COMBOBOX creation"));
595 //TODO: #%@#%$ Open32 doesn't support this
596 dwStyle &= ~(CBS_OWNERDRAWFIXED | CBS_OWNERDRAWVARIABLE);
597
598 /* @@@PH 98/06/12 drop down combos are problematic too */
599 /* so we translate the styles to OS/2 style */
600 dwStyle |= CBS_DROPDOWN | CBS_DROPDOWNLIST;
601 }
602
603 //Classname might be name of system class, in which case we don't
604 //need to use our own callback
605// if(Win32WindowClass::FindClass((LPSTR)arg2) != NULL) {
606 window = new Win32WindowProc(arg11, arg2);
607// }
608
609 hwnd = O32_CreateWindowEx(dwExStyle,
610 arg2,
611 arg3,
612 dwStyle,
613 x,
614 y,
615 nWidth,
616 nHeight,
617 parent,
618 arg10,
619 arg11,
620 arg12);
621
622 //SvL: 16-11-'97: window can be already destroyed if hwnd == 0
623 if(hwnd == 0 && window != 0 && Win32WindowProc::FindWindowProc(window)) {
624 delete(window);
625 window = 0;
626 }
627 if(window) {
628 window->SetWindowHandle(hwnd);
629 }
630
631 dprintf(("USER32: ************CreateWindowExA %s (%d,%d,%d,%d), hwnd = %X\n", arg2, x, y, nWidth, nHeight, hwnd));
632 return(hwnd);
633}
634//******************************************************************************
635//******************************************************************************
636LRESULT WIN32API SendMessageA(HWND arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
637{
638 LRESULT rc;
639
640#ifdef DEBUG1
641 WriteLog("USER32: SendMessage....\n");
642#endif
643 rc = O32_SendMessage(arg1, arg2, arg3, arg4);
644#ifdef DEBUG1
645 WriteLog("USER32: *****SendMessage %X %X %X %X returned %d\n", arg1, arg2, arg3, arg4, rc);
646#endif
647 return(rc);
648}
649//******************************************************************************
650//******************************************************************************
651HWND WIN32API SetActiveWindow( HWND arg1)
652{
653#ifdef DEBUG
654 WriteLog("USER32: SetActiveWindow\n");
655#endif
656 return O32_SetActiveWindow(arg1);
657}
658//******************************************************************************
659//******************************************************************************
660HDC WIN32API BeginPaint(HWND arg1, PPAINTSTRUCT arg2)
661{
662 dprintf(("USER32: BeginPaint %X\n", arg2));
663 return O32_BeginPaint(arg1, arg2);
664}
665//******************************************************************************
666//******************************************************************************
667BOOL WIN32API IsDialogMessageA( HWND arg1, LPMSG arg2)
668{
669#ifdef DEBUG
670//// WriteLog("USER32: IsDialogMessage\n");
671#endif
672 return O32_IsDialogMessage(arg1, arg2);
673}
674//******************************************************************************
675//******************************************************************************
676int WIN32API DrawTextA(HDC arg1, LPCSTR arg2, int arg3, PRECT arg4, UINT arg5)
677{
678#ifdef DEBUG
679 WriteLog("USER32: DrawTextA %s", arg2);
680#endif
681 return O32_DrawText(arg1, arg2, arg3, arg4, arg5);
682}
683//******************************************************************************
684//******************************************************************************
685int WIN32API GetSystemMetrics(int arg1)
686{
687 int rc;
688
689 switch(arg1) {
690 case SM_CXICONSPACING: //TODO: size of grid cell for large icons
691 rc = O32_GetSystemMetrics(SM_CXICON);
692 break;
693 case SM_CYICONSPACING:
694 rc = O32_GetSystemMetrics(SM_CYICON);
695 break;
696 case SM_PENWINDOWS:
697 rc = FALSE;
698 break;
699 case SM_DBCSENABLED:
700 rc = FALSE;
701 break;
702 case SM_CXEDGE: //size of 3D window edge (not supported)
703 rc = 1;
704 break;
705 case SM_CYEDGE:
706 rc = 1;
707 break;
708 case SM_CXMINSPACING: //can be SM_CXMINIMIZED or larger
709 rc = O32_GetSystemMetrics(SM_CXMINIMIZED);
710 break;
711 case SM_CYMINSPACING:
712 rc = GetSystemMetrics(SM_CYMINIMIZED);
713 break;
714 case SM_CXSMICON: //recommended size of small icons (TODO: adjust to screen res.)
715 rc = 16;
716 break;
717 case SM_CYSMICON:
718 rc = 16;
719 break;
720 case SM_CYSMCAPTION: //size in pixels of a small caption (TODO: ????)
721 rc = 8;
722 break;
723 case SM_CXSMSIZE: //size of small caption buttons (pixels) (TODO: implement properly)
724 rc = 16;
725 break;
726 case SM_CYSMSIZE:
727 rc = 16;
728 break;
729 case SM_CXMENUSIZE: //TODO: size of menu bar buttons (such as MDI window close)
730 rc = 16;
731 break;
732 case SM_CYMENUSIZE:
733 rc = 16;
734 break;
735 case SM_ARRANGE:
736 rc = ARW_BOTTOMLEFT | ARW_LEFT;
737 break;
738 case SM_CXMINIMIZED:
739 break;
740 case SM_CYMINIMIZED:
741 break;
742 case SM_CXMAXTRACK: //max window size
743 case SM_CXMAXIMIZED: //max toplevel window size
744 rc = O32_GetSystemMetrics(SM_CXSCREEN);
745 break;
746 case SM_CYMAXTRACK:
747 case SM_CYMAXIMIZED:
748 rc = O32_GetSystemMetrics(SM_CYSCREEN);
749 break;
750 case SM_NETWORK:
751 rc = 0x01; //TODO: default = yes
752 break;
753 case SM_CLEANBOOT:
754 rc = 0; //normal boot
755 break;
756 case SM_CXDRAG: //nr of pixels before drag becomes a real one
757 rc = 2;
758 break;
759 case SM_CYDRAG:
760 rc = 2;
761 break;
762 case SM_SHOWSOUNDS: //show instead of play sound
763 rc = FALSE;
764 break;
765 case SM_CXMENUCHECK:
766 rc = 4; //TODO
767 break;
768 case SM_CYMENUCHECK:
769 rc = O32_GetSystemMetrics(SM_CYMENU);
770 break;
771 case SM_SLOWMACHINE:
772 rc = FALSE; //even a slow machine is fast with OS/2 :)
773 break;
774 case SM_MIDEASTENABLED:
775 rc = FALSE;
776 break;
777 case SM_CMETRICS:
778 rc = O32_GetSystemMetrics(44); //Open32 changed this one
779 break;
780 default:
781 rc = O32_GetSystemMetrics(arg1);
782 break;
783 }
784 dprintf(("USER32: GetSystemMetrics %d returned %d\n", arg1, rc));
785 return(rc);
786}
787//******************************************************************************
788//******************************************************************************
789UINT WIN32API SetTimer( HWND arg1, UINT arg2, UINT arg3, TIMERPROC arg4)
790{
791#ifdef DEBUG
792 WriteLog("USER32: SetTimer INCORRECT CALLING CONVENTION FOR HANDLER!!!!!\n");
793#endif
794 //SvL: Write callback handler class for this one
795 return O32_SetTimer(arg1, arg2, arg3, (TIMERPROC_O32)arg4);
796}
797//******************************************************************************
798//******************************************************************************
799BOOL WIN32API KillTimer(HWND arg1, UINT arg2)
800{
801#ifdef DEBUG
802 WriteLog("USER32: KillTimer\n");
803#endif
804 return O32_KillTimer(arg1, arg2);
805}
806//******************************************************************************
807//******************************************************************************
808BOOL WIN32API DestroyWindow(HWND arg1)
809{
810#ifdef DEBUG
811 WriteLog("USER32: DestroyWindow\n");
812#endif
813 return O32_DestroyWindow(arg1);
814}
815//******************************************************************************
816//******************************************************************************
817BOOL WIN32API PostMessageA( HWND arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
818{
819#ifdef DEBUG
820 WriteLog("USER32: PostMessageA %X %X %X %X\n", arg1, arg2, arg3, arg4);
821#endif
822 return O32_PostMessage(arg1, arg2, arg3, arg4);
823}
824//******************************************************************************
825//******************************************************************************
826BOOL WIN32API InflateRect( PRECT arg1, int arg2, int arg3)
827{
828#ifdef DEBUG
829 WriteLog("USER32: InflateRect\n");
830#endif
831 return O32_InflateRect(arg1, arg2, arg3);
832}
833//******************************************************************************
834//TODO:How can we emulate this one in OS/2???
835//******************************************************************************
836DWORD WIN32API WaitForInputIdle(HANDLE hProcess, DWORD dwTimeOut)
837{
838#ifdef DEBUG
839 WriteLog("USER32: WaitForInputIdle (Not Implemented) %d\n", dwTimeOut);
840#endif
841
842 if(dwTimeOut == INFINITE) return(0);
843
844// DosSleep(dwTimeOut/16);
845 return(0);
846}
847//******************************************************************************
848//******************************************************************************
849UINT WIN32API GetDlgItemTextA(HWND arg1, int arg2, LPSTR arg3, UINT arg4)
850{
851 UINT rc;
852
853 rc = O32_GetDlgItemText(arg1, arg2, arg3, arg4);
854#ifdef DEBUG
855 if(rc)
856 WriteLog("USER32: GetDlgItemTextA returned %s\n", arg3);
857 else WriteLog("USER32: GetDlgItemTextA returned 0 (%d)\n", GetLastError());
858#endif
859 return(rc);
860}
861//******************************************************************************
862//******************************************************************************
863BOOL WIN32API PeekMessageA(LPMSG arg1, HWND arg2, UINT arg3, UINT arg4, UINT arg5)
864{
865#ifdef DEBUG
866// WriteLog("USER32: PeekMessage\n");
867#endif
868 return O32_PeekMessage(arg1, arg2, arg3, arg4, arg5);
869}
870//******************************************************************************
871//******************************************************************************
872int WIN32API ShowCursor( BOOL arg1)
873{
874#ifdef DEBUG
875 WriteLog("USER32: ShowCursor\n");
876#endif
877 return O32_ShowCursor(arg1);
878}
879//******************************************************************************
880//BUGBUG: UpdateWindow sends a WM_ERASEBKGRND when it shouldn't!
881// So we just do it manually
882//******************************************************************************
883BOOL WIN32API UpdateWindow(HWND hwnd)
884{
885 RECT rect;
886
887#ifdef DEBUG
888 WriteLog("USER32: UpdateWindow\n");
889#endif
890
891#if 0 // EB: ->>> doesn't work. No correct update of Winhlp32 scrolling area.
892 if(O32_GetUpdateRect(hwnd, &rect, FALSE) != FALSE) {//update region empty?
893 WndCallback(hwnd, WM_PAINT, 0, 0);
894// O32_PostMessage(hwnd, WM_PAINT, 0, 0);
895 }
896#ifdef DEBUG
897 else WriteLog("USER32: Update region empty!\n");
898#endif
899 return(TRUE);
900#endif
901
902 return O32_UpdateWindow(hwnd);
903}
904//******************************************************************************
905//******************************************************************************
906BOOL WIN32API AdjustWindowRect( PRECT arg1, DWORD arg2, BOOL arg3)
907{
908#ifdef DEBUG
909 WriteLog("USER32: AdjustWindowRect\n");
910#endif
911 return O32_AdjustWindowRect(arg1, arg2, arg3);
912}
913//******************************************************************************
914//******************************************************************************
915BOOL WIN32API AdjustWindowRectEx( PRECT arg1, DWORD arg2, BOOL arg3, DWORD arg4)
916{
917#ifdef DEBUG
918 WriteLog("USER32: AdjustWindowRectEx\n");
919#endif
920 return O32_AdjustWindowRectEx(arg1, arg2, arg3, arg4);
921}
922//******************************************************************************
923//******************************************************************************
924BOOL WIN32API ClientToScreen( HWND arg1, PPOINT arg2)
925{
926#ifdef DEBUG
927//// WriteLog("USER32: ClientToScreen\n");
928#endif
929 return O32_ClientToScreen(arg1, arg2);
930}
931//******************************************************************************
932//******************************************************************************
933BOOL WIN32API SetRect( PRECT arg1, int arg2, int arg3, int arg4, int arg5)
934{
935#ifdef DEBUG
936 WriteLog("USER32: SetRect\n");
937#endif
938 return O32_SetRect(arg1, arg2, arg3, arg4, arg5);
939}
940//******************************************************************************
941//******************************************************************************
942BOOL WIN32API SetDlgItemInt( HWND arg1, int arg2, UINT arg3, BOOL arg4)
943{
944#ifdef DEBUG
945 WriteLog("USER32: SetDlgItemInt\n");
946#endif
947 return O32_SetDlgItemInt(arg1, arg2, arg3, arg4);
948}
949//******************************************************************************
950//******************************************************************************
951BOOL WIN32API SetDlgItemTextA( HWND arg1, int arg2, LPCSTR arg3)
952{
953#ifdef DEBUG
954 WriteLog("USER32: SetDlgItemText to %s\n", arg3);
955#endif
956 return O32_SetDlgItemText(arg1, arg2, arg3);
957}
958//******************************************************************************
959//******************************************************************************
960BOOL WIN32API WinHelpA( HWND arg1, LPCSTR arg2, UINT arg3, DWORD arg4)
961{
962#ifdef DEBUG
963 WriteLog("USER32: WinHelp not implemented %s\n", arg2);
964#endif
965// return O32_WinHelp(arg1, arg2, arg3, arg4);
966 return(TRUE);
967}
968//******************************************************************************
969//******************************************************************************
970BOOL WIN32API IsIconic( HWND arg1)
971{
972#ifdef DEBUG
973 WriteLog("USER32: IsIconic\n");
974#endif
975 return O32_IsIconic(arg1);
976}
977//******************************************************************************
978//******************************************************************************
979int WIN32API TranslateAcceleratorA(HWND arg1, HACCEL arg2, LPMSG arg3)
980{
981#ifdef DEBUG
982//// WriteLog("USER32: TranslateAccelerator\n");
983#endif
984 return O32_TranslateAccelerator(arg1, arg2, arg3);
985}
986//******************************************************************************
987//******************************************************************************
988HWND WIN32API GetWindow(HWND arg1, UINT arg2)
989{
990 HWND rc;
991
992 rc = O32_GetWindow(arg1, arg2);
993#ifdef DEBUG
994 WriteLog("USER32: GetWindow %X %d returned %d\n", arg1, arg2, rc);
995#endif
996 return(rc);
997}
998//******************************************************************************
999//******************************************************************************
1000HDC WIN32API GetWindowDC(HWND arg1)
1001{
1002#ifdef DEBUG
1003 WriteLog("USER32: GetWindowDC\n");
1004#endif
1005 return O32_GetWindowDC(arg1);
1006}
1007//******************************************************************************
1008//******************************************************************************
1009BOOL WIN32API SubtractRect( PRECT arg1, const RECT * arg2, const RECT * arg3)
1010{
1011#ifdef DEBUG
1012 WriteLog("USER32: SubtractRect");
1013#endif
1014 return O32_SubtractRect(arg1, arg2, arg3);
1015}
1016//******************************************************************************
1017//SvL: 24-6-'97 - Added
1018//******************************************************************************
1019BOOL WIN32API ClipCursor(const RECT * arg1)
1020{
1021#ifdef DEBUG
1022 WriteLog("USER32: ClipCursor\n");
1023#endif
1024 return O32_ClipCursor(arg1);
1025}
1026//******************************************************************************
1027//SvL: 24-6-'97 - Added
1028//TODO: Not implemented
1029//******************************************************************************
1030WORD WIN32API GetAsyncKeyState(INT nVirtKey)
1031{
1032#ifdef DEBUG
1033//// WriteLog("USER32: GetAsyncKeyState Not implemented\n");
1034#endif
1035 return 0;
1036}
1037//******************************************************************************
1038//SvL: 24-6-'97 - Added
1039//******************************************************************************
1040HCURSOR WIN32API GetCursor(void)
1041{
1042#ifdef DEBUG
1043//// WriteLog("USER32: GetCursor\n");
1044#endif
1045 return O32_GetCursor();
1046}
1047//******************************************************************************
1048//SvL: 24-6-'97 - Added
1049//******************************************************************************
1050BOOL WIN32API GetCursorPos( PPOINT arg1)
1051{
1052#ifdef DEBUG
1053//// WriteLog("USER32: GetCursorPos\n");
1054#endif
1055 return O32_GetCursorPos(arg1);
1056}
1057//******************************************************************************
1058//SvL: 24-6-'97 - Added
1059//******************************************************************************
1060UINT WIN32API RegisterWindowMessageA(LPCSTR arg1)
1061{
1062 UINT rc;
1063
1064 rc = O32_RegisterWindowMessage(arg1);
1065#ifdef DEBUG
1066 WriteLog("USER32: RegisterWindowMessageA %s returned %X\n", arg1, rc);
1067#endif
1068 return(rc);
1069}
1070//******************************************************************************
1071//SvL: 24-6-'97 - Added
1072//******************************************************************************
1073WORD WIN32API VkKeyScanA( char arg1)
1074{
1075#ifdef DEBUG
1076 WriteLog("USER32: VkKeyScanA\n");
1077#endif
1078 return O32_VkKeyScan(arg1);
1079}
1080//******************************************************************************
1081//SvL: 24-6-'97 - Added
1082//******************************************************************************
1083SHORT WIN32API GetKeyState( int arg1)
1084{
1085#ifdef DEBUG
1086 WriteLog("USER32: GetKeyState %d\n", arg1);
1087#endif
1088 return O32_GetKeyState(arg1);
1089}
1090//******************************************************************************
1091//******************************************************************************
1092HCURSOR WIN32API SetCursor( HCURSOR arg1)
1093{
1094#ifdef DEBUG
1095 WriteLog("USER32: SetCursor\n");
1096#endif
1097 return O32_SetCursor(arg1);
1098}
1099//******************************************************************************
1100//******************************************************************************
1101BOOL WIN32API SetCursorPos( int arg1, int arg2)
1102{
1103#ifdef DEBUG
1104 WriteLog("USER32: SetCursorPos\n");
1105#endif
1106 return O32_SetCursorPos(arg1, arg2);
1107}
1108//******************************************************************************
1109//******************************************************************************
1110BOOL WIN32API EnableScrollBar( HWND arg1, INT arg2, UINT arg3)
1111{
1112#ifdef DEBUG
1113 WriteLog("USER32: EnableScrollBar\n");
1114#endif
1115 return O32_EnableScrollBar(arg1, arg2, arg3);
1116}
1117//******************************************************************************
1118//******************************************************************************
1119BOOL WIN32API EnableWindow( HWND arg1, BOOL arg2)
1120{
1121#ifdef DEBUG
1122 WriteLog("USER32: EnableWindow\n");
1123#endif
1124 return O32_EnableWindow(arg1, arg2);
1125}
1126//******************************************************************************
1127//******************************************************************************
1128HWND WIN32API SetCapture( HWND arg1)
1129{
1130#ifdef DEBUG
1131 WriteLog("USER32: SetCapture\n");
1132#endif
1133 return O32_SetCapture(arg1);
1134}
1135//******************************************************************************
1136//******************************************************************************
1137BOOL WIN32API ReleaseCapture(void)
1138{
1139#ifdef DEBUG
1140 WriteLog("USER32: ReleaseCapture\n");
1141#endif
1142 return O32_ReleaseCapture();
1143}
1144//******************************************************************************
1145//******************************************************************************
1146DWORD WIN32API MsgWaitForMultipleObjects( DWORD arg1, LPHANDLE arg2, BOOL arg3, DWORD arg4, DWORD arg5)
1147{
1148#ifdef DEBUG
1149 WriteLog("USER32: MsgWaitForMultipleObjects\n");
1150#endif
1151 return O32_MsgWaitForMultipleObjects(arg1, arg2, arg3, arg4, arg5);
1152}
1153//******************************************************************************
1154//******************************************************************************
1155HDWP WIN32API BeginDeferWindowPos( int arg1)
1156{
1157#ifdef DEBUG
1158 WriteLog("USER32: BeginDeferWindowPos\n");
1159#endif
1160 return O32_BeginDeferWindowPos(arg1);
1161}
1162//******************************************************************************
1163//******************************************************************************
1164BOOL WIN32API BringWindowToTop( HWND arg1)
1165{
1166#ifdef DEBUG
1167 WriteLog("USER32: BringWindowToTop\n");
1168#endif
1169 return O32_BringWindowToTop(arg1);
1170}
1171//******************************************************************************
1172//******************************************************************************
1173BOOL WIN32API CallMsgFilterA( LPMSG arg1, int arg2)
1174{
1175#ifdef DEBUG
1176 WriteLog("USER32: CallMsgFilterA\n");
1177#endif
1178 return O32_CallMsgFilter(arg1, arg2);
1179}
1180//******************************************************************************
1181//******************************************************************************
1182BOOL WIN32API CallMsgFilterW( LPMSG arg1, int arg2)
1183{
1184#ifdef DEBUG
1185 WriteLog("USER32: CallMsgFilterW\n");
1186#endif
1187 // NOTE: This will not work as is (needs UNICODE support)
1188 return O32_CallMsgFilter(arg1, arg2);
1189}
1190//******************************************************************************
1191//******************************************************************************
1192LRESULT WIN32API CallWindowProcA(WNDPROC wndprcPrev,
1193 HWND arg2,
1194 UINT arg3,
1195 WPARAM arg4,
1196 LPARAM arg5)
1197{
1198#ifdef DEBUG
1199//// WriteLog("USER32: CallWindowProcA %X hwnd=%X, msg = %X\n", wndprcPrev, arg2, arg3);
1200#endif
1201
1202 return wndprcPrev(arg2, arg3, arg4, arg5); //win32 callback (__stdcall)
1203}
1204//******************************************************************************
1205//******************************************************************************
1206LRESULT WIN32API CallWindowProcW(WNDPROC arg1,
1207 HWND arg2,
1208 UINT arg3,
1209 WPARAM arg4,
1210 LPARAM arg5)
1211{
1212 dprintf(("USER32: CallWindowProcW(%08xh,%08xh,%08xh,%08xh,%08xh) not properly implemented.\n",
1213 arg1,
1214 arg2,
1215 arg3,
1216 arg4,
1217 arg5));
1218
1219 return CallWindowProcA(arg1,
1220 arg2,
1221 arg3,
1222 arg4,
1223 arg5);
1224}
1225//******************************************************************************
1226//******************************************************************************
1227BOOL WIN32API ChangeClipboardChain( HWND arg1, HWND arg2)
1228{
1229#ifdef DEBUG
1230 WriteLog("USER32: ChangeClipboardChain\n");
1231#endif
1232 return O32_ChangeClipboardChain(arg1, arg2);
1233}
1234//******************************************************************************
1235//******************************************************************************
1236UINT WIN32API ArrangeIconicWindows( HWND arg1)
1237{
1238#ifdef DEBUG
1239 WriteLog("USER32: ArrangeIconicWindows\n");
1240#endif
1241 return O32_ArrangeIconicWindows(arg1);
1242}
1243//******************************************************************************
1244// Not implemented by Open32 (5-31-99 Christoph Bratschi)
1245//******************************************************************************
1246BOOL WIN32API CheckRadioButton( HWND arg1, UINT arg2, UINT arg3, UINT arg4)
1247{
1248#ifdef DEBUG
1249 WriteLog("USER32: CheckRadioButton\n");
1250#endif
1251// return O32_CheckRadioButton(arg1, arg2, arg3, arg4);
1252 if (arg2 > arg3) return (FALSE);
1253 for (UINT x=arg2;x <= arg3;x++)
1254 {
1255 SendDlgItemMessageA(arg1,x,BM_SETCHECK,(x == arg4) ? BST_CHECKED : BST_UNCHECKED,0);
1256 }
1257 return (TRUE);
1258}
1259//******************************************************************************
1260//******************************************************************************
1261HWND WIN32API ChildWindowFromPoint( HWND arg1, POINT arg2)
1262{
1263#ifdef DEBUG
1264 WriteLog("USER32: ChildWindowFromPoint\n");
1265#endif
1266 return O32_ChildWindowFromPoint(arg1, arg2);
1267}
1268//******************************************************************************
1269//******************************************************************************
1270HWND WIN32API ChildWindowFromPointEx(HWND arg1, POINT arg2, UINT uFlags)
1271{
1272#ifdef DEBUG
1273 WriteLog("USER32: ChildWindowFromPointEx, not completely supported!\n");
1274#endif
1275 return O32_ChildWindowFromPoint(arg1, arg2);
1276}
1277//******************************************************************************
1278//******************************************************************************
1279BOOL WIN32API CloseClipboard(void)
1280{
1281#ifdef DEBUG
1282 WriteLog("USER32: CloseClipboard\n");
1283#endif
1284 return O32_CloseClipboard();
1285}
1286//******************************************************************************
1287//******************************************************************************
1288BOOL WIN32API CloseWindow( HWND arg1)
1289{
1290#ifdef DEBUG
1291 WriteLog("USER32: CloseWindow\n");
1292#endif
1293 return O32_CloseWindow(arg1);
1294}
1295//******************************************************************************
1296//******************************************************************************
1297HICON WIN32API CopyIcon( HICON arg1)
1298{
1299#ifdef DEBUG
1300 WriteLog("USER32: CopyIcon\n");
1301#endif
1302 return O32_CopyIcon(arg1);
1303}
1304//******************************************************************************
1305//******************************************************************************
1306int WIN32API CountClipboardFormats(void)
1307{
1308#ifdef DEBUG
1309 WriteLog("USER32: CountClipboardFormats\n");
1310#endif
1311 return O32_CountClipboardFormats();
1312}
1313//******************************************************************************
1314//******************************************************************************
1315HACCEL WIN32API CreateAcceleratorTableA( LPACCEL arg1, int arg2)
1316{
1317#ifdef DEBUG
1318 WriteLog("USER32: CreateAcceleratorTableA\n");
1319#endif
1320 return O32_CreateAcceleratorTable(arg1, arg2);
1321}
1322//******************************************************************************
1323//******************************************************************************
1324HACCEL WIN32API CreateAcceleratorTableW( LPACCEL arg1, int arg2)
1325{
1326#ifdef DEBUG
1327 WriteLog("USER32: CreateAcceleratorTableW\n");
1328#endif
1329 // NOTE: This will not work as is (needs UNICODE support)
1330 return O32_CreateAcceleratorTable(arg1, arg2);
1331}
1332//******************************************************************************
1333//******************************************************************************
1334BOOL WIN32API CreateCaret( HWND arg1, HBITMAP arg2, int arg3, int arg4)
1335{
1336#ifdef DEBUG
1337 WriteLog("USER32: CreateCaret\n");
1338#endif
1339 return O32_CreateCaret(arg1, arg2, arg3, arg4);
1340}
1341//******************************************************************************
1342//******************************************************************************
1343HCURSOR WIN32API CreateCursor( HINSTANCE arg1, int arg2, int arg3, int arg4, int arg5, const VOID * arg6, const VOID * arg7)
1344{
1345#ifdef DEBUG
1346 WriteLog("USER32: CreateCursor\n");
1347#endif
1348 return O32_CreateCursor(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
1349}
1350//******************************************************************************
1351//******************************************************************************
1352HICON WIN32API CreateIcon( HINSTANCE arg1, INT arg2, INT arg3, BYTE arg4, BYTE arg5, LPCVOID arg6, LPCVOID arg7)
1353{
1354#ifdef DEBUG
1355 WriteLog("USER32: CreateIcon\n");
1356#endif
1357 return O32_CreateIcon(arg1, arg2, arg3, arg4, arg5, (const BYTE *)arg6, (const BYTE *)arg7);
1358}
1359//******************************************************************************
1360//ASSERT dwVer == win31 (ok according to SDK docs)
1361//******************************************************************************
1362HICON WIN32API CreateIconFromResource(PBYTE presbits, UINT dwResSize,
1363 BOOL fIcon, DWORD dwVer)
1364{
1365 HICON hicon;
1366 DWORD OS2ResSize = 0;
1367 PBYTE OS2Icon = ConvertWin32Icon(presbits, dwResSize, &OS2ResSize);
1368
1369 hicon = O32_CreateIconFromResource(OS2Icon, OS2ResSize, fIcon, dwVer);
1370#ifdef DEBUG
1371 WriteLog("USER32: CreateIconFromResource returned %X (%X)\n", hicon, GetLastError());
1372#endif
1373 if(OS2Icon)
1374 FreeIcon(OS2Icon);
1375
1376 return(hicon);
1377}
1378//******************************************************************************
1379//******************************************************************************
1380HICON WIN32API CreateIconFromResourceEx(PBYTE presbits, UINT dwResSize,
1381 BOOL fIcon, DWORD dwVer,
1382 int cxDesired, int cyDesired,
1383 UINT Flags)
1384{
1385#ifdef DEBUG
1386 WriteLog("USER32: CreateIconFromResourceEx %X %d %d %X %d %d %X, not completely supported!\n", presbits, dwResSize, fIcon, dwVer, cxDesired, cyDesired, Flags);
1387#endif
1388 return CreateIconFromResource(presbits, dwResSize, fIcon, dwVer);
1389}
1390//******************************************************************************
1391//******************************************************************************
1392HICON WIN32API CreateIconIndirect(LPICONINFO arg1)
1393{
1394#ifdef DEBUG
1395 WriteLog("USER32: CreateIconIndirect\n");
1396#endif
1397 return O32_CreateIconIndirect(arg1);
1398}
1399//******************************************************************************
1400HWND WIN32API CreateMDIWindowA(LPCSTR arg1, LPCSTR arg2, DWORD arg3,
1401 int arg4, int arg5, int arg6, int arg7,
1402 HWND arg8, HINSTANCE arg9, LPARAM arg10)
1403{
1404 HWND hwnd;
1405
1406#ifdef DEBUG
1407 WriteLog("USER32: CreateMDIWindowA\n");
1408#endif
1409 Win32WindowProc *window = new Win32WindowProc(arg9, arg1);
1410 hwnd = O32_CreateMDIWindow((LPSTR)arg1, (LPSTR)arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
1411 //SvL: 16-11-'97: window can be already destroyed if hwnd == 0
1412 if(hwnd == 0 && window != 0 && Win32WindowProc::FindWindowProc(window)) {
1413 delete(window);
1414 window = 0;
1415 }
1416
1417#ifdef DEBUG
1418 WriteLog("USER32: CreateMDIWindowA returned %X\n", hwnd);
1419#endif
1420 return hwnd;
1421}
1422//******************************************************************************
1423//******************************************************************************
1424HWND WIN32API CreateMDIWindowW(LPCWSTR arg1, LPCWSTR arg2, DWORD arg3, int arg4,
1425 int arg5, int arg6, int arg7, HWND arg8, HINSTANCE arg9,
1426 LPARAM arg10)
1427{
1428 HWND hwnd;
1429 char *astring1 = NULL, *astring2 = NULL;
1430 Win32WindowProc *window = NULL;
1431
1432 if((int)arg1 >> 16 != 0) {
1433 astring1 = UnicodeToAsciiString((LPWSTR)arg1);
1434 }
1435 else astring1 = (char *)arg2;
1436
1437 astring2 = UnicodeToAsciiString((LPWSTR)arg2);
1438
1439 //Classname might be name of system class, in which case we don't
1440 //need to use our own callback
1441// if(Win32WindowClass::FindClass((LPSTR)astring1) != NULL) {
1442 window = new Win32WindowProc(arg9, astring1);
1443// }
1444 hwnd = O32_CreateMDIWindow(astring1, astring2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
1445 //SvL: 16-11-'97: window can be already destroyed if hwnd == 0
1446 if(hwnd == 0 && window != 0 && Win32WindowProc::FindWindowProc(window)) {
1447 delete(window);
1448 window = 0;
1449 }
1450 if(window) {
1451 window->SetWindowHandle(hwnd);
1452 }
1453
1454 if(astring1) FreeAsciiString(astring1);
1455 FreeAsciiString(astring2);
1456#ifdef DEBUG
1457 WriteLog("USER32: CreateMDIWindowW hwnd = %X\n", hwnd);
1458#endif
1459 return(hwnd);
1460}
1461//******************************************************************************
1462//******************************************************************************
1463HWND WIN32API CreateWindowExW(DWORD arg1,
1464 LPCWSTR arg2,
1465 LPCWSTR arg3,
1466 DWORD dwStyle,
1467 int arg5,
1468 int arg6,
1469 int arg7,
1470 int arg8,
1471 HWND arg9,
1472 HMENU arg10,
1473 HINSTANCE arg11,
1474 PVOID arg12)
1475{
1476 HWND hwnd;
1477 char *astring1 = NULL,
1478 *astring2 = NULL;
1479 Win32WindowProc *window = NULL;
1480
1481 /* @@@PH 98/06/21 changed to call OS2CreateWindowExA */
1482 if(HIWORD(arg2) != 0)
1483 astring1 = UnicodeToAsciiString((LPWSTR)arg2);
1484 else
1485 astring1 = (char *)arg2;
1486
1487 astring2 = UnicodeToAsciiString((LPWSTR)arg3);
1488
1489#ifdef DEBUG
1490 WriteLog("USER32: CreateWindowExW: dwExStyle = %X\n", arg1);
1491 if((int)arg2 >> 16 != 0)
1492 WriteLog("USER32: CreateWindow: classname = %s\n", astring1);
1493 else WriteLog("USER32: CreateWindow: classname = %X\n", arg2);
1494 WriteLog("USER32: CreateWindow: windowname= %s\n", astring2);
1495 WriteLog("USER32: CreateWindow: dwStyle = %X\n", dwStyle);
1496 WriteLog("USER32: CreateWindow: x = %d\n", arg5);
1497 WriteLog("USER32: CreateWindow: y = %d\n", arg6);
1498 WriteLog("USER32: CreateWindow: nWidth = %d\n", arg7);
1499 WriteLog("USER32: CreateWindow: nHeight = %d\n", arg8);
1500 WriteLog("USER32: CreateWindow: parent = %X\n", arg9);
1501 WriteLog("USER32: CreateWindow: hwmenu = %X\n", arg10);
1502 WriteLog("USER32: CreateWindow: hinstance = %X\n", arg11);
1503 WriteLog("USER32: CreateWindow: param = %X\n", arg12);
1504 #endif
1505
1506 hwnd = CreateWindowExA(arg1,
1507 astring1,
1508 astring2,
1509 dwStyle,
1510 arg5,
1511 arg6,
1512 arg7,
1513 arg8,
1514 arg9,
1515 arg10,
1516 arg11,
1517 arg12);
1518
1519 if(HIWORD(arg1) != 0)
1520 FreeAsciiString(astring1);
1521
1522 FreeAsciiString(astring2);
1523
1524#ifdef DEBUG
1525 WriteLog("USER32: ************CreateWindowExW hwnd = %X (%X)\n", hwnd, GetLastError());
1526#endif
1527 return(hwnd);
1528}
1529//******************************************************************************
1530//******************************************************************************
1531HDWP WIN32API DeferWindowPos( HDWP arg1, HWND arg2, HWND arg3, int arg4, int arg5, int arg6, int arg7, UINT arg8)
1532{
1533#ifdef DEBUG
1534 WriteLog("USER32: DeferWindowPos\n");
1535#endif
1536 return O32_DeferWindowPos(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
1537}
1538//******************************************************************************
1539//******************************************************************************
1540BOOL WIN32API DestroyAcceleratorTable( HACCEL arg1)
1541{
1542#ifdef DEBUG
1543 WriteLog("USER32: DestroyAcceleratorTable\n");
1544#endif
1545 return O32_DestroyAcceleratorTable(arg1);
1546}
1547//******************************************************************************
1548//******************************************************************************
1549BOOL WIN32API DestroyCaret(void)
1550{
1551#ifdef DEBUG
1552 WriteLog("USER32: DestroyCaret\n");
1553#endif
1554 return O32_DestroyCaret();
1555}
1556//******************************************************************************
1557//******************************************************************************
1558BOOL WIN32API DestroyCursor( HCURSOR arg1)
1559{
1560#ifdef DEBUG
1561 WriteLog("USER32: DestroyCursor\n");
1562#endif
1563 return O32_DestroyCursor(arg1);
1564}
1565//******************************************************************************
1566//******************************************************************************
1567BOOL WIN32API DestroyIcon( HICON arg1)
1568{
1569#ifdef DEBUG
1570 WriteLog("USER32: DestroyIcon\n");
1571#endif
1572 return O32_DestroyIcon(arg1);
1573}
1574//******************************************************************************
1575//******************************************************************************
1576LONG WIN32API DispatchMessageW( const MSG * arg1)
1577{
1578#ifdef DEBUG
1579 WriteLog("USER32: DispatchMessageW\n");
1580#endif
1581 // NOTE: This will not work as is (needs UNICODE support)
1582 return O32_DispatchMessage(arg1);
1583}
1584//******************************************************************************
1585//******************************************************************************
1586int WIN32API DlgDirListA( HWND arg1, LPSTR arg2, int arg3, int arg4, UINT arg5)
1587{
1588#ifdef DEBUG
1589 WriteLog("USER32: DlgDirListA\n");
1590#endif
1591 return O32_DlgDirList(arg1, arg2, arg3, arg4, arg5);
1592}
1593//******************************************************************************
1594//******************************************************************************
1595int WIN32API DlgDirListComboBoxA( HWND arg1, LPSTR arg2, int arg3, int arg4, UINT arg5)
1596{
1597#ifdef DEBUG
1598 WriteLog("USER32: DlgDirListComboBoxA\n");
1599#endif
1600 return O32_DlgDirListComboBox(arg1, arg2, arg3, arg4, arg5);
1601}
1602//******************************************************************************
1603//******************************************************************************
1604int WIN32API DlgDirListComboBoxW( HWND arg1, LPWSTR arg2, int arg3, int arg4, UINT arg5)
1605{
1606#ifdef DEBUG
1607 WriteLog("USER32: DlgDirListComboBoxW NOT WORKING\n");
1608#endif
1609 // NOTE: This will not work as is (needs UNICODE support)
1610 return 0;
1611// return O32_DlgDirListComboBox(arg1, arg2, arg3, arg4, arg5);
1612}
1613//******************************************************************************
1614//******************************************************************************
1615int WIN32API DlgDirListW( HWND arg1, LPWSTR arg2, int arg3, int arg4, UINT arg5)
1616{
1617#ifdef DEBUG
1618 WriteLog("USER32: DlgDirListW NOT WORKING\n");
1619#endif
1620 // NOTE: This will not work as is (needs UNICODE support)
1621 return 0;
1622// return O32_DlgDirList(arg1, arg2, arg3, arg4, arg5);
1623}
1624//******************************************************************************
1625//******************************************************************************
1626BOOL WIN32API DlgDirSelectComboBoxExA( HWND arg1, LPSTR arg2, int arg3, int arg4)
1627{
1628#ifdef DEBUG
1629 WriteLog("USER32: DlgDirSelectComboBoxExA\n");
1630#endif
1631 return O32_DlgDirSelectComboBoxEx(arg1, arg2, arg3, arg4);
1632}
1633//******************************************************************************
1634//******************************************************************************
1635BOOL WIN32API DlgDirSelectComboBoxExW( HWND arg1, LPWSTR arg2, int arg3, int arg4)
1636{
1637#ifdef DEBUG
1638 WriteLog("USER32: DlgDirSelectComboBoxExW NOT WORKING\n");
1639#endif
1640 // NOTE: This will not work as is (needs UNICODE support)
1641 return 0;
1642// return O32_DlgDirSelectComboBoxEx(arg1, arg2, arg3, arg4);
1643}
1644//******************************************************************************
1645//******************************************************************************
1646BOOL WIN32API DlgDirSelectExA( HWND arg1, LPSTR arg2, int arg3, int arg4)
1647{
1648#ifdef DEBUG
1649 WriteLog("USER32: DlgDirSelectExA\n");
1650#endif
1651 return O32_DlgDirSelectEx(arg1, arg2, arg3, arg4);
1652}
1653//******************************************************************************
1654//******************************************************************************
1655BOOL WIN32API DlgDirSelectExW( HWND arg1, LPWSTR arg2, int arg3, int arg4)
1656{
1657#ifdef DEBUG
1658 WriteLog("USER32: DlgDirSelectExW NOT WORKING\n");
1659#endif
1660 // NOTE: This will not work as is (needs UNICODE support)
1661 return 0;
1662// return O32_DlgDirSelectEx(arg1, arg2, arg3, arg4);
1663}
1664//******************************************************************************
1665//******************************************************************************
1666BOOL WIN32API DrawFocusRect( HDC arg1, const RECT * arg2)
1667{
1668#ifdef DEBUG
1669 WriteLog("USER32: DrawFocusRect\n");
1670#endif
1671 return O32_DrawFocusRect(arg1, arg2);
1672}
1673//******************************************************************************
1674//******************************************************************************
1675BOOL WIN32API DrawIcon( HDC arg1, int arg2, int arg3, HICON arg4)
1676{
1677#ifdef DEBUG
1678 WriteLog("USER32: DrawIcon\n");
1679#endif
1680 return O32_DrawIcon(arg1, arg2, arg3, arg4);
1681}
1682//******************************************************************************
1683//******************************************************************************
1684BOOL WIN32API DrawIconEx(HDC hdc, int xLeft, int xRight, HICON hIcon,
1685 int cxWidth, int cyWidth, UINT istepIfAniCur,
1686 HBRUSH hbrFlickerFreeDraw, UINT diFlags)
1687{
1688#ifdef DEBUG
1689 WriteLog("USER32: DrawIcon, partially implemented\n");
1690#endif
1691 return O32_DrawIcon(hdc, xLeft, xRight, hIcon);
1692}
1693//******************************************************************************
1694//******************************************************************************
1695BOOL WIN32API DrawMenuBar( HWND arg1)
1696{
1697#ifdef DEBUG
1698 WriteLog("USER32: DrawMenuBar\n");
1699#endif
1700 return O32_DrawMenuBar(arg1);
1701}
1702//******************************************************************************
1703//******************************************************************************
1704int WIN32API DrawTextW( HDC arg1, LPCWSTR arg2, int arg3, PRECT arg4, UINT arg5)
1705{
1706 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
1707 int rc;
1708
1709#ifdef DEBUG
1710 WriteLog("USER32: DrawTextW %s\n", astring);
1711#endif
1712 rc = O32_DrawText(arg1, astring, arg3, arg4, arg5);
1713 FreeAsciiString(astring);
1714 return(rc);
1715}
1716//******************************************************************************
1717//******************************************************************************
1718BOOL WIN32API EmptyClipboard(void)
1719{
1720#ifdef DEBUG
1721 WriteLog("USER32: EmptyClipboard\n");
1722#endif
1723 return O32_EmptyClipboard();
1724}
1725//******************************************************************************
1726//******************************************************************************
1727BOOL WIN32API EndDeferWindowPos( HDWP arg1)
1728{
1729#ifdef DEBUG
1730 WriteLog("USER32: EndDeferWindowPos\n");
1731#endif
1732 return O32_EndDeferWindowPos(arg1);
1733}
1734//******************************************************************************
1735//******************************************************************************
1736BOOL WIN32API EnumChildWindows(HWND hwnd, WNDENUMPROC lpfn, LPARAM lParam)
1737{
1738 BOOL rc;
1739 EnumWindowCallback *callback = new EnumWindowCallback(lpfn, lParam);
1740
1741#ifdef DEBUG
1742 WriteLog("USER32: EnumChildWindows\n");
1743#endif
1744 rc = O32_EnumChildWindows(hwnd, callback->GetOS2Callback(), (LPARAM)callback);
1745 if(callback)
1746 delete callback;
1747 return(rc);
1748}
1749//******************************************************************************
1750//******************************************************************************
1751UINT WIN32API EnumClipboardFormats(UINT arg1)
1752{
1753#ifdef DEBUG
1754 WriteLog("USER32: EnumClipboardFormats\n");
1755#endif
1756 return O32_EnumClipboardFormats(arg1);
1757}
1758//******************************************************************************
1759//******************************************************************************
1760int WIN32API EnumPropsA(HWND arg1, PROPENUMPROCA arg2)
1761{
1762#ifdef DEBUG
1763 WriteLog("USER32: EnumPropsA DOES NOT WORK\n");
1764#endif
1765 //calling convention problems
1766 return 0;
1767// return O32_EnumProps(arg1, (PROPENUMPROC_O32)arg2);
1768}
1769//******************************************************************************
1770//******************************************************************************
1771int WIN32API EnumPropsExA( HWND arg1, PROPENUMPROCEXA arg2, LPARAM arg3)
1772{
1773#ifdef DEBUG
1774 WriteLog("USER32: EnumPropsExA DOES NOT WORK\n");
1775#endif
1776 //calling convention problems
1777 return 0;
1778// return O32_EnumPropsEx(arg1, arg2, (PROPENUMPROCEX_O32)arg3);
1779}
1780//******************************************************************************
1781//******************************************************************************
1782int WIN32API EnumPropsExW( HWND arg1, PROPENUMPROCEXW arg2, LPARAM arg3)
1783{
1784#ifdef DEBUG
1785 WriteLog("USER32: EnumPropsExW\n");
1786#endif
1787 // NOTE: This will not work as is (needs UNICODE support)
1788 //calling convention problems
1789 return 0;
1790// return O32_EnumPropsEx(arg1, arg2, arg3);
1791}
1792//******************************************************************************
1793//******************************************************************************
1794int WIN32API EnumPropsW( HWND arg1, PROPENUMPROCW arg2)
1795{
1796#ifdef DEBUG
1797 WriteLog("USER32: EnumPropsW\n");
1798#endif
1799 // NOTE: This will not work as is (needs UNICODE support)
1800 //calling convention problems
1801 return 0;
1802// return O32_EnumProps(arg1, arg2);
1803}
1804//******************************************************************************
1805//******************************************************************************
1806BOOL WIN32API EnumWindows(WNDENUMPROC lpfn, LPARAM lParam)
1807{
1808 BOOL rc;
1809 EnumWindowCallback *callback = new EnumWindowCallback(lpfn, lParam);
1810
1811#ifdef DEBUG
1812 WriteLog("USER32: EnumWindows\n");
1813#endif
1814 rc = O32_EnumWindows(callback->GetOS2Callback(), (LPARAM)callback);
1815 if(callback)
1816 delete callback;
1817 return(rc);
1818}
1819//******************************************************************************
1820//******************************************************************************
1821BOOL WIN32API EqualRect( const RECT * arg1, const RECT * arg2)
1822{
1823#ifdef DEBUG
1824 WriteLog("USER32: EqualRect\n");
1825#endif
1826 return O32_EqualRect(arg1, arg2);
1827}
1828//******************************************************************************
1829//******************************************************************************
1830BOOL WIN32API ExcludeUpdateRgn( HDC arg1, HWND arg2)
1831{
1832#ifdef DEBUG
1833 WriteLog("USER32: ExcludeUpdateRgn\n");
1834#endif
1835 return O32_ExcludeUpdateRgn(arg1, arg2);
1836}
1837//******************************************************************************
1838//******************************************************************************
1839BOOL WIN32API ExitWindowsEx( UINT arg1, DWORD arg2)
1840{
1841#ifdef DEBUG
1842 WriteLog("USER32: ExitWindowsEx\n");
1843#endif
1844 return O32_ExitWindowsEx(arg1, arg2);
1845}
1846//******************************************************************************
1847//******************************************************************************
1848int WIN32API FillRect(HDC arg1, const RECT * arg2, HBRUSH arg3)
1849{
1850#ifdef DEBUG
1851 WriteLog("USER32: FillRect (%d,%d)(%d,%d) brush %X\n", arg2->left, arg2->top, arg2->right, arg2->bottom, arg3);
1852#endif
1853 return O32_FillRect(arg1, arg2, arg3);
1854}
1855//******************************************************************************
1856//******************************************************************************
1857HWND WIN32API FindWindowW( LPCWSTR arg1, LPCWSTR arg2)
1858{
1859 char *astring1 = UnicodeToAsciiString((LPWSTR)arg1);
1860 char *astring2 = UnicodeToAsciiString((LPWSTR)arg2);
1861 HWND rc;
1862
1863#ifdef DEBUG
1864 WriteLog("USER32: FindWindowW\n");
1865#endif
1866 rc = O32_FindWindow(astring1, astring2);
1867 FreeAsciiString(astring1);
1868 FreeAsciiString(astring2);
1869 return rc;
1870}
1871//******************************************************************************
1872//******************************************************************************
1873int WIN32API FrameRect( HDC arg1, const RECT * arg2, HBRUSH arg3)
1874{
1875#ifdef DEBUG
1876 WriteLog("USER32: FrameRect\n");
1877#endif
1878 return O32_FrameRect(arg1, arg2, arg3);
1879}
1880//******************************************************************************
1881//******************************************************************************
1882HWND WIN32API GetCapture(void)
1883{
1884#ifdef DEBUG
1885 WriteLog("USER32: GetCapture\n");
1886#endif
1887 return O32_GetCapture();
1888}
1889//******************************************************************************
1890//******************************************************************************
1891UINT WIN32API GetCaretBlinkTime(void)
1892{
1893#ifdef DEBUG
1894 WriteLog("USER32: GetCaretBlinkTime\n");
1895#endif
1896 return O32_GetCaretBlinkTime();
1897}
1898//******************************************************************************
1899//******************************************************************************
1900BOOL WIN32API GetCaretPos( PPOINT arg1)
1901{
1902#ifdef DEBUG
1903 WriteLog("USER32: GetCaretPos\n");
1904#endif
1905 return O32_GetCaretPos(arg1);
1906}
1907//******************************************************************************
1908//******************************************************************************
1909BOOL WIN32API GetClipCursor( PRECT arg1)
1910{
1911#ifdef DEBUG
1912 WriteLog("USER32: GetClipCursor\n");
1913#endif
1914 return O32_GetClipCursor(arg1);
1915}
1916//******************************************************************************
1917//******************************************************************************
1918HANDLE WIN32API GetClipboardData( UINT arg1)
1919{
1920#ifdef DEBUG
1921 WriteLog("USER32: GetClipboardData\n");
1922#endif
1923 return O32_GetClipboardData(arg1);
1924}
1925//******************************************************************************
1926//******************************************************************************
1927int WIN32API GetClipboardFormatNameA( UINT arg1, LPSTR arg2, int arg3)
1928{
1929#ifdef DEBUG
1930 WriteLog("USER32: GetClipboardFormatNameA %s\n", arg2);
1931#endif
1932 return O32_GetClipboardFormatName(arg1, arg2, arg3);
1933}
1934//******************************************************************************
1935//******************************************************************************
1936int WIN32API GetClipboardFormatNameW(UINT arg1, LPWSTR arg2, int arg3)
1937{
1938 int rc;
1939 char *astring = UnicodeToAsciiString(arg2);
1940
1941#ifdef DEBUG
1942 WriteLog("USER32: GetClipboardFormatNameW %s\n", astring);
1943#endif
1944 rc = O32_GetClipboardFormatName(arg1, astring, arg3);
1945 FreeAsciiString(astring);
1946 return(rc);
1947}
1948//******************************************************************************
1949//******************************************************************************
1950HWND WIN32API GetClipboardOwner(void)
1951{
1952#ifdef DEBUG
1953 WriteLog("USER32: GetClipboardOwner\n");
1954#endif
1955 return O32_GetClipboardOwner();
1956}
1957//******************************************************************************
1958//******************************************************************************
1959HWND WIN32API GetClipboardViewer(void)
1960{
1961#ifdef DEBUG
1962 WriteLog("USER32: GetClipboardViewer\n");
1963#endif
1964 return O32_GetClipboardViewer();
1965}
1966//******************************************************************************
1967//******************************************************************************
1968DWORD WIN32API GetDialogBaseUnits(void)
1969{
1970#ifdef DEBUG
1971 WriteLog("USER32: GetDialogBaseUnits\n");
1972#endif
1973 return O32_GetDialogBaseUnits();
1974}
1975//******************************************************************************
1976//******************************************************************************
1977UINT WIN32API GetDlgItemInt( HWND arg1, int arg2, PBOOL arg3, BOOL arg4)
1978{
1979#ifdef DEBUG
1980 WriteLog("USER32: GetDlgItemInt\n");
1981#endif
1982 return O32_GetDlgItemInt(arg1, arg2, arg3, arg4);
1983}
1984
1985
1986/*****************************************************************************
1987 * Name : UINT WIN32API GetDlgItemTextW
1988 * Purpose : Determine the text of a window control
1989 * Parameters: HWND arg1
1990 * int arg2
1991 * LPWSTR arg3
1992 * UINT arg4
1993 * Variables :
1994 * Result :
1995 * Remark :
1996 * Status : UNTESTED UNKNOWN STUB
1997 *
1998 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
1999 *****************************************************************************/
2000
2001UINT WIN32API GetDlgItemTextW(HWND arg1,
2002 int arg2,
2003 LPWSTR arg3,
2004 UINT arg4)
2005{
2006 LPSTR lpBuffer; /* temporary buffer for the ascii result */
2007 UINT uiResult; /* return value of the ascii variant */
2008
2009 dprintf(("USER32: GetDlgItemTextW(%08xh,%08xh,%08xh,%08xh)\n",
2010 arg1,
2011 arg2,
2012 arg3,
2013 arg4));
2014
2015
2016 lpBuffer = (LPSTR)malloc(arg4); /* allocate temporary buffer */
2017 uiResult = GetDlgItemTextA(arg1, /* call ascii variant */
2018 arg2,
2019 lpBuffer,
2020 arg4);
2021
2022 AsciiToUnicodeN(lpBuffer, /* now convert result to unicode */
2023 arg3,
2024 arg4);
2025
2026 free(lpBuffer); /* free the temporary buffer */
2027
2028 return (uiResult); /* OK, that's it */
2029}
2030
2031
2032//******************************************************************************
2033//******************************************************************************
2034UINT WIN32API GetDoubleClickTime(void)
2035{
2036#ifdef DEBUG
2037 WriteLog("USER32: GetDoubleClickTime\n");
2038#endif
2039 return O32_GetDoubleClickTime();
2040}
2041//******************************************************************************
2042//******************************************************************************
2043HWND WIN32API GetForegroundWindow(void)
2044{
2045#ifdef DEBUG
2046 WriteLog("USER32: GetForegroundWindow\n");
2047#endif
2048 return O32_GetForegroundWindow();
2049}
2050//******************************************************************************
2051//******************************************************************************
2052BOOL WIN32API GetIconInfo( HICON arg1, LPICONINFO arg2)
2053{
2054#ifdef DEBUG
2055 WriteLog("USER32: GetIconInfo\n");
2056#endif
2057 return O32_GetIconInfo(arg1, arg2);
2058}
2059//******************************************************************************
2060//******************************************************************************
2061int WIN32API GetKeyNameTextA( LPARAM arg1, LPSTR arg2, int arg3)
2062{
2063#ifdef DEBUG
2064 WriteLog("USER32: GetKeyNameTextA\n");
2065#endif
2066 return O32_GetKeyNameText(arg1, arg2, arg3);
2067}
2068//******************************************************************************
2069//******************************************************************************
2070int WIN32API GetKeyNameTextW( LPARAM arg1, LPWSTR arg2, int arg3)
2071{
2072#ifdef DEBUG
2073 WriteLog("USER32: GetKeyNameTextW DOES NOT WORK\n");
2074#endif
2075 // NOTE: This will not work as is (needs UNICODE support)
2076 return 0;
2077// return O32_GetKeyNameText(arg1, arg2, arg3);
2078}
2079//******************************************************************************
2080//******************************************************************************
2081int WIN32API GetKeyboardType( int arg1)
2082{
2083#ifdef DEBUG
2084 WriteLog("USER32: GetKeyboardType\n");
2085#endif
2086 return O32_GetKeyboardType(arg1);
2087}
2088//******************************************************************************
2089//******************************************************************************
2090HWND WIN32API GetLastActivePopup( HWND arg1)
2091{
2092#ifdef DEBUG
2093 WriteLog("USER32: GetLastActivePopup\n");
2094#endif
2095 return O32_GetLastActivePopup(arg1);
2096}
2097//******************************************************************************
2098//******************************************************************************
2099LONG WIN32API GetMessageExtraInfo(void)
2100{
2101 dprintf(("USER32: GetMessageExtraInfo\n"));
2102 return O32_GetMessageExtraInfo();
2103}
2104//******************************************************************************
2105//******************************************************************************
2106DWORD WIN32API GetMessagePos(void)
2107{
2108 dprintf(("USER32: GetMessagePos\n"));
2109 return O32_GetMessagePos();
2110}
2111//******************************************************************************
2112//******************************************************************************
2113LONG WIN32API GetMessageTime(void)
2114{
2115 dprintf(("USER32: GetMessageTime\n"));
2116 return O32_GetMessageTime();
2117}
2118//******************************************************************************
2119//******************************************************************************
2120BOOL WIN32API GetMessageW(LPMSG arg1, HWND arg2, UINT arg3, UINT arg4)
2121{
2122 BOOL rc;
2123
2124 // NOTE: This will not work as is (needs UNICODE support)
2125 rc = O32_GetMessage(arg1, arg2, arg3, arg4);
2126 dprintf(("USER32: GetMessageW %X returned %d\n", arg2, rc));
2127 return(rc);
2128}
2129//******************************************************************************
2130//******************************************************************************
2131HWND WIN32API GetNextDlgGroupItem( HWND arg1, HWND arg2, BOOL arg3)
2132{
2133#ifdef DEBUG
2134 WriteLog("USER32: GetNextDlgGroupItem\n");
2135#endif
2136 return O32_GetNextDlgGroupItem(arg1, arg2, arg3);
2137}
2138//******************************************************************************
2139//******************************************************************************
2140HWND WIN32API GetOpenClipboardWindow(void)
2141{
2142#ifdef DEBUG
2143 WriteLog("USER32: GetOpenClipboardWindow\n");
2144#endif
2145 return O32_GetOpenClipboardWindow();
2146}
2147//******************************************************************************
2148//******************************************************************************
2149HWND WIN32API GetParent( HWND arg1)
2150{
2151#ifdef DEBUG
2152//// WriteLog("USER32: GetParent\n");
2153#endif
2154 return O32_GetParent(arg1);
2155}
2156//******************************************************************************
2157//******************************************************************************
2158int WIN32API GetPriorityClipboardFormat( PUINT arg1, int arg2)
2159{
2160#ifdef DEBUG
2161 WriteLog("USER32: GetPriorityClipboardFormat\n");
2162#endif
2163 return O32_GetPriorityClipboardFormat(arg1, arg2);
2164}
2165//******************************************************************************
2166//******************************************************************************
2167HANDLE WIN32API GetPropA( HWND arg1, LPCSTR arg2)
2168{
2169#ifdef DEBUG
2170 if((int)arg2 >> 16 != 0)
2171 WriteLog("USER32: GetPropA %s\n", arg2);
2172 else WriteLog("USER32: GetPropA %X\n", arg2);
2173#endif
2174 return O32_GetProp(arg1, arg2);
2175}
2176//******************************************************************************
2177//******************************************************************************
2178HANDLE WIN32API GetPropW(HWND arg1, LPCWSTR arg2)
2179{
2180 BOOL handle;
2181 char *astring;
2182
2183 if((int)arg2 >> 16 != 0)
2184 astring = UnicodeToAsciiString((LPWSTR)arg2);
2185 else astring = (char *)arg2;
2186#ifdef DEBUG
2187 if((int)arg2 >> 16 != 0)
2188 WriteLog("USER32: GetPropW %s\n", astring);
2189 else WriteLog("USER32: GetPropW %X\n", astring);
2190#endif
2191 handle = GetPropA(arg1, (LPCSTR)astring);
2192 if((int)arg2 >> 16 != 0)
2193 FreeAsciiString(astring);
2194
2195 return(handle);
2196}
2197//******************************************************************************
2198//******************************************************************************
2199DWORD WIN32API GetQueueStatus( UINT arg1)
2200{
2201#ifdef DEBUG
2202 WriteLog("USER32: GetQueueStatus\n");
2203#endif
2204 return O32_GetQueueStatus(arg1);
2205}
2206//******************************************************************************
2207//******************************************************************************
2208int WIN32API GetScrollPos(HWND hwnd, int fnBar)
2209{
2210 int pos;
2211
2212 pos = O32_GetScrollPos(hwnd, fnBar);
2213#ifdef DEBUG
2214 WriteLog("USER32: GetScrollPos of %X type %d returned %d\n", hwnd, fnBar, pos);
2215#endif
2216 return(pos);
2217}
2218//******************************************************************************
2219//******************************************************************************
2220BOOL WIN32API GetScrollRange( HWND arg1, int arg2, int * arg3, int * arg4)
2221{
2222#ifdef DEBUG
2223 WriteLog("USER32: GetScrollRange\n");
2224#endif
2225 return O32_GetScrollRange(arg1, arg2, arg3, arg4);
2226}
2227//******************************************************************************
2228//******************************************************************************
2229DWORD WIN32API GetTabbedTextExtentA( HDC arg1, LPCSTR arg2, int arg3, int arg4, int * arg5)
2230{
2231#ifdef DEBUG
2232 WriteLog("USER32: GetTabbedTextExtentA\n");
2233#endif
2234 return O32_GetTabbedTextExtent(arg1, arg2, arg3, arg4, arg5);
2235}
2236//******************************************************************************
2237//******************************************************************************
2238DWORD WIN32API GetTabbedTextExtentW( HDC arg1, LPCWSTR arg2, int arg3, int arg4, int * arg5)
2239{
2240 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
2241 DWORD rc;
2242
2243#ifdef DEBUG
2244 WriteLog("USER32: GetTabbedTextExtentW\n");
2245#endif
2246 rc = O32_GetTabbedTextExtent(arg1, astring, arg3, arg4, arg5);
2247 FreeAsciiString(astring);
2248 return rc;
2249}
2250//******************************************************************************
2251//******************************************************************************
2252HWND WIN32API GetTopWindow( HWND arg1)
2253{
2254#ifdef DEBUG
2255//// WriteLog("USER32: GetTopWindow\n");
2256#endif
2257 return O32_GetTopWindow(arg1);
2258}
2259//******************************************************************************
2260//******************************************************************************
2261int WIN32API GetUpdateRgn( HWND arg1, HRGN arg2, BOOL arg3)
2262{
2263#ifdef DEBUG
2264 WriteLog("USER32: GetUpdateRgn\n");
2265#endif
2266 return O32_GetUpdateRgn(arg1, arg2, arg3);
2267}
2268//******************************************************************************
2269//******************************************************************************
2270BOOL WIN32API GetWindowPlacement( HWND arg1, LPWINDOWPLACEMENT arg2)
2271{
2272#ifdef DEBUG
2273 WriteLog("USER32: GetWindowPlacement\n");
2274#endif
2275 return O32_GetWindowPlacement(arg1, arg2);
2276}
2277//******************************************************************************
2278
2279/***********************************************************************
2280 * GetInternalWindowPos (USER32.245)
2281 */
2282UINT WIN32API GetInternalWindowPos(HWND hwnd,
2283 LPRECT rectWnd,
2284 LPPOINT ptIcon )
2285{
2286 WINDOWPLACEMENT wndpl;
2287
2288 dprintf(("USER32: GetInternalWindowPos(%08xh,%08xh,%08xh)\n",
2289 hwnd,
2290 rectWnd,
2291 ptIcon));
2292
2293 if (O32_GetWindowPlacement( hwnd, &wndpl ))
2294 {
2295 if (rectWnd) *rectWnd = wndpl.rcNormalPosition;
2296 if (ptIcon) *ptIcon = wndpl.ptMinPosition;
2297 return wndpl.showCmd;
2298 }
2299 return 0;
2300}
2301
2302
2303//******************************************************************************
2304int WIN32API GetWindowTextLengthW( HWND arg1)
2305{
2306#ifdef DEBUG
2307 WriteLog("USER32: GetWindowTextLengthW\n");
2308#endif
2309 return O32_GetWindowTextLength(arg1);
2310}
2311//******************************************************************************
2312//******************************************************************************
2313int WIN32API GetWindowTextW(HWND hwnd, LPWSTR lpsz, int cch)
2314{
2315 char title[128];
2316 int rc;
2317
2318 rc = O32_GetWindowText(hwnd, title, sizeof(title));
2319#ifdef DEBUG
2320 WriteLog("USER32: GetWindowTextW returned %s\n", title);
2321#endif
2322 if(rc > cch) {
2323 title[cch-1] = 0;
2324 rc = cch;
2325 }
2326 AsciiToUnicode(title, lpsz);
2327 return(rc);
2328}
2329//******************************************************************************
2330//******************************************************************************
2331DWORD WIN32API GetWindowThreadProcessId(HWND arg1, PDWORD arg2)
2332{
2333#ifdef DEBUG
2334 WriteLog("USER32: GetWindowThreadProcessId\n");
2335#endif
2336 return O32_GetWindowThreadProcessId(arg1, arg2);
2337}
2338//******************************************************************************
2339//******************************************************************************
2340BOOL WIN32API HideCaret( HWND arg1)
2341{
2342#ifdef DEBUG
2343 WriteLog("USER32: HideCaret\n");
2344#endif
2345 return O32_HideCaret(arg1);
2346}
2347//******************************************************************************
2348//******************************************************************************
2349BOOL WIN32API InSendMessage(void)
2350{
2351#ifdef DEBUG
2352 WriteLog("USER32: InSendMessage\n");
2353#endif
2354 return O32_InSendMessage();
2355}
2356//******************************************************************************
2357//******************************************************************************
2358BOOL WIN32API IntersectRect( PRECT arg1, const RECT * arg2, const RECT * arg3)
2359{
2360#ifdef DEBUG
2361//// WriteLog("USER32: IntersectRect\n");
2362#endif
2363 return O32_IntersectRect(arg1, arg2, arg3);
2364}
2365//******************************************************************************
2366//******************************************************************************
2367BOOL WIN32API InvalidateRgn( HWND arg1, HRGN arg2, BOOL arg3)
2368{
2369#ifdef DEBUG
2370 WriteLog("USER32: InvalidateRgn\n");
2371#endif
2372 return O32_InvalidateRgn(arg1, arg2, arg3);
2373}
2374//******************************************************************************
2375//******************************************************************************
2376BOOL WIN32API InvertRect( HDC arg1, const RECT * arg2)
2377{
2378#ifdef DEBUG
2379 WriteLog("USER32: InvertRect\n");
2380#endif
2381 return O32_InvertRect(arg1, arg2);
2382}
2383//******************************************************************************
2384//******************************************************************************
2385BOOL WIN32API IsChild( HWND arg1, HWND arg2)
2386{
2387#ifdef DEBUG
2388 WriteLog("USER32: IsChild\n");
2389#endif
2390 return O32_IsChild(arg1, arg2);
2391}
2392//******************************************************************************
2393//******************************************************************************
2394BOOL WIN32API IsClipboardFormatAvailable( UINT arg1)
2395{
2396#ifdef DEBUG
2397 WriteLog("USER32: IsClipboardFormatAvailable\n");
2398#endif
2399 return O32_IsClipboardFormatAvailable(arg1);
2400}
2401//******************************************************************************
2402//******************************************************************************
2403BOOL WIN32API IsDialogMessageW( HWND arg1, LPMSG arg2)
2404{
2405#ifdef DEBUG
2406 WriteLog("USER32: IsDialogMessageW\n");
2407#endif
2408 // NOTE: This will not work as is (needs UNICODE support)
2409 return O32_IsDialogMessage(arg1, arg2);
2410}
2411
2412//******************************************************************************
2413//******************************************************************************
2414BOOL WIN32API IsRectEmpty( const RECT * arg1)
2415{
2416#ifdef DEBUG
2417 WriteLog("USER32: IsRectEmpty\n");
2418#endif
2419 return O32_IsRectEmpty(arg1);
2420}
2421//******************************************************************************
2422//******************************************************************************
2423BOOL WIN32API IsWindow( HWND arg1)
2424{
2425#ifdef DEBUG
2426 WriteLog("USER32: IsWindow\n");
2427#endif
2428 return O32_IsWindow(arg1);
2429}
2430//******************************************************************************
2431//******************************************************************************
2432BOOL WIN32API IsWindowEnabled( HWND arg1)
2433{
2434#ifdef DEBUG
2435 WriteLog("USER32: IsWindowEnabled\n");
2436#endif
2437 return O32_IsWindowEnabled(arg1);
2438}
2439//******************************************************************************
2440//******************************************************************************
2441BOOL WIN32API IsWindowVisible( HWND arg1)
2442{
2443#ifdef DEBUG
2444 WriteLog("USER32: IsWindowVisible\n");
2445#endif
2446 return O32_IsWindowVisible(arg1);
2447}
2448//******************************************************************************
2449//******************************************************************************
2450BOOL WIN32API IsZoomed( HWND arg1)
2451{
2452#ifdef DEBUG
2453 WriteLog("USER32: IsZoomed\n");
2454#endif
2455 return O32_IsZoomed(arg1);
2456}
2457//******************************************************************************
2458//******************************************************************************
2459BOOL WIN32API LockWindowUpdate( HWND arg1)
2460{
2461#ifdef DEBUG
2462 WriteLog("USER32: LockWindowUpdate\n");
2463#endif
2464 return O32_LockWindowUpdate(arg1);
2465}
2466//******************************************************************************
2467//******************************************************************************
2468BOOL WIN32API MapDialogRect( HWND arg1, PRECT arg2)
2469{
2470#ifdef DEBUG
2471 WriteLog("USER32: MapDialogRect\n");
2472#endif
2473 return O32_MapDialogRect(arg1, arg2);
2474}
2475//******************************************************************************
2476//******************************************************************************
2477UINT WIN32API MapVirtualKeyA( UINT arg1, UINT arg2)
2478{
2479#ifdef DEBUG
2480 WriteLog("USER32: MapVirtualKeyA\n");
2481#endif
2482 return O32_MapVirtualKey(arg1, arg2);
2483}
2484//******************************************************************************
2485//******************************************************************************
2486UINT WIN32API MapVirtualKeyW( UINT arg1, UINT arg2)
2487{
2488#ifdef DEBUG
2489 WriteLog("USER32: MapVirtualKeyW\n");
2490#endif
2491 // NOTE: This will not work as is (needs UNICODE support)
2492 return O32_MapVirtualKey(arg1, arg2);
2493}
2494//******************************************************************************
2495//******************************************************************************
2496int WIN32API MapWindowPoints( HWND arg1, HWND arg2, LPPOINT arg3, UINT arg4)
2497{
2498#ifdef DEBUG
2499 WriteLog("USER32: MapWindowPoints\n");
2500#endif
2501 return O32_MapWindowPoints(arg1, arg2, arg3, arg4);
2502}
2503//******************************************************************************
2504//******************************************************************************
2505int WIN32API MessageBoxW(HWND arg1, LPCWSTR arg2, LPCWSTR arg3, UINT arg4)
2506{
2507 char *astring1, *astring2;
2508 int rc;
2509
2510 astring1 = UnicodeToAsciiString((LPWSTR)arg2);
2511 astring2 = UnicodeToAsciiString((LPWSTR)arg3);
2512#ifdef DEBUG
2513 WriteLog("USER32: MessageBoxW %s %s\n", astring1, astring2);
2514#endif
2515 rc = O32_MessageBox(arg1, astring1, astring2, arg4);
2516 FreeAsciiString(astring1);
2517 FreeAsciiString(astring2);
2518 return(rc);
2519}
2520//******************************************************************************
2521//******************************************************************************
2522BOOL WIN32API OpenClipboard( HWND arg1)
2523{
2524#ifdef DEBUG
2525 WriteLog("USER32: OpenClipboard\n");
2526#endif
2527 return O32_OpenClipboard(arg1);
2528}
2529//******************************************************************************
2530//******************************************************************************
2531BOOL WIN32API PeekMessageW( LPMSG arg1, HWND arg2, UINT arg3, UINT arg4, UINT arg5)
2532{
2533#ifdef DEBUG
2534 WriteLog("USER32: PeekMessageW\n");
2535#endif
2536 // NOTE: This will not work as is (needs UNICODE support)
2537 return O32_PeekMessage(arg1, arg2, arg3, arg4, arg5);
2538}
2539//******************************************************************************
2540//******************************************************************************
2541// NOTE: Open32 function doesn't have the 'W'.
2542BOOL WIN32API PostMessageW( HWND arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
2543{
2544#ifdef DEBUG
2545 WriteLog("USER32: PostMessageW\n");
2546#endif
2547 // NOTE: This will not work as is (needs UNICODE support)
2548 return O32_PostMessage(arg1, arg2, arg3, arg4);
2549}
2550//******************************************************************************
2551//******************************************************************************
2552BOOL WIN32API PostThreadMessageA( DWORD arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
2553{
2554#ifdef DEBUG
2555 WriteLog("USER32: PostThreadMessageA\n");
2556#endif
2557 return O32_PostThreadMessage(arg1, arg2, arg3, arg4);
2558}
2559//******************************************************************************
2560//******************************************************************************
2561BOOL WIN32API PostThreadMessageW( DWORD arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
2562{
2563#ifdef DEBUG
2564 WriteLog("USER32: PostThreadMessageW\n");
2565#endif
2566 // NOTE: This will not work as is (needs UNICODE support)
2567 return O32_PostThreadMessage(arg1, arg2, arg3, arg4);
2568}
2569//******************************************************************************
2570//******************************************************************************
2571BOOL WIN32API PtInRect( const RECT * arg1, POINT arg2)
2572{
2573#ifdef DEBUG1
2574 WriteLog("USER32: PtInRect\n");
2575#endif
2576 return O32_PtInRect(arg1, arg2);
2577}
2578//******************************************************************************
2579//******************************************************************************
2580BOOL WIN32API RedrawWindow( HWND arg1, const RECT * arg2, HRGN arg3, UINT arg4)
2581{
2582 BOOL rc;
2583
2584 rc = O32_RedrawWindow(arg1, arg2, arg3, arg4);
2585#ifdef DEBUG
2586 WriteLog("USER32: RedrawWindow %X , %X, %X, %X returned %d\n", arg1, arg2, arg3, arg4, rc);
2587#endif
2588 InvalidateRect(arg1, arg2, TRUE);
2589 UpdateWindow(arg1);
2590 SendMessageA(arg1, WM_PAINT, 0, 0);
2591 return(rc);
2592}
2593//******************************************************************************
2594//******************************************************************************
2595UINT WIN32API RegisterClipboardFormatA( LPCSTR arg1)
2596{
2597#ifdef DEBUG
2598 WriteLog("USER32: RegisterClipboardFormatA\n");
2599#endif
2600 return O32_RegisterClipboardFormat(arg1);
2601}
2602//******************************************************************************
2603//******************************************************************************
2604UINT WIN32API RegisterClipboardFormatW(LPCWSTR arg1)
2605{
2606 UINT rc;
2607 char *astring = UnicodeToAsciiString((LPWSTR)arg1);
2608
2609#ifdef DEBUG
2610 WriteLog("USER32: RegisterClipboardFormatW %s\n", astring);
2611#endif
2612 rc = O32_RegisterClipboardFormat(astring);
2613 FreeAsciiString(astring);
2614#ifdef DEBUG
2615 WriteLog("USER32: RegisterClipboardFormatW returned %d\n", rc);
2616#endif
2617 return(rc);
2618}
2619//******************************************************************************
2620//******************************************************************************
2621UINT WIN32API RegisterWindowMessageW( LPCWSTR arg1)
2622{
2623 char *astring = UnicodeToAsciiString((LPWSTR)arg1);
2624 UINT rc;
2625
2626#ifdef DEBUG
2627 WriteLog("USER32: RegisterWindowMessageW\n");
2628#endif
2629 rc = O32_RegisterWindowMessage(astring);
2630 FreeAsciiString(astring);
2631 return rc;
2632}
2633//******************************************************************************
2634//******************************************************************************
2635HANDLE WIN32API RemovePropA( HWND arg1, LPCSTR arg2)
2636{
2637#ifdef DEBUG
2638 WriteLog("USER32: RemovePropA\n");
2639#endif
2640 return O32_RemoveProp(arg1, arg2);
2641}
2642//******************************************************************************
2643//******************************************************************************
2644HANDLE WIN32API RemovePropW( HWND arg1, LPCWSTR arg2)
2645{
2646 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
2647 HANDLE rc;
2648
2649#ifdef DEBUG
2650 WriteLog("USER32: RemovePropW\n");
2651#endif
2652 rc = O32_RemoveProp(arg1, astring);
2653 FreeAsciiString(astring);
2654 return rc;
2655}
2656//******************************************************************************
2657//******************************************************************************
2658BOOL WIN32API ReplyMessage( LRESULT arg1)
2659{
2660#ifdef DEBUG
2661 WriteLog("USER32: ReplyMessage\n");
2662#endif
2663 return O32_ReplyMessage(arg1);
2664}
2665//******************************************************************************
2666//******************************************************************************
2667BOOL WIN32API ScreenToClient( HWND arg1, LPPOINT arg2)
2668{
2669#ifdef DEBUG
2670 WriteLog("USER32: ScreenToClient\n");
2671#endif
2672 return O32_ScreenToClient(arg1, arg2);
2673}
2674//******************************************************************************
2675//******************************************************************************
2676BOOL WIN32API ScrollDC( HDC arg1, int arg2, int arg3, const RECT * arg4, const RECT * arg5, HRGN arg6, PRECT arg7)
2677{
2678#ifdef DEBUG
2679 WriteLog("USER32: ScrollDC\n");
2680#endif
2681 return O32_ScrollDC(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
2682}
2683//******************************************************************************
2684//******************************************************************************
2685BOOL WIN32API ScrollWindow( HWND arg1, int arg2, int arg3, const RECT * arg4, const RECT * arg5)
2686{
2687#ifdef DEBUG
2688 WriteLog("USER32: ScrollWindow\n");
2689#endif
2690 return O32_ScrollWindow(arg1, arg2, arg3, arg4, arg5);
2691}
2692//******************************************************************************
2693//******************************************************************************
2694BOOL WIN32API ScrollWindowEx( HWND arg1, int arg2, int arg3, const RECT * arg4, const RECT * arg5, HRGN arg6, PRECT arg7, UINT arg8)
2695{
2696#ifdef DEBUG
2697 WriteLog("USER32: ScrollWindowEx\n");
2698#endif
2699 return O32_ScrollWindowEx(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
2700}
2701//******************************************************************************
2702//******************************************************************************
2703LONG WIN32API SendDlgItemMessageW( HWND arg1, int arg2, UINT arg3, WPARAM arg4, LPARAM arg5)
2704{
2705#ifdef DEBUG
2706 WriteLog("USER32: SendDlgItemMessageW\n");
2707#endif
2708 return O32_SendDlgItemMessage(arg1, arg2, arg3, arg4, arg5);
2709}
2710//******************************************************************************
2711//******************************************************************************
2712LRESULT WIN32API SendMessageW( HWND arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
2713{
2714LRESULT rc;
2715
2716#ifdef DEBUG
2717 WriteLog("USER32: SendMessageW....\n");
2718#endif
2719 rc = O32_SendMessage(arg1, arg2, arg3, arg4);
2720#ifdef DEBUG
2721 WriteLog("USER32: SendMessageW %X %X %X %X returned %d\n", arg1, arg2, arg3, arg4, rc);
2722#endif
2723 return(rc);
2724}
2725//******************************************************************************
2726//******************************************************************************
2727BOOL WIN32API SetCaretBlinkTime( UINT arg1)
2728{
2729#ifdef DEBUG
2730 WriteLog("USER32: SetCaretBlinkTime\n");
2731#endif
2732 return O32_SetCaretBlinkTime(arg1);
2733}
2734//******************************************************************************
2735//******************************************************************************
2736BOOL WIN32API SetCaretPos( int arg1, int arg2)
2737{
2738 dprintf(("USER32: SetCaretPos\n"));
2739 return O32_SetCaretPos(arg1, arg2);
2740}
2741//******************************************************************************
2742//******************************************************************************
2743HANDLE WIN32API SetClipboardData( UINT arg1, HANDLE arg2)
2744{
2745 dprintf(("USER32: SetClipboardData\n"));
2746 return O32_SetClipboardData(arg1, arg2);
2747}
2748//******************************************************************************
2749//******************************************************************************
2750HWND WIN32API SetClipboardViewer( HWND arg1)
2751{
2752 dprintf(("USER32: SetClipboardViewer\n"));
2753 return O32_SetClipboardViewer(arg1);
2754}
2755//******************************************************************************
2756//******************************************************************************
2757BOOL WIN32API SetDlgItemTextW( HWND arg1, int arg2, LPCWSTR arg3)
2758{
2759char *astring = UnicodeToAsciiString((LPWSTR)arg3);
2760BOOL rc;
2761
2762#ifdef DEBUG
2763 WriteLog("USER32: SetDlgItemTextW\n");
2764#endif
2765 // NOTE: This will not work as is (needs UNICODE support)
2766 rc = O32_SetDlgItemText(arg1, arg2, astring);
2767 FreeAsciiString(astring);
2768 return rc;
2769}
2770//******************************************************************************
2771//******************************************************************************
2772BOOL WIN32API SetDoubleClickTime( UINT arg1)
2773{
2774#ifdef DEBUG
2775 WriteLog("USER32: SetDoubleClickTime\n");
2776#endif
2777 return O32_SetDoubleClickTime(arg1);
2778}
2779//******************************************************************************
2780//******************************************************************************
2781HWND WIN32API SetParent( HWND arg1, HWND arg2)
2782{
2783#ifdef DEBUG
2784 WriteLog("USER32: SetParent\n");
2785#endif
2786 return O32_SetParent(arg1, arg2);
2787}
2788//******************************************************************************
2789//******************************************************************************
2790BOOL WIN32API SetPropA( HWND arg1, LPCSTR arg2, HANDLE arg3)
2791{
2792#ifdef DEBUG
2793 if((int)arg2 >> 16 != 0)
2794 WriteLog("USER32: SetPropA %S\n", arg2);
2795 else WriteLog("USER32: SetPropA %X\n", arg2);
2796#endif
2797 return O32_SetProp(arg1, arg2, arg3);
2798}
2799//******************************************************************************
2800//******************************************************************************
2801BOOL WIN32API SetPropW(HWND arg1, LPCWSTR arg2, HANDLE arg3)
2802{
2803 BOOL rc;
2804 char *astring;
2805
2806 if((int)arg2 >> 16 != 0)
2807 astring = UnicodeToAsciiString((LPWSTR)arg2);
2808 else astring = (char *)arg2;
2809
2810#ifdef DEBUG
2811 if((int)arg2 >> 16 != 0)
2812 WriteLog("USER32: SetPropW %S\n", astring);
2813 else WriteLog("USER32: SetPropW %X\n", astring);
2814#endif
2815 rc = O32_SetProp(arg1, astring, arg3);
2816 if((int)astring >> 16 != 0)
2817 FreeAsciiString(astring);
2818 return(rc);
2819}
2820//******************************************************************************
2821//******************************************************************************
2822BOOL WIN32API SetRectEmpty( PRECT arg1)
2823{
2824#ifdef DEBUG
2825 WriteLog("USER32: SetRectEmpty\n");
2826#endif
2827 return O32_SetRectEmpty(arg1);
2828}
2829//******************************************************************************
2830//******************************************************************************
2831int WIN32API SetScrollPos( HWND arg1, int arg2, int arg3, BOOL arg4)
2832{
2833#ifdef DEBUG
2834 WriteLog("USER32: SetScrollPos\n");
2835#endif
2836 return O32_SetScrollPos(arg1, arg2, arg3, arg4);
2837}
2838//******************************************************************************
2839//******************************************************************************
2840BOOL WIN32API SetScrollRange( HWND arg1, int arg2, int arg3, int arg4, BOOL arg5)
2841{
2842#ifdef DEBUG
2843 WriteLog("USER32: SetScrollRange\n");
2844#endif
2845 return O32_SetScrollRange(arg1, arg2, arg3, arg4, arg5);
2846}
2847//******************************************************************************
2848//******************************************************************************
2849BOOL WIN32API SetWindowPlacement( HWND arg1, const WINDOWPLACEMENT * arg2)
2850{
2851 dprintf(("USER32: SetWindowPlacement\n"));
2852 return O32_SetWindowPlacement(arg1, arg2);
2853}
2854//******************************************************************************
2855//******************************************************************************
2856BOOL WIN32API SetWindowTextW( HWND arg1, LPCWSTR arg2)
2857{
2858 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
2859 BOOL rc;
2860
2861 rc = SetWindowTextA(arg1, (LPCSTR)astring);
2862 dprintf(("USER32: SetWindowTextW %X %s returned %d\n", arg1, astring, rc));
2863 FreeAsciiString(astring);
2864 return(rc);
2865}
2866//******************************************************************************
2867//******************************************************************************
2868BOOL WIN32API ShowCaret( HWND arg1)
2869{
2870 dprintf(("USER32: ShowCaret\n"));
2871 return O32_ShowCaret(arg1);
2872}
2873//******************************************************************************
2874//******************************************************************************
2875BOOL WIN32API ShowOwnedPopups( HWND arg1, BOOL arg2)
2876{
2877 dprintf(("USER32: ShowOwnedPopups\n"));
2878 return O32_ShowOwnedPopups(arg1, arg2);
2879}
2880//******************************************************************************
2881//******************************************************************************
2882BOOL WIN32API ShowScrollBar( HWND arg1, int arg2, BOOL arg3)
2883{
2884#ifdef DEBUG
2885 WriteLog("USER32: ShowScrollBar\n");
2886#endif
2887 return O32_ShowScrollBar(arg1, arg2, arg3);
2888}
2889//******************************************************************************
2890//******************************************************************************
2891BOOL WIN32API SwapMouseButton( BOOL arg1)
2892{
2893#ifdef DEBUG
2894 WriteLog("USER32: SwapMouseButton\n");
2895#endif
2896 return O32_SwapMouseButton(arg1);
2897}
2898//******************************************************************************
2899//******************************************************************************
2900BOOL WIN32API SystemParametersInfoA(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni)
2901{
2902 BOOL rc;
2903 NONCLIENTMETRICSA *cmetric = (NONCLIENTMETRICSA *)pvParam;
2904
2905 switch(uiAction) {
2906 case SPI_SCREENSAVERRUNNING:
2907 *(BOOL *)pvParam = FALSE;
2908 rc = TRUE;
2909 break;
2910 case SPI_GETDRAGFULLWINDOWS:
2911 *(BOOL *)pvParam = FALSE;
2912 rc = TRUE;
2913 break;
2914 case SPI_GETNONCLIENTMETRICS:
2915 memset(cmetric, 0, sizeof(NONCLIENTMETRICSA));
2916 cmetric->cbSize = sizeof(NONCLIENTMETRICSA);
2917 //CB: font info not valid, needs improvements
2918 O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfCaptionFont),0);
2919 O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfMenuFont),0);
2920 //CB: experimental change for statusbar (and tooltips)
2921
2922 //O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfStatusFont),0);
2923 lstrcpyA(cmetric->lfStatusFont.lfFaceName,"WarpSans");
2924 cmetric->lfStatusFont.lfHeight = 9;
2925
2926 O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfMessageFont),0);
2927 cmetric->iBorderWidth = GetSystemMetrics(SM_CXBORDER);
2928 cmetric->iScrollWidth = GetSystemMetrics(SM_CXHSCROLL);
2929 cmetric->iScrollHeight = GetSystemMetrics(SM_CYHSCROLL);
2930 cmetric->iCaptionWidth = 32; //TODO
2931 cmetric->iCaptionHeight = 16; //TODO
2932 cmetric->iSmCaptionWidth = GetSystemMetrics(SM_CXSMSIZE);
2933 cmetric->iSmCaptionHeight = GetSystemMetrics(SM_CYSMSIZE);
2934 cmetric->iMenuWidth = 32; //TODO
2935 cmetric->iMenuHeight = GetSystemMetrics(SM_CYMENU);
2936 rc = TRUE;
2937 break;
2938 case 104: //TODO: Undocumented
2939 rc = 16;
2940 break;
2941 default:
2942 rc = O32_SystemParametersInfo(uiAction, uiParam, pvParam, fWinIni);
2943 break;
2944 }
2945#ifdef DEBUG
2946 WriteLog("USER32: SystemParametersInfoA %d, returned %d\n", uiAction, rc);
2947#endif
2948 return(rc);
2949}
2950//******************************************************************************
2951//TODO: Check for more options that have different structs for Unicode!!!!
2952//******************************************************************************
2953BOOL WIN32API SystemParametersInfoW(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni)
2954{
2955 BOOL rc;
2956 NONCLIENTMETRICSW *clientMetricsW = (NONCLIENTMETRICSW *)pvParam;
2957 NONCLIENTMETRICSA clientMetricsA = {0};
2958 PVOID pvParamA;
2959 UINT uiParamA;
2960
2961 switch(uiAction) {
2962 case SPI_SETNONCLIENTMETRICS:
2963 clientMetricsA.cbSize = sizeof(NONCLIENTMETRICSA);
2964 clientMetricsA.iBorderWidth = clientMetricsW->iBorderWidth;
2965 clientMetricsA.iScrollWidth = clientMetricsW->iScrollWidth;
2966 clientMetricsA.iScrollHeight = clientMetricsW->iScrollHeight;
2967 clientMetricsA.iCaptionWidth = clientMetricsW->iCaptionWidth;
2968 clientMetricsA.iCaptionHeight = clientMetricsW->iCaptionHeight;
2969 ConvertFontWA(&clientMetricsW->lfCaptionFont, &clientMetricsA.lfCaptionFont);
2970 clientMetricsA.iSmCaptionWidth = clientMetricsW->iSmCaptionWidth;
2971 clientMetricsA.iSmCaptionHeight = clientMetricsW->iSmCaptionHeight;
2972 ConvertFontWA(&clientMetricsW->lfSmCaptionFont, &clientMetricsA.lfSmCaptionFont);
2973 clientMetricsA.iMenuWidth = clientMetricsW->iMenuWidth;
2974 clientMetricsA.iMenuHeight = clientMetricsW->iMenuHeight;
2975 ConvertFontWA(&clientMetricsW->lfMenuFont, &clientMetricsA.lfMenuFont);
2976 ConvertFontWA(&clientMetricsW->lfStatusFont, &clientMetricsA.lfStatusFont);
2977 ConvertFontWA(&clientMetricsW->lfMessageFont, &clientMetricsA.lfMessageFont);
2978 //no break
2979 case SPI_GETNONCLIENTMETRICS:
2980 uiParamA = sizeof(NONCLIENTMETRICSA);
2981 pvParamA = &clientMetricsA;
2982 break;
2983 default:
2984 pvParamA = pvParam;
2985 uiParamA = uiParam;
2986 break;
2987 }
2988 rc = SystemParametersInfoA(uiAction, uiParamA, pvParamA, fWinIni);
2989
2990 switch(uiAction) {
2991 case SPI_GETNONCLIENTMETRICS:
2992 clientMetricsW->cbSize = sizeof(*clientMetricsW);
2993 clientMetricsW->iBorderWidth = clientMetricsA.iBorderWidth;
2994 clientMetricsW->iScrollWidth = clientMetricsA.iScrollWidth;
2995 clientMetricsW->iScrollHeight = clientMetricsA.iScrollHeight;
2996 clientMetricsW->iCaptionWidth = clientMetricsA.iCaptionWidth;
2997 clientMetricsW->iCaptionHeight = clientMetricsA.iCaptionHeight;
2998 ConvertFontAW(&clientMetricsA.lfCaptionFont, &clientMetricsW->lfCaptionFont);
2999
3000 clientMetricsW->iSmCaptionWidth = clientMetricsA.iSmCaptionWidth;
3001 clientMetricsW->iSmCaptionHeight = clientMetricsA.iSmCaptionHeight;
3002 ConvertFontAW(&clientMetricsA.lfSmCaptionFont, &clientMetricsW->lfSmCaptionFont);
3003
3004 clientMetricsW->iMenuWidth = clientMetricsA.iMenuWidth;
3005 clientMetricsW->iMenuHeight = clientMetricsA.iMenuHeight;
3006 ConvertFontAW(&clientMetricsA.lfMenuFont, &clientMetricsW->lfMenuFont);
3007 ConvertFontAW(&clientMetricsA.lfStatusFont, &clientMetricsW->lfStatusFont);
3008 ConvertFontAW(&clientMetricsA.lfMessageFont, &clientMetricsW->lfMessageFont);
3009 break;
3010 }
3011#ifdef DEBUG
3012 WriteLog("USER32: SystemParametersInfoW %d, returned %d\n", uiAction, rc);
3013#endif
3014 return(rc);
3015}
3016//******************************************************************************
3017//******************************************************************************
3018LONG WIN32API TabbedTextOutA( HDC arg1, int arg2, int arg3, LPCSTR arg4, int arg5, int arg6, int * arg7, int arg8)
3019{
3020#ifdef DEBUG
3021 WriteLog("USER32: TabbedTextOutA\n");
3022#endif
3023 return O32_TabbedTextOut(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
3024}
3025//******************************************************************************
3026//******************************************************************************
3027LONG WIN32API TabbedTextOutW( HDC arg1, int arg2, int arg3, LPCWSTR arg4, int arg5, int arg6, int * arg7, int arg8)
3028{
3029 char *astring = UnicodeToAsciiString((LPWSTR)arg4);
3030 LONG rc;
3031
3032#ifdef DEBUG
3033 WriteLog("USER32: TabbedTextOutW\n");
3034#endif
3035 rc = O32_TabbedTextOut(arg1, arg2, arg3, astring, arg5, arg6, arg7, arg8);
3036 FreeAsciiString(astring);
3037 return rc;
3038}
3039//******************************************************************************
3040//******************************************************************************
3041int WIN32API TranslateAccelerator( HWND arg1, HACCEL arg2, LPMSG arg3)
3042{
3043#ifdef DEBUG
3044 WriteLog("USER32: TranslateAccelerator\n");
3045#endif
3046 return O32_TranslateAccelerator(arg1, arg2, arg3);
3047}
3048//******************************************************************************
3049//******************************************************************************
3050int WIN32API TranslateAcceleratorW( HWND arg1, HACCEL arg2, LPMSG arg3)
3051{
3052#ifdef DEBUG
3053 WriteLog("USER32: TranslateAcceleratorW\n");
3054#endif
3055 // NOTE: This will not work as is (needs UNICODE support)
3056 return O32_TranslateAccelerator(arg1, arg2, arg3);
3057}
3058//******************************************************************************
3059//******************************************************************************
3060BOOL WIN32API TranslateMDISysAccel( HWND arg1, LPMSG arg2)
3061{
3062#ifdef DEBUG
3063//// WriteLog("USER32: TranslateMDISysAccel\n");
3064#endif
3065 return O32_TranslateMDISysAccel(arg1, arg2);
3066}
3067//******************************************************************************
3068//******************************************************************************
3069BOOL WIN32API UnionRect( PRECT arg1, const RECT * arg2, const RECT * arg3)
3070{
3071#ifdef DEBUG
3072 WriteLog("USER32: UnionRect\n");
3073#endif
3074 return O32_UnionRect(arg1, arg2, arg3);
3075}
3076//******************************************************************************
3077//******************************************************************************
3078BOOL WIN32API ValidateRect( HWND arg1, const RECT * arg2)
3079{
3080#ifdef DEBUG
3081 WriteLog("USER32: ValidateRect\n");
3082#endif
3083 return O32_ValidateRect(arg1, arg2);
3084}
3085//******************************************************************************
3086//******************************************************************************
3087BOOL WIN32API ValidateRgn( HWND arg1, HRGN arg2)
3088{
3089#ifdef DEBUG
3090 WriteLog("USER32: ValidateRgn\n");
3091#endif
3092 return O32_ValidateRgn(arg1, arg2);
3093}
3094//******************************************************************************
3095//******************************************************************************
3096WORD WIN32API VkKeyScanW( WCHAR arg1)
3097{
3098#ifdef DEBUG
3099 WriteLog("USER32: VkKeyScanW\n");
3100#endif
3101 // NOTE: This will not work as is (needs UNICODE support)
3102 return O32_VkKeyScan((char)arg1);
3103}
3104//******************************************************************************
3105//******************************************************************************
3106BOOL WIN32API WaitMessage(void)
3107{
3108#ifdef DEBUG
3109 WriteLog("USER32: WaitMessage\n");
3110#endif
3111 return O32_WaitMessage();
3112}
3113//******************************************************************************
3114//******************************************************************************
3115BOOL WIN32API WinHelpW( HWND arg1, LPCWSTR arg2, UINT arg3, DWORD arg4)
3116{
3117 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
3118 BOOL rc;
3119
3120#ifdef DEBUG
3121 WriteLog("USER32: WinHelpW\n");
3122#endif
3123 rc = WinHelpA(arg1, astring, arg3, arg4);
3124 FreeAsciiString(astring);
3125 return rc;
3126}
3127//******************************************************************************
3128//******************************************************************************
3129HWND WIN32API WindowFromDC( HDC arg1)
3130{
3131#ifdef DEBUG
3132 WriteLog("USER32: WindowFromDC\n");
3133#endif
3134 return O32_WindowFromDC(arg1);
3135}
3136//******************************************************************************
3137//******************************************************************************
3138HWND WIN32API WindowFromPoint( POINT arg1)
3139{
3140#ifdef DEBUG
3141 WriteLog("USER32: WindowFromPoint\n");
3142#endif
3143 return O32_WindowFromPoint(arg1);
3144}
3145//******************************************************************************
3146//******************************************************************************
3147int WIN32API wvsprintfA( LPSTR arg1, LPCSTR arg2, va_list arg3)
3148{
3149#ifdef DEBUG
3150 WriteLog("USER32: wvsprintfA\n");
3151#endif
3152 return O32_wvsprintf(arg1, arg2, (LPCVOID *)arg3);
3153}
3154//******************************************************************************
3155//******************************************************************************
3156int WIN32API wvsprintfW(LPWSTR lpOut, LPCWSTR lpFmt, va_list argptr)
3157{
3158 int rc;
3159 char szOut[256];
3160 char *lpFmtA;
3161
3162 lpFmtA = UnicodeToAsciiString((LPWSTR)lpFmt);
3163#ifdef DEBUG
3164 WriteLog("USER32: wvsprintfW, DOES NOT HANDLE UNICODE STRINGS!\n");
3165 WriteLog("USER32: %s\n", lpFmt);
3166#endif
3167 rc = O32_wvsprintf(szOut, lpFmtA, (LPCVOID)argptr);
3168
3169 AsciiToUnicode(szOut, lpOut);
3170#ifdef DEBUG
3171 WriteLog("USER32: %s\n", lpOut);
3172#endif
3173 FreeAsciiString(lpFmtA);
3174 return(rc);
3175}
3176//******************************************************************************
3177//No need to support this
3178//******************************************************************************
3179BOOL WIN32API SetMessageQueue(int cMessagesMax)
3180{
3181#ifdef DEBUG
3182 WriteLog("USER32: SetMessageQueue\n");
3183#endif
3184 return(TRUE);
3185}
3186//******************************************************************************
3187//TODO: Not complete
3188//******************************************************************************
3189BOOL WIN32API GetScrollInfo(HWND hwnd, int fnBar, LPSCROLLINFO lpsi)
3190{
3191#ifdef DEBUG
3192 WriteLog("USER32: GetScrollInfo\n");
3193#endif
3194 if(lpsi == NULL)
3195 return(FALSE);
3196
3197 if(lpsi->fMask & SIF_POS)
3198 lpsi->nPos = GetScrollPos(hwnd, fnBar);
3199 if(lpsi->fMask & SIF_RANGE)
3200 GetScrollRange(hwnd, fnBar, &lpsi->nMin, &lpsi->nMax);
3201 if(lpsi->fMask & SIF_PAGE) {
3202#ifdef DEBUG
3203 WriteLog("USER32: GetScrollInfo, page info not implemented\n");
3204#endif
3205 lpsi->nPage = 25;
3206 }
3207 return(TRUE);
3208}
3209//******************************************************************************
3210//TODO: Not complete
3211//******************************************************************************
3212INT WIN32API SetScrollInfo(HWND hwnd, INT fnBar, const SCROLLINFO *lpsi, BOOL fRedraw)
3213{
3214 int smin, smax;
3215
3216#ifdef DEBUG
3217 WriteLog("USER32: SetScrollInfo\n");
3218#endif
3219 if(lpsi == NULL)
3220 return(FALSE);
3221
3222 if(lpsi->fMask & SIF_POS)
3223 SetScrollPos(hwnd, fnBar, lpsi->nPos, fRedraw);
3224 if(lpsi->fMask & SIF_RANGE)
3225 SetScrollRange(hwnd, fnBar, lpsi->nMin, lpsi->nMax, fRedraw);
3226 if(lpsi->fMask & SIF_PAGE) {
3227#ifdef DEBUG
3228 WriteLog("USER32: GetScrollInfo, page info not implemented\n");
3229#endif
3230 }
3231 if(lpsi->fMask & SIF_DISABLENOSCROLL) {
3232#ifdef DEBUG
3233 WriteLog("USER32: GetScrollInfo, disable scrollbar not yet implemented\n");
3234#endif
3235 }
3236 return(TRUE);
3237}
3238//******************************************************************************
3239//******************************************************************************
3240BOOL WIN32API GrayStringA(HDC hdc, HBRUSH hBrush, GRAYSTRINGPROC lpOutputFunc,
3241 LPARAM lpData, int nCount, int X, int Y, int nWidth,
3242 int nHeight)
3243{
3244 BOOL rc;
3245 COLORREF curclr;
3246
3247#ifdef DEBUG
3248 WriteLog("USER32: GrayStringA, not completely implemented\n");
3249#endif
3250 if(lpOutputFunc == NULL && lpData == NULL) {
3251#ifdef DEBUG
3252 WriteLog("USER32: lpOutputFunc == NULL && lpData == NULL\n");
3253#endif
3254 return(FALSE);
3255 }
3256 if(lpOutputFunc) {
3257 return(lpOutputFunc(hdc, lpData, nCount));
3258 }
3259 curclr = SetTextColor(hdc, GetSysColor(COLOR_GRAYTEXT));
3260 rc = TextOutA(hdc, X, Y, (char *)lpData, nCount);
3261 SetTextColor(hdc, curclr);
3262
3263 return(rc);
3264}
3265//******************************************************************************
3266//******************************************************************************
3267BOOL WIN32API GrayStringW(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 char *astring;
3273 COLORREF curclr;
3274
3275#ifdef DEBUG
3276 WriteLog("USER32: GrayStringW, not completely implemented\n");
3277#endif
3278
3279 if(lpOutputFunc == NULL && lpData == NULL) {
3280#ifdef DEBUG
3281 WriteLog("USER32: lpOutputFunc == NULL && lpData == NULL\n");
3282#endif
3283 return(FALSE);
3284 }
3285 if(nCount == 0)
3286 nCount = UniStrlen((UniChar*)lpData);
3287
3288 if(lpOutputFunc) {
3289 return(lpOutputFunc(hdc, lpData, nCount));
3290 }
3291 astring = UnicodeToAsciiString((LPWSTR)lpData);
3292
3293 curclr = SetTextColor(hdc, GetSysColor(COLOR_GRAYTEXT));
3294 rc = TextOutA(hdc, X, Y, astring, nCount);
3295 SetTextColor(hdc, curclr);
3296
3297 FreeAsciiString(astring);
3298 return(rc);
3299}
3300//******************************************************************************
3301//TODO:
3302//******************************************************************************
3303int WIN32API CopyAcceleratorTableA(HACCEL hAccelSrc, LPACCEL lpAccelDest,
3304 int cAccelEntries)
3305{
3306#ifdef DEBUG
3307 WriteLog("USER32: CopyAcceleratorTableA, not implemented\n");
3308#endif
3309 return(0);
3310}
3311//******************************************************************************
3312//TODO:
3313//******************************************************************************
3314int WIN32API CopyAcceleratorTableW(HACCEL hAccelSrc, LPACCEL lpAccelDest,
3315 int cAccelEntries)
3316{
3317#ifdef DEBUG
3318 WriteLog("USER32: CopyAcceleratorTableW, not implemented\n");
3319#endif
3320 return(0);
3321}
3322//******************************************************************************
3323//******************************************************************************
3324LRESULT WIN32API SendMessageTimeoutA(HWND hwnd, UINT Msg, WPARAM wParam,
3325 LPARAM lParam, UINT fuFlags, UINT uTimeOut,
3326 LPDWORD lpdwResult)
3327{
3328#ifdef DEBUG
3329 WriteLog("USER32: SendMessageTimeoutA, partially implemented\n");
3330#endif
3331 //ignore fuFlags & wTimeOut
3332 *lpdwResult = SendMessageA(hwnd, Msg, wParam, lParam);
3333 return(TRUE);
3334}
3335//******************************************************************************
3336//******************************************************************************
3337LRESULT WIN32API SendMessageTimeoutW(HWND hwnd, UINT Msg, WPARAM wParam,
3338 LPARAM lParam, UINT fuFlags, UINT uTimeOut,
3339 LPDWORD lpdwResult)
3340{
3341#ifdef DEBUG
3342 WriteLog("USER32: SendMessageTimeoutW, partially implemented\n");
3343#endif
3344 return(SendMessageTimeoutA(hwnd, Msg, wParam, lParam, fuFlags, uTimeOut, lpdwResult));
3345}
3346//******************************************************************************
3347//******************************************************************************
3348HANDLE WIN32API CopyImage(HANDLE hImage, UINT uType, int cxDesired, int cyDesired, UINT fuFlags)
3349{
3350#ifdef DEBUG
3351 WriteLog("USER32: CopyImage, not implemented\n");
3352#endif
3353 switch(uType) {
3354 case IMAGE_BITMAP:
3355 case IMAGE_CURSOR:
3356 case IMAGE_ICON:
3357 default:
3358#ifdef DEBUG
3359 WriteLog("USER32: CopyImage, unknown type\n");
3360#endif
3361 return(NULL);
3362 }
3363 return(NULL);
3364}
3365//******************************************************************************
3366//******************************************************************************
3367BOOL WIN32API GetKeyboardState(PBYTE lpKeyState)
3368{
3369#ifdef DEBUG
3370 WriteLog("USER32: GetKeyboardState, not properly implemented\n");
3371#endif
3372 memset(lpKeyState, 0, 256);
3373 return(TRUE);
3374}
3375//******************************************************************************
3376//******************************************************************************
3377BOOL WIN32API SetKeyboardState(PBYTE lpKeyState)
3378{
3379#ifdef DEBUG
3380 WriteLog("USER32: SetKeyboardState, not implemented\n");
3381#endif
3382 return(TRUE);
3383}
3384//******************************************************************************
3385//******************************************************************************
3386BOOL WIN32API SendNotifyMessageA(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)
3387{
3388#ifdef DEBUG
3389 WriteLog("USER32: SendNotifyMessageA, not completely implemented\n");
3390#endif
3391 return(SendMessageA(hwnd, Msg, wParam, lParam));
3392}
3393//******************************************************************************
3394//******************************************************************************
3395BOOL WIN32API SendNotifyMessageW(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)
3396{
3397#ifdef DEBUG
3398 WriteLog("USER32: SendNotifyMessageW, not completely implemented\n");
3399#endif
3400 return(SendMessageA(hwnd, Msg, wParam, lParam));
3401}
3402//******************************************************************************
3403//2nd parameter not used according to SDK (yet?)
3404//******************************************************************************
3405VOID WIN32API SetLastErrorEx(DWORD dwErrCode, DWORD dwType)
3406{
3407#ifdef DEBUG
3408 WriteLog("USER32: SetLastErrorEx\n");
3409#endif
3410 SetLastError(dwErrCode);
3411}
3412//******************************************************************************
3413//******************************************************************************
3414LPARAM WIN32API SetMessageExtraInfo(LPARAM lParam)
3415{
3416#ifdef DEBUG
3417 WriteLog("USER32: SetMessageExtraInfo, not implemented\n");
3418#endif
3419 return(0);
3420}
3421//******************************************************************************
3422//******************************************************************************
3423BOOL WIN32API ActivateKeyboardLayout(HKL hkl, UINT fuFlags)
3424{
3425#ifdef DEBUG
3426 WriteLog("USER32: ActivateKeyboardLayout, not implemented\n");
3427#endif
3428 return(TRUE);
3429}
3430//******************************************************************************
3431//******************************************************************************
3432int WIN32API GetKeyboardLayoutList(int nBuff, HKL *lpList)
3433{
3434#ifdef DEBUG
3435 WriteLog("USER32: GetKeyboardLayoutList, not implemented\n");
3436#endif
3437 return(0);
3438}
3439//******************************************************************************
3440//******************************************************************************
3441HKL WIN32API GetKeyboardLayout(DWORD dwLayout)
3442{
3443#ifdef DEBUG
3444 WriteLog("USER32: GetKeyboardLayout, not implemented\n");
3445#endif
3446 return(0);
3447}
3448//******************************************************************************
3449//******************************************************************************
3450int WIN32API LookupIconIdFromDirectory(PBYTE presbits, BOOL fIcon)
3451{
3452#ifdef DEBUG
3453 WriteLog("USER32: LookupIconIdFromDirectory, not implemented\n");
3454#endif
3455 return(0);
3456}
3457//******************************************************************************
3458//******************************************************************************
3459int WIN32API LookupIconIdFromDirectoryEx(PBYTE presbits, BOOL fIcon,
3460 int cxDesired, int cyDesired,
3461 UINT Flags)
3462{
3463#ifdef DEBUG
3464 WriteLog("USER32: LookupIconIdFromDirectoryEx, not implemented\n");
3465#endif
3466 return(0);
3467}
3468//******************************************************************************
3469//DWORD idAttach; /* thread to attach */
3470//DWORD idAttachTo; /* thread to attach to */
3471//BOOL fAttach; /* attach or detach */
3472//******************************************************************************
3473BOOL WIN32API AttachThreadInput(DWORD idAttach, DWORD idAttachTo, BOOL fAttach)
3474{
3475#ifdef DEBUG
3476 WriteLog("USER32: AttachThreadInput, not implemented\n");
3477#endif
3478 return(TRUE);
3479}
3480//******************************************************************************
3481//******************************************************************************
3482BOOL WIN32API RegisterHotKey(HWND hwnd, int idHotKey, UINT fuModifiers, UINT uVirtKey)
3483{
3484#ifdef DEBUG
3485 WriteLog("USER32: RegisterHotKey, not implemented\n");
3486#endif
3487 return(TRUE);
3488}
3489//******************************************************************************
3490//******************************************************************************
3491BOOL WIN32API UnregisterHotKey(HWND hwnd, int idHotKey)
3492{
3493#ifdef DEBUG
3494 WriteLog("USER32: UnregisterHotKey, not implemented\n");
3495#endif
3496 return(TRUE);
3497}
3498//******************************************************************************
3499//******************************************************************************
3500//******************************************************************************
3501//******************************************************************************
3502BOOL WIN32API SetWindowContextHelpId(HWND hwnd, DWORD dwContextHelpId)
3503{
3504#ifdef DEBUG
3505 WriteLog("USER32: SetWindowContextHelpId, not implemented\n");
3506#endif
3507 return(TRUE);
3508}
3509//******************************************************************************
3510//******************************************************************************
3511DWORD WIN32API GetWindowContextHelpId(HWND hwnd)
3512{
3513#ifdef DEBUG
3514 WriteLog("USER32: GetWindowContextHelpId, not implemented\n");
3515#endif
3516 return(0);
3517}
3518//******************************************************************************
3519//restores iconized window to previous size/position
3520//******************************************************************************
3521BOOL WIN32API OpenIcon(HWND hwnd)
3522{
3523#ifdef DEBUG
3524 WriteLog("USER32: OpenIcon\n");
3525#endif
3526 if(!IsIconic(hwnd))
3527 return FALSE;
3528 ShowWindow(hwnd, SW_SHOWNORMAL);
3529 return TRUE;
3530}
3531//******************************************************************************
3532//******************************************************************************
3533BOOL WIN32API IsWindowUnicode(HWND hwnd)
3534{
3535#ifdef DEBUG
3536 WriteLog("USER32: IsWindowUnicode, not implemented\n");
3537#endif
3538 return(FALSE);
3539}
3540//******************************************************************************
3541//******************************************************************************
3542BOOL WIN32API GetMonitorInfoA(HMONITOR,LPMONITORINFO)
3543{
3544#ifdef DEBUG
3545 WriteLog("USER32: GetMonitorInfoA not supported!!\n");
3546#endif
3547 return(FALSE);
3548}
3549//******************************************************************************
3550//******************************************************************************
3551BOOL WIN32API GetMonitorInfoW(HMONITOR,LPMONITORINFO)
3552{
3553#ifdef DEBUG
3554 WriteLog("USER32: GetMonitorInfoW not supported!!\n");
3555#endif
3556 return(FALSE);
3557}
3558//******************************************************************************
3559//******************************************************************************
3560HMONITOR WIN32API MonitorFromWindow(HWND hwnd, DWORD dwFlags)
3561{
3562#ifdef DEBUG
3563 WriteLog("USER32: MonitorFromWindow not correctly supported??\n");
3564#endif
3565 return(0);
3566}
3567//******************************************************************************
3568//******************************************************************************
3569HMONITOR WIN32API MonitorFromRect(LPRECT rect, DWORD dwFlags)
3570{
3571#ifdef DEBUG
3572 WriteLog("USER32: MonitorFromRect not correctly supported??\n");
3573#endif
3574 return(0);
3575}
3576//******************************************************************************
3577//******************************************************************************
3578HMONITOR WIN32API MonitorFromPoint(POINT point, DWORD dwflags)
3579{
3580#ifdef DEBUG
3581 WriteLog("USER32: MonitorFromPoint not correctly supported??\n");
3582#endif
3583 return(0);
3584}
3585//******************************************************************************
3586//******************************************************************************
3587BOOL WIN32API EnumDisplayMonitors(HDC,LPRECT,MONITORENUMPROC,LPARAM)
3588{
3589#ifdef DEBUG
3590 WriteLog("USER32: EnumDisplayMonitors not supported??\n");
3591#endif
3592 return(FALSE);
3593}
3594//******************************************************************************
3595//******************************************************************************
3596BOOL WIN32API EnumDisplaySettingsA(LPCSTR lpszDeviceName, DWORD iModeNum,
3597 LPDEVMODEA lpDevMode)
3598{
3599#ifdef DEBUG
3600 WriteLog("USER32: EnumDisplaySettingsA FAKED\n");
3601#endif
3602 switch(iModeNum) {
3603 case 0:
3604 lpDevMode->dmBitsPerPel = 16;
3605 lpDevMode->dmPelsWidth = 768;
3606 lpDevMode->dmPelsHeight = 1024;
3607 lpDevMode->dmDisplayFlags = 0;
3608 lpDevMode->dmDisplayFrequency = 70;
3609 break;
3610 case 1:
3611 lpDevMode->dmBitsPerPel = 16;
3612 lpDevMode->dmPelsWidth = 640;
3613 lpDevMode->dmPelsHeight = 480;
3614 lpDevMode->dmDisplayFlags = 0;
3615 lpDevMode->dmDisplayFrequency = 70;
3616 break;
3617 default:
3618 return(FALSE);
3619 }
3620 return(TRUE);
3621}
3622//******************************************************************************
3623//******************************************************************************
3624LONG WIN32API ChangeDisplaySettingsA(LPDEVMODEA lpDevMode, DWORD dwFlags)
3625{
3626#ifdef DEBUG
3627 if(lpDevMode) {
3628 WriteLog("USER32: ChangeDisplaySettingsA FAKED %X\n", dwFlags);
3629 WriteLog("USER32: ChangeDisplaySettingsA lpDevMode->dmBitsPerPel %d\n", lpDevMode->dmBitsPerPel);
3630 WriteLog("USER32: ChangeDisplaySettingsA lpDevMode->dmPelsWidth %d\n", lpDevMode->dmPelsWidth);
3631 WriteLog("USER32: ChangeDisplaySettingsA lpDevMode->dmPelsHeight %d\n", lpDevMode->dmPelsHeight);
3632 }
3633#endif
3634 return(DISP_CHANGE_SUCCESSFUL);
3635}
3636//******************************************************************************
3637//******************************************************************************
3638
3639
3640/*****************************************************************************
3641 * Name : BOOL WIN32API AnyPopup
3642 * Purpose : The AnyPopup function indicates whether an owned, visible,
3643 * top-level pop-up, or overlapped window exists on the screen. The
3644 * function searches the entire Windows screen, not just the calling
3645 * application's client area.
3646 * Parameters: VOID
3647 * Variables :
3648 * Result : If a pop-up window exists, the return value is TRUE even if the
3649 * pop-up window is completely covered by other windows. Otherwise,
3650 * it is FALSE.
3651 * Remark : AnyPopup is a Windows version 1.x function and is retained for
3652 * compatibility purposes. It is generally not useful.
3653 * Status : UNTESTED STUB
3654 *
3655 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3656 *****************************************************************************/
3657
3658BOOL WIN32API AnyPopup(VOID)
3659{
3660 dprintf(("USER32:AnyPopup() not implemented.\n"));
3661
3662 return (FALSE);
3663}
3664
3665
3666/*****************************************************************************
3667 * Name : long WIN32API BroadcastSystemMessage
3668 * Purpose : The BroadcastSystemMessage function sends a message to the given
3669 * recipients. The recipients can be applications, installable
3670 * drivers, Windows-based network drivers, system-level device
3671 * drivers, or any combination of these system components.
3672 * Parameters: DWORD dwFlags,
3673 LPDWORD lpdwRecipients,
3674 UINT uiMessage,
3675 WPARAM wParam,
3676 LPARAM lParam
3677 * Variables :
3678 * Result : If the function succeeds, the return value is a positive value.
3679 * If the function is unable to broadcast the message, the return value is -1.
3680 * If the dwFlags parameter is BSF_QUERY and at least one recipient returned FALSE to the corresponding message, the return value is zero.
3681 * Remark :
3682 * Status : UNTESTED STUB
3683 *
3684 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3685 *****************************************************************************/
3686
3687long WIN32API BroadcastSystemMessage(DWORD dwFlags,
3688 LPDWORD lpdwRecipients,
3689 UINT uiMessage,
3690 WPARAM wParam,
3691 LPARAM lParam)
3692{
3693 dprintf(("USER32:BroadcastSystemMessage(%08xh,%08xh,%08xh,%08xh,%08x) not implemented.\n",
3694 dwFlags,
3695 lpdwRecipients,
3696 uiMessage,
3697 wParam,
3698 lParam));
3699
3700 return (-1);
3701}
3702
3703
3704/*****************************************************************************
3705 * Name : WORD WIN32API CascadeWindows
3706 * Purpose : The CascadeWindows function cascades the specified windows or
3707 * the child windows of the specified parent window.
3708 * Parameters: HWND hwndParent handle of parent window
3709 * UINT wHow types of windows not to arrange
3710 * CONST RECT * lpRect rectangle to arrange windows in
3711 * UINT cKids number of windows to arrange
3712 * const HWND FAR * lpKids array of window handles
3713 * Variables :
3714 * Result : If the function succeeds, the return value is the number of windows arranged.
3715 * If the function fails, the return value is zero.
3716 * Remark :
3717 * Status : UNTESTED STUB
3718 *
3719 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3720 *****************************************************************************/
3721
3722WORD WIN32API CascadeWindows(HWND hwndParent,
3723 UINT wHow,
3724 CONST LPRECT lpRect,
3725 UINT cKids,
3726 const HWND *lpKids)
3727{
3728 dprintf(("USER32:CascadeWindows(%08xh,%u,%08xh,%u,%08x) not implemented.\n",
3729 hwndParent,
3730 wHow,
3731 lpRect,
3732 cKids,
3733 lpKids));
3734
3735 return (0);
3736}
3737
3738
3739/*****************************************************************************
3740 * Name : LONG WIN32API ChangeDisplaySettingsW
3741 * Purpose : The ChangeDisplaySettings function changes the display settings
3742 * to the specified graphics mode.
3743 * Parameters: LPDEVMODEW lpDevModeW
3744 * DWORD dwFlags
3745 * Variables :
3746 * Result : DISP_CHANGE_SUCCESSFUL The settings change was successful.
3747 * DISP_CHANGE_RESTART The computer must be restarted in order for the graphics mode to work.
3748 * DISP_CHANGE_BADFLAGS An invalid set of flags was passed in.
3749 * DISP_CHANGE_FAILED The display driver failed the specified graphics mode.
3750 * DISP_CHANGE_BADMODE The graphics mode is not supported.
3751 * DISP_CHANGE_NOTUPDATED Unable to write settings to the registry.
3752 * Remark :
3753 * Status : UNTESTED STUB
3754 *
3755 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3756 *****************************************************************************/
3757
3758LONG WIN32API ChangeDisplaySettingsW(LPDEVMODEW lpDevMode,
3759 DWORD dwFlags)
3760{
3761 dprintf(("USER32:ChangeDisplaySettingsW(%08xh,%08x) not implemented.\n",
3762 lpDevMode,
3763 dwFlags));
3764
3765 return (ChangeDisplaySettingsA((LPDEVMODEA)lpDevMode,
3766 dwFlags));
3767}
3768
3769/*****************************************************************************
3770 * Name : BOOL WIN32API CloseDesktop
3771 * Purpose : The CloseDesktop function closes an open handle of a desktop
3772 * object. A desktop is a secure object contained within a window
3773 * station object. A desktop has a logical display surface and
3774 * contains windows, menus and hooks.
3775 * Parameters: HDESK hDesktop
3776 * Variables :
3777 * Result : If the function succeeds, the return value is TRUE.
3778 * If the functions fails, the return value is FALSE. To get
3779 * extended error information, call GetLastError.
3780 * Remark :
3781 * Status : UNTESTED STUB
3782 *
3783 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3784 *****************************************************************************/
3785
3786BOOL WIN32API CloseDesktop(HDESK hDesktop)
3787{
3788 dprintf(("USER32:CloseDesktop(%08x) not implemented.\n",
3789 hDesktop));
3790
3791 return (FALSE);
3792}
3793
3794
3795/*****************************************************************************
3796 * Name : BOOL WIN32API CloseWindowStation
3797 * Purpose : The CloseWindowStation function closes an open window station handle.
3798 * Parameters: HWINSTA hWinSta
3799 * Variables :
3800 * Result :
3801 * Remark : If the function succeeds, the return value is TRUE.
3802 * If the functions fails, the return value is FALSE. To get
3803 * extended error information, call GetLastError.
3804 * Status : UNTESTED STUB
3805 *
3806 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3807 *****************************************************************************/
3808
3809BOOL WIN32API CloseWindowStation(HWINSTA hWinSta)
3810{
3811 dprintf(("USER32:CloseWindowStation(%08x) not implemented.\n",
3812 hWinSta));
3813
3814 return (FALSE);
3815}
3816
3817
3818/*****************************************************************************
3819 * Name : HDESK WIN32API CreateDesktopA
3820 * Purpose : The CreateDesktop function creates a new desktop on the window
3821 * station associated with the calling process.
3822 * Parameters: LPCTSTR lpszDesktop name of the new desktop
3823 * LPCTSTR lpszDevice name of display device to assign to the desktop
3824 * LPDEVMODE pDevMode reserved; must be NULL
3825 * DWORD dwFlags flags to control interaction with other applications
3826 * DWORD dwDesiredAccess specifies access of returned handle
3827 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the desktop
3828 * Variables :
3829 * Result : If the function succeeds, the return value is a handle of the
3830 * newly created desktop.
3831 * If the function fails, the return value is NULL. To get extended
3832 * error information, call GetLastError.
3833 * Remark :
3834 * Status : UNTESTED STUB
3835 *
3836 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3837 *****************************************************************************/
3838
3839HDESK WIN32API CreateDesktopA(LPCTSTR lpszDesktop,
3840 LPCTSTR lpszDevice,
3841 LPDEVMODEA pDevMode,
3842 DWORD dwFlags,
3843 DWORD dwDesiredAccess,
3844 LPSECURITY_ATTRIBUTES lpsa)
3845{
3846 dprintf(("USER32:CreateDesktopA(%s,%s,%08xh,%08xh,%08xh,%08x) not implemented.\n",
3847 lpszDesktop,
3848 lpszDevice,
3849 pDevMode,
3850 dwFlags,
3851 dwDesiredAccess,
3852 lpsa));
3853
3854 return (NULL);
3855}
3856
3857
3858/*****************************************************************************
3859 * Name : HDESK WIN32API CreateDesktopW
3860 * Purpose : The CreateDesktop function creates a new desktop on the window
3861 * station associated with the calling process.
3862 * Parameters: LPCTSTR lpszDesktop name of the new desktop
3863 * LPCTSTR lpszDevice name of display device to assign to the desktop
3864 * LPDEVMODE pDevMode reserved; must be NULL
3865 * DWORD dwFlags flags to control interaction with other applications
3866 * DWORD dwDesiredAccess specifies access of returned handle
3867 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the desktop
3868 * Variables :
3869 * Result : If the function succeeds, the return value is a handle of the
3870 * newly created desktop.
3871 * If the function fails, the return value is NULL. To get extended
3872 * error information, call GetLastError.
3873 * Remark :
3874 * Status : UNTESTED STUB
3875 *
3876 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3877 *****************************************************************************/
3878
3879HDESK WIN32API CreateDesktopW(LPCTSTR lpszDesktop,
3880 LPCTSTR lpszDevice,
3881 LPDEVMODEW pDevMode,
3882 DWORD dwFlags,
3883 DWORD dwDesiredAccess,
3884 LPSECURITY_ATTRIBUTES lpsa)
3885{
3886 dprintf(("USER32:CreateDesktopW(%s,%s,%08xh,%08xh,%08xh,%08x) not implemented.\n",
3887 lpszDesktop,
3888 lpszDevice,
3889 pDevMode,
3890 dwFlags,
3891 dwDesiredAccess,
3892 lpsa));
3893
3894 return (NULL);
3895}
3896
3897
3898/*****************************************************************************
3899 * Name : HWINSTA WIN32API CreateWindowStationA
3900 * Purpose : The CreateWindowStation function creates a window station object.
3901 * It returns a handle that can be used to access the window station.
3902 * A window station is a secure object that contains a set of global
3903 * atoms, a clipboard, and a set of desktop objects.
3904 * Parameters: LPTSTR lpwinsta name of the new window station
3905 * DWORD dwReserved reserved; must be NULL
3906 * DWORD dwDesiredAccess specifies access of returned handle
3907 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the window station
3908 * Variables :
3909 * Result : If the function succeeds, the return value is the handle to the
3910 * newly created window station.
3911 * If the function fails, the return value is NULL. To get extended
3912 * error information, call GetLastError.
3913 * Remark :
3914 * Status : UNTESTED STUB
3915 *
3916 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3917 *****************************************************************************/
3918
3919HWINSTA WIN32API CreateWindowStationA(LPTSTR lpWinSta,
3920 DWORD dwReserved,
3921 DWORD dwDesiredAccess,
3922 LPSECURITY_ATTRIBUTES lpsa)
3923{
3924 dprintf(("USER32:CreateWindowStationA(%s,%08xh,%08xh,%08x) not implemented.\n",
3925 lpWinSta,
3926 dwReserved,
3927 dwDesiredAccess,
3928 lpsa));
3929
3930 return (NULL);
3931}
3932
3933
3934/*****************************************************************************
3935 * Name : HWINSTA WIN32API CreateWindowStationW
3936 * Purpose : The CreateWindowStation function creates a window station object.
3937 * It returns a handle that can be used to access the window station.
3938 * A window station is a secure object that contains a set of global
3939 * atoms, a clipboard, and a set of desktop objects.
3940 * Parameters: LPTSTR lpwinsta name of the new window station
3941 * DWORD dwReserved reserved; must be NULL
3942 * DWORD dwDesiredAccess specifies access of returned handle
3943 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the window station
3944 * Variables :
3945 * Result : If the function succeeds, the return value is the handle to the
3946 * newly created window station.
3947 * If the function fails, the return value is NULL. To get extended
3948 * error information, call GetLastError.
3949 * Remark :
3950 * Status : UNTESTED STUB
3951 *
3952 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3953 *****************************************************************************/
3954
3955HWINSTA WIN32API CreateWindowStationW(LPWSTR lpWinSta,
3956 DWORD dwReserved,
3957 DWORD dwDesiredAccess,
3958 LPSECURITY_ATTRIBUTES lpsa)
3959{
3960 dprintf(("USER32:CreateWindowStationW(%s,%08xh,%08xh,%08x) not implemented.\n",
3961 lpWinSta,
3962 dwReserved,
3963 dwDesiredAccess,
3964 lpsa));
3965
3966 return (NULL);
3967}
3968
3969/*****************************************************************************
3970 * Name : BOOL WIN32API DragDetect
3971 * Purpose : The DragDetect function captures the mouse and tracks its movement
3972 * Parameters: HWND hwnd
3973 * POINT pt
3974 * Variables :
3975 * Result : If the user moved the mouse outside of the drag rectangle while
3976 * holding the left button down, the return value is TRUE.
3977 * If the user did not move the mouse outside of the drag rectangle
3978 * while holding the left button down, the return value is FALSE.
3979 * Remark :
3980 * Status : UNTESTED STUB
3981 *
3982 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3983 *****************************************************************************/
3984
3985BOOL WIN32API DragDetect(HWND hwnd,
3986 POINT pt)
3987{
3988 dprintf(("USER32:DragDetect(%08xh,...) not implemented.\n",
3989 hwnd));
3990
3991 return (FALSE);
3992}
3993
3994
3995/*****************************************************************************
3996 * Name : BOOL WIN32API DrawAnimatedRects
3997 * Purpose : The DrawAnimatedRects function draws a wire-frame rectangle
3998 * and animates it to indicate the opening of an icon or the
3999 * minimizing or maximizing of a window.
4000 * Parameters: HWND hwnd handle of clipping window
4001 * int idAni type of animation
4002 * CONST RECT * lprcFrom address of rectangle coordinates (minimized)
4003 * CONST RECT * lprcTo address of rectangle coordinates (restored)
4004 * Variables :
4005 * Result : If the function succeeds, the return value is TRUE.
4006 * If the function fails, the return value is FALSE.
4007 * Remark :
4008 * Status : UNTESTED STUB
4009 *
4010 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4011 *****************************************************************************/
4012
4013BOOL WIN32API DrawAnimatedRects(HWND hwnd,
4014 int idAni,
4015 CONST RECT *lprcFrom,
4016 CONST RECT *lprcTo)
4017{
4018 dprintf(("USER32:DrawAnimatedRects (%08xh,%u,%08xh,%08x) not implemented.\n",
4019 hwnd,
4020 idAni,
4021 lprcFrom,
4022 lprcTo));
4023
4024 return (TRUE);
4025}
4026
4027
4028/*****************************************************************************
4029 * Name : VOID WIN32API DrawCaption
4030 * Purpose : The DrawCaption function draws a window caption.
4031 * Parameters: HDC hdc handle of device context
4032 * LPRECT lprc address of bounding rectangle coordinates
4033 * HFONT hfont handle of font for caption
4034 * HICON hicon handle of icon in caption
4035 * LPSTR lpszText address of caption string
4036 * WORD wFlags drawing options
4037 * Variables :
4038 * Result :
4039 * Remark :
4040 * Status : UNTESTED STUB
4041 *
4042 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4043 *****************************************************************************/
4044
4045BOOL WIN32API DrawCaption (HWND hwnd,
4046 HDC hdc,
4047 const RECT *lprc,
4048 UINT wFlags)
4049{
4050 dprintf(("USER32:DrawCaption (%08xh,%08xh,%08xh,%08xh) not implemented.\n",
4051 hwnd,
4052 hdc,
4053 lprc,
4054 wFlags));
4055
4056 return FALSE;
4057}
4058
4059
4060/*****************************************************************************
4061 * Name :
4062 * Purpose :
4063 * Parameters:
4064 * Variables :
4065 * Result :
4066 * Remark :
4067 * Status : UNTESTED STUB
4068 *
4069 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4070 *****************************************************************************/
4071
4072/*****************************************************************************
4073 * Name : BOOL WIN32API EnumDesktopWindows
4074 * Purpose : The EnumDesktopWindows function enumerates all windows in a
4075 * desktop by passing the handle of each window, in turn, to an
4076 * application-defined callback function.
4077 * Parameters: HDESK hDesktop handle of desktop to enumerate
4078 * WNDENUMPROC lpfn points to application's callback function
4079 * LPARAM lParam 32-bit value to pass to the callback function
4080 * Variables :
4081 * Result : If the function succeeds, the return value is TRUE.
4082 * If the function fails, the return value is FALSE. To get
4083 * extended error information, call GetLastError.
4084 * Remark :
4085 * Status : UNTESTED STUB
4086 *
4087 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4088 *****************************************************************************/
4089
4090BOOL WIN32API EnumDesktopWindows(HDESK hDesktop,
4091 WNDENUMPROC lpfn,
4092 LPARAM lParam)
4093{
4094 dprintf(("USER32:EnumDesktopWindows (%08xh,%08xh,%08x) not implemented.\n",
4095 hDesktop,
4096 lpfn,
4097 lParam));
4098
4099 return (FALSE);
4100}
4101
4102
4103/*****************************************************************************
4104 * Name : BOOL WIN32API EnumDesktopsA
4105 * Purpose : The EnumDesktops function enumerates all desktops in the window
4106 * station assigned to the calling process. The function does so by
4107 * passing the name of each desktop, in turn, to an application-
4108 * defined callback function.
4109 * Parameters: HWINSTA hwinsta handle of window station to enumerate
4110 * DESKTOPENUMPROC lpEnumFunc points to application's callback function
4111 * LPARAM lParam 32-bit value to pass to the callback function
4112 * Variables :
4113 * Result : If the function succeeds, the return value is TRUE.
4114 * If the function fails, the return value is FALSE. To get extended
4115 * error information, call GetLastError.
4116 * Remark :
4117 * Status : UNTESTED STUB
4118 *
4119 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4120 *****************************************************************************/
4121
4122BOOL WIN32API EnumDesktopsA(HWINSTA hWinSta,
4123 DESKTOPENUMPROCA lpEnumFunc,
4124 LPARAM lParam)
4125{
4126 dprintf(("USER32:EnumDesktopsA (%08xh,%08xh,%08x) not implemented.\n",
4127 hWinSta,
4128 lpEnumFunc,
4129 lParam));
4130
4131 return (FALSE);
4132}
4133
4134
4135/*****************************************************************************
4136 * Name : BOOL WIN32API EnumDesktopsW
4137 * Purpose : The EnumDesktops function enumerates all desktops in the window
4138 * station assigned to the calling process. The function does so by
4139 * passing the name of each desktop, in turn, to an application-
4140 * defined callback function.
4141 * Parameters: HWINSTA hwinsta handle of window station to enumerate
4142 * DESKTOPENUMPROC lpEnumFunc points to application's callback function
4143 * LPARAM lParam 32-bit value to pass to the callback function
4144 * Variables :
4145 * Result : If the function succeeds, the return value is TRUE.
4146 * If the function fails, the return value is FALSE. To get extended
4147 * error information, call GetLastError.
4148 * Remark :
4149 * Status : UNTESTED STUB
4150 *
4151 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4152 *****************************************************************************/
4153
4154BOOL WIN32API EnumDesktopsW(HWINSTA hWinSta,
4155 DESKTOPENUMPROCW lpEnumFunc,
4156 LPARAM lParam)
4157{
4158 dprintf(("USER32:EnumDesktopsW (%08xh,%08xh,%08x) not implemented.\n",
4159 hWinSta,
4160 lpEnumFunc,
4161 lParam));
4162
4163 return (FALSE);
4164}
4165
4166
4167
4168/*****************************************************************************
4169 * Name : BOOL WIN32API EnumDisplaySettingsW
4170 * Purpose : The EnumDisplaySettings function obtains information about one
4171 * of a display device's graphics modes. You can obtain information
4172 * for all of a display device's graphics modes by making a series
4173 * of calls to this function.
4174 * Parameters: LPCTSTR lpszDeviceName specifies the display device
4175 * DWORD iModeNum specifies the graphics mode
4176 * LPDEVMODE lpDevMode points to structure to receive settings
4177 * Variables :
4178 * Result : If the function succeeds, the return value is TRUE.
4179 * If the function fails, the return value is FALSE.
4180 * Remark :
4181 * Status : UNTESTED STUB
4182 *
4183 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4184 *****************************************************************************/
4185
4186BOOL WIN32API EnumDisplaySettingsW(LPCSTR lpszDeviceName,
4187 DWORD iModeNum,
4188 LPDEVMODEW lpDevMode)
4189{
4190 dprintf(("USER32:EnumDisplaySettingsW (%s,%08xh,%08x) not implemented.\n",
4191 lpszDeviceName,
4192 iModeNum,
4193 lpDevMode));
4194
4195 return (EnumDisplaySettingsA(lpszDeviceName,
4196 iModeNum,
4197 (LPDEVMODEA)lpDevMode));
4198}
4199
4200
4201/*****************************************************************************
4202 * Name : BOOL WIN32API EnumWindowStationsA
4203 * Purpose : The EnumWindowStations function enumerates all windowstations
4204 * in the system by passing the name of each window station, in
4205 * turn, to an application-defined callback function.
4206 * Parameters:
4207 * Variables : WINSTAENUMPROC lpEnumFunc points to application's callback function
4208 * LPARAM lParam 32-bit value to pass to the callback function
4209 * Result : If the function succeeds, the return value is TRUE.
4210 * If the function fails the return value is FALSE. To get extended
4211 * error information, call GetLastError.
4212 * Remark :
4213 * Status : UNTESTED STUB
4214 *
4215 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4216 *****************************************************************************/
4217
4218BOOL WIN32API EnumWindowStationsA(WINSTAENUMPROCA lpEnumFunc,
4219 LPARAM lParam)
4220{
4221 dprintf(("USER32:EnumWindowStationsA (%08xh,%08x) not implemented.\n",
4222 lpEnumFunc,
4223 lParam));
4224
4225 return (FALSE);
4226}
4227
4228
4229/*****************************************************************************
4230 * Name : BOOL WIN32API EnumWindowStationsW
4231 * Purpose : The EnumWindowStations function enumerates all windowstations
4232 * in the system by passing the name of each window station, in
4233 * turn, to an application-defined callback function.
4234 * Parameters:
4235 * Variables : WINSTAENUMPROC lpEnumFunc points to application's callback function
4236 * LPARAM lParam 32-bit value to pass to the callback function
4237 * Result : If the function succeeds, the return value is TRUE.
4238 * If the function fails the return value is FALSE. To get extended
4239 * error information, call GetLastError.
4240 * Remark :
4241 * Status : UNTESTED STUB
4242 *
4243 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4244 *****************************************************************************/
4245
4246BOOL WIN32API EnumWindowStationsW(WINSTAENUMPROCW lpEnumFunc,
4247 LPARAM lParam)
4248{
4249 dprintf(("USER32:EnumWindowStationsW (%08xh,%08x) not implemented.\n",
4250 lpEnumFunc,
4251 lParam));
4252
4253 return (FALSE);
4254}
4255
4256
4257/*****************************************************************************
4258 * Name : HWND WIN32API FindWindowExW
4259 * Purpose : The FindWindowEx function retrieves the handle of a window whose
4260 * class name and window name match the specified strings. The
4261 * function searches child windows, beginning with the one following
4262 * the given child window.
4263 * Parameters: HWND hwndParent handle of parent window
4264 * HWND hwndChildAfter handle of a child window
4265 * LPCTSTR lpszClass address of class name
4266 * LPCTSTR lpszWindow address of window name
4267 * Variables :
4268 * Result : If the function succeeds, the return value is the handle of the
4269 * window that has the specified class and window names.
4270 * If the function fails, the return value is NULL. To get extended
4271 * error information, call GetLastError.
4272 * Remark :
4273 * Status : UNTESTED STUB
4274 *
4275 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4276 *****************************************************************************/
4277
4278HWND WIN32API FindWindowExW(HWND hwndParent,
4279 HWND hwndChildAfter,
4280 LPCWSTR lpszClass,
4281 LPCWSTR lpszWindow)
4282{
4283 dprintf(("USER32:FindWindowExW (%08xh,%08xh,%s,%s) not implemented.\n",
4284 hwndParent,
4285 hwndChildAfter,
4286 lpszClass,
4287 lpszWindow));
4288
4289 return (NULL);
4290}
4291
4292/*****************************************************************************
4293 * Name : BOOL WIN32API GetInputState
4294 * Purpose : The GetInputState function determines whether there are
4295 * mouse-button or keyboard messages in the calling thread's message queue.
4296 * Parameters:
4297 * Variables :
4298 * Result : If the queue contains one or more new mouse-button or keyboard
4299 * messages, the return value is TRUE.
4300 * If the function fails, the return value is FALSE.
4301 * Remark :
4302 * Status : UNTESTED STUB
4303 *
4304 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4305 *****************************************************************************/
4306
4307BOOL WIN32API GetInputState(VOID)
4308{
4309 dprintf(("USER32:GetInputState () not implemented.\n"));
4310
4311 return (FALSE);
4312}
4313
4314
4315/*****************************************************************************
4316 * Name : UINT WIN32API GetKBCodePage
4317 * Purpose : The GetKBCodePage function is provided for compatibility with
4318 * earlier versions of Windows. In the Win32 application programming
4319 * interface (API) it just calls the GetOEMCP function.
4320 * Parameters:
4321 * Variables :
4322 * Result : If the function succeeds, the return value is an OEM code-page
4323 * identifier, or it is the default identifier if the registry
4324 * value is not readable. For a list of OEM code-page identifiers,
4325 * see GetOEMCP.
4326 * Remark :
4327 * Status : UNTESTED
4328 *
4329 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4330 *****************************************************************************/
4331
4332UINT WIN32API GetKBCodePage(VOID)
4333{
4334 return (GetOEMCP());
4335}
4336
4337
4338/*****************************************************************************
4339 * Name : BOOL WIN32API GetKeyboardLayoutNameA
4340 * Purpose : The GetKeyboardLayoutName function retrieves the name of the
4341 * active keyboard layout.
4342 * Parameters: LPTSTR pwszKLID address of buffer for layout name
4343 * Variables :
4344 * Result : If the function succeeds, the return value is TRUE.
4345 * If the function fails, the return value is FALSE. To get extended
4346 * error information, call GetLastError.
4347 * Remark :
4348 * Status : UNTESTED STUB
4349 *
4350 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4351 *****************************************************************************/
4352
4353BOOL WIN32API GetKeyboardLayoutNameA(LPTSTR pwszKLID)
4354{
4355 dprintf(("USER32:GetKeyboardLayoutNameA (%08x) not implemented.",
4356 pwszKLID));
4357
4358 return(FALSE);
4359}
4360
4361
4362/*****************************************************************************
4363 * Name : BOOL WIN32API GetKeyboardLayoutNameW
4364 * Purpose : The GetKeyboardLayoutName function retrieves the name of the
4365 * active keyboard layout.
4366 * Parameters: LPTSTR pwszKLID address of buffer for layout name
4367 * Variables :
4368 * Result : If the function succeeds, the return value is TRUE.
4369 * If the function fails, the return value is FALSE. To get extended
4370 * error information, call GetLastError.
4371 * Remark :
4372 * Status : UNTESTED STUB
4373 *
4374 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4375 *****************************************************************************/
4376
4377BOOL WIN32API GetKeyboardLayoutNameW(LPWSTR pwszKLID)
4378{
4379 dprintf(("USER32:GetKeyboardLayoutNameW (%08x) not implemented.",
4380 pwszKLID));
4381
4382 return(FALSE);
4383}
4384
4385
4386
4387
4388/*****************************************************************************
4389 * Name : HWINSTA WIN32API GetProcessWindowStation
4390 * Purpose : The GetProcessWindowStation function returns a handle of the
4391 * window station associated with the calling process.
4392 * Parameters:
4393 * Variables :
4394 * Result : If the function succeeds, the return value is a handle of the
4395 * window station associated with the calling process.
4396 * If the function fails, the return value is NULL. This can occur
4397 * if the calling process is not an application written for Windows
4398 * NT. To get extended error information, call GetLastError.
4399 * Remark :
4400 * Status : UNTESTED STUB
4401 *
4402 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4403 *****************************************************************************/
4404
4405HWINSTA WIN32API GetProcessWindowStation(VOID)
4406{
4407 dprintf(("USER32:GetProcessWindowStation () not implemented.\n"));
4408
4409 return (NULL);
4410}
4411
4412
4413
4414/*****************************************************************************
4415 * Name : HDESK WIN32API GetThreadDesktop
4416 * Purpose : The GetThreadDesktop function returns a handle to the desktop
4417 * associated with a specified thread.
4418 * Parameters: DWORD dwThreadId thread identifier
4419 * Variables :
4420 * Result : If the function succeeds, the return value is the handle of the
4421 * desktop associated with the specified thread.
4422 * Remark :
4423 * Status : UNTESTED STUB
4424 *
4425 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4426 *****************************************************************************/
4427
4428HDESK WIN32API GetThreadDesktop(DWORD dwThreadId)
4429{
4430 dprintf(("USER32:GetThreadDesktop (%u) not implemented.\n",
4431 dwThreadId));
4432
4433 return (NULL);
4434}
4435
4436
4437/*****************************************************************************
4438 * Name : BOOL WIN32API GetUserObjectInformationA
4439 * Purpose : The GetUserObjectInformation function returns information about
4440 * a window station or desktop object.
4441 * Parameters: HANDLE hObj handle of object to get information for
4442 * int nIndex type of information to get
4443 * PVOID pvInfo points to buffer that receives the information
4444 * DWORD nLength size, in bytes, of pvInfo buffer
4445 * LPDWORD lpnLengthNeeded receives required size, in bytes, of pvInfo buffer
4446 * Variables :
4447 * Result : If the function succeeds, the return value is TRUE.
4448 * If the function fails, the return value is FALSE. To get extended
4449 * error information, call GetLastError.
4450 * Remark :
4451 * Status : UNTESTED STUB
4452 *
4453 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4454 *****************************************************************************/
4455
4456BOOL WIN32API GetUserObjectInformationA(HANDLE hObj,
4457 int nIndex,
4458 PVOID pvInfo,
4459 DWORD nLength,
4460 LPDWORD lpnLengthNeeded)
4461{
4462 dprintf(("USER32:GetUserObjectInformationA (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
4463 hObj,
4464 nIndex,
4465 pvInfo,
4466 nLength,
4467 lpnLengthNeeded));
4468
4469 return (FALSE);
4470}
4471
4472
4473/*****************************************************************************
4474 * Name : BOOL WIN32API GetUserObjectInformationW
4475 * Purpose : The GetUserObjectInformation function returns information about
4476 * a window station or desktop object.
4477 * Parameters: HANDLE hObj handle of object to get information for
4478 * int nIndex type of information to get
4479 * PVOID pvInfo points to buffer that receives the information
4480 * DWORD nLength size, in bytes, of pvInfo buffer
4481 * LPDWORD lpnLengthNeeded receives required size, in bytes, of pvInfo buffer
4482 * Variables :
4483 * Result : If the function succeeds, the return value is TRUE.
4484 * If the function fails, the return value is FALSE. To get extended
4485 * error information, call GetLastError.
4486 * Remark :
4487 * Status : UNTESTED STUB
4488 *
4489 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4490 *****************************************************************************/
4491
4492BOOL WIN32API GetUserObjectInformationW(HANDLE hObj,
4493 int nIndex,
4494 PVOID pvInfo,
4495 DWORD nLength,
4496 LPDWORD lpnLengthNeeded)
4497{
4498 dprintf(("USER32:GetUserObjectInformationW (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
4499 hObj,
4500 nIndex,
4501 pvInfo,
4502 nLength,
4503 lpnLengthNeeded));
4504
4505 return (FALSE);
4506}
4507
4508
4509/*****************************************************************************
4510 * Name : BOOL WIN32API GetUserObjectSecurity
4511 * Purpose : The GetUserObjectSecurity function retrieves security information
4512 * for the specified user object.
4513 * Parameters: HANDLE hObj handle of user object
4514 * SECURITY_INFORMATION * pSIRequested address of requested security information
4515 * LPSECURITY_DESCRIPTOR pSID address of security descriptor
4516 * DWORD nLength size of buffer for security descriptor
4517 * LPDWORD lpnLengthNeeded address of required size of buffer
4518 * Variables :
4519 * Result : If the function succeeds, the return value is TRUE.
4520 * If the function fails, the return value is FALSE. To get extended
4521 * error information, call GetLastError.
4522 * Remark :
4523 * Status : UNTESTED STUB
4524 *
4525 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4526 *****************************************************************************/
4527
4528BOOL WIN32API GetUserObjectSecurity(HANDLE hObj,
4529 SECURITY_INFORMATION * pSIRequested,
4530 LPSECURITY_DESCRIPTOR pSID,
4531 DWORD nLength,
4532 LPDWORD lpnLengthNeeded)
4533{
4534 dprintf(("USER32:GetUserObjectSecurity (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
4535 hObj,
4536 pSIRequested,
4537 pSID,
4538 nLength,
4539 lpnLengthNeeded));
4540
4541 return (FALSE);
4542}
4543
4544
4545
4546/*****************************************************************************
4547 * Name : int WIN32API GetWindowRgn
4548 * Purpose : The GetWindowRgn function obtains a copy of the window region of a window.
4549 * Parameters: HWND hWnd handle to window whose window region is to be obtained
4550 * HRGN hRgn handle to region that receives a copy of the window region
4551 * Variables :
4552 * Result : NULLREGION, SIMPLEREGION, COMPLEXREGION, ERROR
4553 * Remark :
4554 * Status : UNTESTED STUB
4555 *
4556 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4557 *****************************************************************************/
4558
4559int WIN32API GetWindowRgn (HWND hWnd,
4560 HRGN hRgn)
4561{
4562 dprintf(("USER32:GetWindowRgn (%08xh,%08x) not implemented.\n",
4563 hWnd,
4564 hRgn));
4565
4566 return (NULLREGION);
4567}
4568
4569
4570
4571/*****************************************************************************
4572 * Name : HCURSOR WIN32API LoadCursorFromFileA
4573 * Purpose : The LoadCursorFromFile function creates a cursor based on data
4574 * contained in a file. The file is specified by its name or by a
4575 * system cursor identifier. The function returns a handle to the
4576 * newly created cursor. Files containing cursor data may be in
4577 * either cursor (.CUR) or animated cursor (.ANI) format.
4578 * Parameters: LPCTSTR lpFileName pointer to cursor file, or system cursor id
4579 * Variables :
4580 * Result : If the function is successful, the return value is a handle to
4581 * the new cursor.
4582 * If the function fails, the return value is NULL. To get extended
4583 * error information, call GetLastError. GetLastError may return
4584 * the following
4585 * Remark :
4586 * Status : UNTESTED STUB
4587 *
4588 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4589 *****************************************************************************/
4590
4591HCURSOR WIN32API LoadCursorFromFileA(LPCTSTR lpFileName)
4592{
4593 dprintf(("USER32:LoadCursorFromFileA (%s) not implemented.\n",
4594 lpFileName));
4595
4596 return (NULL);
4597}
4598
4599
4600/*****************************************************************************
4601 * Name : HCURSOR WIN32API LoadCursorFromFileW
4602 * Purpose : The LoadCursorFromFile function creates a cursor based on data
4603 * contained in a file. The file is specified by its name or by a
4604 * system cursor identifier. The function returns a handle to the
4605 * newly created cursor. Files containing cursor data may be in
4606 * either cursor (.CUR) or animated cursor (.ANI) format.
4607 * Parameters: LPCTSTR lpFileName pointer to cursor file, or system cursor id
4608 * Variables :
4609 * Result : If the function is successful, the return value is a handle to
4610 * the new cursor.
4611 * If the function fails, the return value is NULL. To get extended
4612 * error information, call GetLastError. GetLastError may return
4613 * the following
4614 * Remark :
4615 * Status : UNTESTED STUB
4616 *
4617 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4618 *****************************************************************************/
4619
4620HCURSOR WIN32API LoadCursorFromFileW(LPCWSTR lpFileName)
4621{
4622 dprintf(("USER32:LoadCursorFromFileW (%s) not implemented.\n",
4623 lpFileName));
4624
4625 return (NULL);
4626}
4627
4628
4629/*****************************************************************************
4630 * Name : HLK WIN32API LoadKeyboardLayoutA
4631 * Purpose : The LoadKeyboardLayout function loads a new keyboard layout into
4632 * the system. Several keyboard layouts can be loaded at a time, but
4633 * only one per process is active at a time. Loading multiple keyboard
4634 * layouts makes it possible to rapidly switch between layouts.
4635 * Parameters:
4636 * Variables :
4637 * Result : If the function succeeds, the return value is the handle of the
4638 * keyboard layout.
4639 * If the function fails, the return value is NULL. To get extended
4640 * error information, call GetLastError.
4641 * Remark :
4642 * Status : UNTESTED STUB
4643 *
4644 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4645 *****************************************************************************/
4646
4647HKL WIN32API LoadKeyboardLayoutA(LPCTSTR pwszKLID,
4648 UINT Flags)
4649{
4650 dprintf(("USER32:LeadKeyboardLayoutA (%s,%u) not implemented.\n",
4651 pwszKLID,
4652 Flags));
4653
4654 return (NULL);
4655}
4656
4657
4658/*****************************************************************************
4659 * Name : HLK WIN32API LoadKeyboardLayoutW
4660 * Purpose : The LoadKeyboardLayout function loads a new keyboard layout into
4661 * the system. Several keyboard layouts can be loaded at a time, but
4662 * only one per process is active at a time. Loading multiple keyboard
4663 * layouts makes it possible to rapidly switch between layouts.
4664 * Parameters:
4665 * Variables :
4666 * Result : If the function succeeds, the return value is the handle of the
4667 * keyboard layout.
4668 * If the function fails, the return value is NULL. To get extended
4669 * error information, call GetLastError.
4670 * Remark :
4671 * Status : UNTESTED STUB
4672 *
4673 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4674 *****************************************************************************/
4675
4676HKL WIN32API LoadKeyboardLayoutW(LPCWSTR pwszKLID,
4677 UINT Flags)
4678{
4679 dprintf(("USER32:LeadKeyboardLayoutW (%s,%u) not implemented.\n",
4680 pwszKLID,
4681 Flags));
4682
4683 return (NULL);
4684}
4685
4686
4687/*****************************************************************************
4688 * Name : UINT WIN32API MapVirtualKeyExA
4689 * Purpose : The MapVirtualKeyEx function translates (maps) a virtual-key
4690 * code into a scan code or character value, or translates a scan
4691 * code into a virtual-key code. The function translates the codes
4692 * using the input language and physical keyboard layout identified
4693 * by the given keyboard layout handle.
4694 * Parameters:
4695 * Variables :
4696 * Result : The return value is either a scan code, a virtual-key code, or
4697 * a character value, depending on the value of uCode and uMapType.
4698 * If there is no translation, the return value is zero.
4699 * Remark :
4700 * Status : UNTESTED STUB
4701 *
4702 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4703 *****************************************************************************/
4704
4705UINT WIN32API MapVirtualKeyExA(UINT uCode,
4706 UINT uMapType,
4707 HKL dwhkl)
4708{
4709 dprintf(("USER32:MapVirtualKeyExA (%u,%u,%08x) not implemented.\n",
4710 uCode,
4711 uMapType,
4712 dwhkl));
4713
4714 return (0);
4715}
4716
4717
4718/*****************************************************************************
4719 * Name : UINT WIN32API MapVirtualKeyExW
4720 * Purpose : The MapVirtualKeyEx function translates (maps) a virtual-key
4721 * code into a scan code or character value, or translates a scan
4722 * code into a virtual-key code. The function translates the codes
4723 * using the input language and physical keyboard layout identified
4724 * by the given keyboard layout handle.
4725 * Parameters:
4726 * Variables :
4727 * Result : The return value is either a scan code, a virtual-key code, or
4728 * a character value, depending on the value of uCode and uMapType.
4729 * If there is no translation, the return value is zero.
4730 * Remark :
4731 * Status : UNTESTED STUB
4732
4733 *
4734 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4735 *****************************************************************************/
4736
4737UINT WIN32API MapVirtualKeyExW(UINT uCode,
4738 UINT uMapType,
4739 HKL dwhkl)
4740{
4741 dprintf(("USER32:MapVirtualKeyExW (%u,%u,%08x) not implemented.\n",
4742 uCode,
4743 uMapType,
4744 dwhkl));
4745
4746 return (0);
4747}
4748
4749
4750/*****************************************************************************
4751 * Name : int WIN32API MessageBoxExA
4752 * Purpose : The MessageBoxEx function creates, displays, and operates a message box.
4753 * Parameters: HWND hWnd handle of owner window
4754 * LPCTSTR lpText address of text in message box
4755 * LPCTSTR lpCaption address of title of message box
4756 * UINT uType style of message box
4757 * WORD wLanguageId language identifier
4758 * Variables :
4759 * Result : If the function succeeds, the return value is a nonzero menu-item
4760 * value returned by the dialog box.
4761 * Remark :
4762 * Status : UNTESTED STUB
4763 *
4764 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4765 *****************************************************************************/
4766
4767int WIN32API MessageBoxExA(HWND hWnd,
4768 LPCTSTR lpText,
4769 LPCTSTR lpCaption,
4770 UINT uType,
4771 WORD wLanguageId)
4772{
4773 dprintf(("USER32:MessageBoxExA (%08xh,%s,%s,%u,%08w) not implemented.\n",
4774 hWnd,
4775 lpText,
4776 lpCaption,
4777 uType,
4778 wLanguageId));
4779
4780 return (MessageBoxA(hWnd,
4781 lpText,
4782 lpCaption,
4783 uType));
4784}
4785
4786
4787/*****************************************************************************
4788 * Name : int WIN32API MessageBoxExW
4789 * Purpose : The MessageBoxEx function creates, displays, and operates a message box.
4790 * Parameters: HWND hWnd handle of owner window
4791 * LPCTSTR lpText address of text in message box
4792 * LPCTSTR lpCaption address of title of message box
4793 * UINT uType style of message box
4794 * WORD wLanguageId language identifier
4795 * Variables :
4796 * Result : If the function succeeds, the return value is a nonzero menu-item
4797 * value returned by the dialog box.
4798 * Remark :
4799 * Status : UNTESTED STUB
4800 *
4801 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4802 *****************************************************************************/
4803
4804int WIN32API MessageBoxExW(HWND hWnd,
4805 LPCWSTR lpText,
4806 LPCWSTR lpCaption,
4807 UINT uType,
4808 WORD wLanguageId)
4809{
4810
4811 dprintf(("USER32:MessageBoxExW (%08xh,%x,%x,%u,%08w) not implemented.\n",
4812 hWnd,
4813 lpText,
4814 lpCaption,
4815 uType,
4816 wLanguageId));
4817
4818 return MessageBoxW(hWnd, lpText, lpCaption, uType);
4819}
4820
4821
4822/*****************************************************************************
4823 * Name : BOOL WIN32API MessageBoxIndirectW
4824 * Purpose : The MessageBoxIndirect function creates, displays, and operates
4825 * a message box. The message box contains application-defined
4826 * message text and title, any icon, and any combination of
4827 * predefined push buttons.
4828 * Parameters:
4829 * Variables :
4830 * Result :
4831 * Remark :
4832 * Status : UNTESTED STUB
4833 *
4834 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4835 *****************************************************************************/
4836
4837BOOL WIN32API MessageBoxIndirectW(LPMSGBOXPARAMSW lpMsgBoxParams)
4838{
4839 dprintf(("USER32:MessageBoxIndirectW (%08x) not implemented.\n",
4840 lpMsgBoxParams));
4841
4842 return (FALSE);
4843}
4844
4845
4846/*****************************************************************************
4847 * Name : BOOL WIN32API MessageBoxIndirectA
4848 * Purpose : The MessageBoxIndirect function creates, displays, and operates
4849 * a message box. The message box contains application-defined
4850 * message text and title, any icon, and any combination of
4851 * predefined push buttons.
4852 * Parameters:
4853 * Variables :
4854 * Result :
4855 * Remark :
4856 * Status : UNTESTED STUB
4857 *
4858 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4859 *****************************************************************************/
4860
4861BOOL WIN32API MessageBoxIndirectA(LPMSGBOXPARAMSA lpMsgBoxParams)
4862{
4863 dprintf(("USER32:MessageBoxIndirectA (%08x) not implemented.\n",
4864 lpMsgBoxParams));
4865
4866 return (FALSE);
4867}
4868
4869
4870/*****************************************************************************
4871 * Name : DWORD WIN32API OemKeyScan
4872 * Purpose : The OemKeyScan function maps OEM ASCII codes 0 through 0x0FF
4873 * into the OEM scan codes and shift states. The function provides
4874 * information that allows a program to send OEM text to another
4875 * program by simulating keyboard input.
4876 * Parameters:
4877 * Variables :
4878 * Result :
4879 * Remark :
4880 * Status : UNTESTED STUB
4881 *
4882 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4883 *****************************************************************************/
4884
4885DWORD WIN32API OemKeyScan(WORD wOemChar)
4886{
4887 dprintf(("USER32:OemKeyScan (%u) not implemented.\n",
4888 wOemChar));
4889
4890 return (wOemChar);
4891}
4892
4893
4894/*****************************************************************************
4895 * Name : HDESK WIN32API OpenDesktopA
4896 * Purpose : The OpenDesktop function returns a handle to an existing desktop.
4897 * A desktop is a secure object contained within a window station
4898 * object. A desktop has a logical display surface and contains
4899 * windows, menus and hooks.
4900 * Parameters: LPCTSTR lpszDesktopName name of the desktop to open
4901 * DWORD dwFlags flags to control interaction with other applications
4902 * BOOL fInherit specifies whether returned handle is inheritable
4903 * DWORD dwDesiredAccess specifies access of returned handle
4904 * Variables :
4905 * Result : If the function succeeds, the return value is the handle to the
4906 * opened desktop.
4907 * If the function fails, the return value is NULL. To get extended
4908 * error information, call GetLastError.
4909 * Remark :
4910 * Status : UNTESTED STUB
4911 *
4912 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4913 *****************************************************************************/
4914
4915HDESK WIN32API OpenDesktopA(LPCTSTR lpszDesktopName,
4916 DWORD dwFlags,
4917 BOOL fInherit,
4918 DWORD dwDesiredAccess)
4919{
4920 dprintf(("USER32:OpenDesktopA (%s,%08xh,%08xh,%08x) not implemented.\n",
4921 lpszDesktopName,
4922 dwFlags,
4923 fInherit,
4924 dwDesiredAccess));
4925
4926 return (NULL);
4927}
4928
4929
4930/*****************************************************************************
4931 * Name : HDESK WIN32API OpenDesktopW
4932 * Purpose : The OpenDesktop function returns a handle to an existing desktop.
4933 * A desktop is a secure object contained within a window station
4934 * object. A desktop has a logical display surface and contains
4935 * windows, menus and hooks.
4936 * Parameters: LPCTSTR lpszDesktopName name of the desktop to open
4937 * DWORD dwFlags flags to control interaction with other applications
4938 * BOOL fInherit specifies whether returned handle is inheritable
4939 * DWORD dwDesiredAccess specifies access of returned handle
4940 * Variables :
4941 * Result : If the function succeeds, the return value is the handle to the
4942 * opened desktop.
4943 * If the function fails, the return value is NULL. To get extended
4944 * error information, call GetLastError.
4945 * Remark :
4946 * Status : UNTESTED STUB
4947 *
4948 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4949 *****************************************************************************/
4950
4951HDESK WIN32API OpenDesktopW(LPCTSTR lpszDesktopName,
4952 DWORD dwFlags,
4953 BOOL fInherit,
4954 DWORD dwDesiredAccess)
4955{
4956 dprintf(("USER32:OpenDesktopW (%s,%08xh,%08xh,%08x) not implemented.\n",
4957 lpszDesktopName,
4958 dwFlags,
4959 fInherit,
4960 dwDesiredAccess));
4961
4962 return (NULL);
4963}
4964
4965
4966/*****************************************************************************
4967 * Name : HDESK WIN32API OpenInputDesktop
4968 * Purpose : The OpenInputDesktop function returns a handle to the desktop
4969 * that receives user input. The input desktop is a desktop on the
4970 * window station associated with the logged-on user.
4971 * Parameters: DWORD dwFlags flags to control interaction with other applications
4972 * BOOL fInherit specifies whether returned handle is inheritable
4973 * DWORD dwDesiredAccess specifies access of returned handle
4974 * Variables :
4975 * Result : If the function succeeds, the return value is a handle of the
4976 * desktop that receives user input.
4977 * If the function fails, the return value is NULL. To get extended
4978 * error information, call GetLastError.
4979 * Remark :
4980 * Status : UNTESTED STUB
4981 *
4982 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4983 *****************************************************************************/
4984
4985HDESK WIN32API OpenInputDesktop(DWORD dwFlags,
4986 BOOL fInherit,
4987 DWORD dwDesiredAccess)
4988{
4989 dprintf(("USER32:OpenInputDesktop (%08xh,%08xh,%08x) not implemented.\n",
4990 dwFlags,
4991 fInherit,
4992 dwDesiredAccess));
4993
4994 return (NULL);
4995}
4996
4997
4998/*****************************************************************************
4999 * Name : HWINSTA WIN32API OpenWindowStationA
5000 * Purpose : The OpenWindowStation function returns a handle to an existing
5001 * window station.
5002 * Parameters: LPCTSTR lpszWinStaName name of the window station to open
5003 * BOOL fInherit specifies whether returned handle is inheritable
5004 * DWORD dwDesiredAccess specifies access of returned handle
5005 * Variables :
5006 * Result : If the function succeeds, the return value is the handle to the
5007 * specified window station.
5008 * If the function fails, the return value is NULL. To get extended
5009 * error information, call GetLastError.
5010 * Remark :
5011 * Status : UNTESTED STUB
5012 *
5013 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5014 *****************************************************************************/
5015
5016HWINSTA WIN32API OpenWindowStationA(LPCTSTR lpszWinStaName,
5017 BOOL fInherit,
5018 DWORD dwDesiredAccess)
5019{
5020 dprintf(("USER32:OpenWindowStatieonA (%s,%08xh,%08x) not implemented.\n",
5021 lpszWinStaName,
5022 fInherit,
5023 dwDesiredAccess));
5024
5025 return (NULL);
5026}
5027
5028
5029/*****************************************************************************
5030 * Name : HWINSTA WIN32API OpenWindowStationW
5031 * Purpose : The OpenWindowStation function returns a handle to an existing
5032 * window station.
5033 * Parameters: LPCTSTR lpszWinStaName name of the window station to open
5034 * BOOL fInherit specifies whether returned handle is inheritable
5035 * DWORD dwDesiredAccess specifies access of returned handle
5036 * Variables :
5037 * Result : If the function succeeds, the return value is the handle to the
5038 * specified window station.
5039 * If the function fails, the return value is NULL. To get extended
5040 * error information, call GetLastError.
5041
5042
5043 * Remark :
5044 * Status : UNTESTED STUB
5045 *
5046 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5047 *****************************************************************************/
5048
5049HWINSTA WIN32API OpenWindowStationW(LPCTSTR lpszWinStaName,
5050 BOOL fInherit,
5051 DWORD dwDesiredAccess)
5052{
5053 dprintf(("USER32:OpenWindowStatieonW (%s,%08xh,%08x) not implemented.\n",
5054 lpszWinStaName,
5055 fInherit,
5056 dwDesiredAccess));
5057
5058 return (NULL);
5059}
5060
5061
5062/*****************************************************************************
5063 * Name : BOOL WIN32API PaintDesktop
5064 * Purpose : The PaintDesktop function fills the clipping region in the
5065 * specified device context with the desktop pattern or wallpaper.
5066 * The function is provided primarily for shell desktops.
5067 * Parameters:
5068 * Variables :
5069 * Result : If the function succeeds, the return value is TRUE.
5070 * If the function fails, the return value is FALSE.
5071 * Remark :
5072 * Status : UNTESTED STUB
5073 *
5074 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5075 *****************************************************************************/
5076
5077BOOL WIN32API PaintDesktop(HDC hdc)
5078{
5079 dprintf(("USER32:PaintDesktop (%08x) not implemented.\n",
5080 hdc));
5081
5082 return (FALSE);
5083}
5084
5085
5086/*****************************************************************************
5087 * Name : BOOL WIN32API SendMessageCallbackA
5088 * Purpose : The SendMessageCallback function sends the specified message to
5089 * a window or windows. The function calls the window procedure for
5090 * the specified window and returns immediately. After the window
5091 * procedure processes the message, the system calls the specified
5092 * callback function, passing the result of the message processing
5093 * and an application-defined value to the callback function.
5094 * Parameters: HWND hwnd handle of destination window
5095 * UINT uMsg message to send
5096 * WPARAM wParam first message parameter
5097 * LPARAM lParam second message parameter
5098 * SENDASYNCPROC lpResultCallBack function to receive message value
5099 * DWORD dwData value to pass to callback function
5100 * Variables :
5101 * Result : If the function succeeds, the return value is TRUE.
5102 * If the function fails, the return value is FALSE. To get extended
5103 * error information, call GetLastError.
5104 * Remark :
5105 * Status : UNTESTED STUB
5106 *
5107 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5108 *****************************************************************************/
5109
5110BOOL WIN32API SendMessageCallbackA(HWND hWnd,
5111 UINT uMsg,
5112 WPARAM wParam,
5113 LPARAM lParam,
5114 SENDASYNCPROC lpResultCallBack,
5115 DWORD dwData)
5116{
5117 dprintf(("USER32:SendMessageCallBackA (%08xh,%08xh,%08xh,%08xh,%08xh,%08x) not implemented.\n",
5118 hWnd,
5119 uMsg,
5120 wParam,
5121 lParam,
5122 lpResultCallBack,
5123 dwData));
5124
5125 return (FALSE);
5126}
5127
5128
5129/*****************************************************************************
5130 * Name : BOOL WIN32API SendMessageCallbackW
5131 * Purpose : The SendMessageCallback function sends the specified message to
5132 * a window or windows. The function calls the window procedure for
5133 * the specified window and returns immediately. After the window
5134 * procedure processes the message, the system calls the specified
5135 * callback function, passing the result of the message processing
5136 * and an application-defined value to the callback function.
5137 * Parameters: HWND hwnd handle of destination window
5138 * UINT uMsg message to send
5139 * WPARAM wParam first message parameter
5140 * LPARAM lParam second message parameter
5141 * SENDASYNCPROC lpResultCallBack function to receive message value
5142 * DWORD dwData value to pass to callback function
5143 * Variables :
5144 * Result : If the function succeeds, the return value is TRUE.
5145 * If the function fails, the return value is FALSE. To get extended
5146 * error information, call GetLastError.
5147 * Remark :
5148 * Status : UNTESTED STUB
5149 *
5150 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5151 *****************************************************************************/
5152
5153BOOL WIN32API SendMessageCallbackW(HWND hWnd,
5154 UINT uMsg,
5155 WPARAM wParam,
5156 LPARAM lParam,
5157 SENDASYNCPROC lpResultCallBack,
5158 DWORD dwData)
5159{
5160 dprintf(("USER32:SendMessageCallBackW (%08xh,%08xh,%08xh,%08xh,%08xh,%08x) not implemented.\n",
5161 hWnd,
5162 uMsg,
5163 wParam,
5164 lParam,
5165 lpResultCallBack,
5166 dwData));
5167
5168 return (FALSE);
5169}
5170
5171
5172/*****************************************************************************
5173 * Name : VOID WIN32API SetDebugErrorLevel
5174 * Purpose : The SetDebugErrorLevel function sets the minimum error level at
5175 * which Windows will generate debugging events and pass them to a debugger.
5176 * Parameters: DWORD dwLevel debugging error level
5177 * Variables :
5178 * Result :
5179 * Remark :
5180 * Status : UNTESTED STUB
5181 *
5182 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5183 *****************************************************************************/
5184
5185VOID WIN32API SetDebugErrorLevel(DWORD dwLevel)
5186{
5187 dprintf(("USER32:SetDebugErrorLevel (%08x) not implemented.\n",
5188 dwLevel));
5189}
5190
5191
5192/*****************************************************************************
5193 * Name : BOOL WIN32API SetProcessWindowStation
5194 * Purpose : The SetProcessWindowStation function assigns a window station
5195 * to the calling process. This enables the process to access
5196 * objects in the window station such as desktops, the clipboard,
5197 * and global atoms. All subsequent operations on the window station
5198 * use the access rights granted to hWinSta.
5199 * Parameters:
5200 * Variables :
5201 * Result : If the function succeeds, the return value is TRUE.
5202 * If the function fails, the return value is FALSE. To get extended
5203 * error information, call GetLastError.
5204 * Remark :
5205 * Status : UNTESTED STUB
5206 *
5207 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5208 *****************************************************************************/
5209
5210BOOL WIN32API SetProcessWindowStation(HWINSTA hWinSta)
5211{
5212 dprintf(("USER32:SetProcessWindowStation (%08x) not implemented.\n",
5213 hWinSta));
5214
5215 return (FALSE);
5216}
5217
5218
5219/*****************************************************************************
5220 * Name : BOOL WIN32API SetSystemCursor
5221 * Purpose : The SetSystemCursor function replaces the contents of the system
5222 * cursor specified by dwCursorId with the contents of the cursor
5223 * specified by hCursor, and then destroys hCursor. This function
5224 * lets an application customize the system cursors.
5225 * Parameters: HCURSOR hCursor set specified system cursor to this cursor's
5226 * contents, then destroy this
5227 * DWORD dwCursorID system cursor specified by its identifier
5228 * Variables :
5229 * Result : If the function succeeds, the return value is TRUE.
5230 * If the function fails, the return value is FALSE. To get extended
5231 * error information, call GetLastError.
5232 * Remark :
5233 * Status : UNTESTED STUB
5234 *
5235 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5236 *****************************************************************************/
5237
5238BOOL WIN32API SetSystemCursor(HCURSOR hCursor,
5239 DWORD dwCursorId)
5240{
5241 dprintf(("USER32:SetSystemCursor (%08xh,%08x) not implemented.\n",
5242 hCursor,
5243 dwCursorId));
5244
5245 return (FALSE);
5246}
5247
5248
5249/*****************************************************************************
5250 * Name : BOOL WIN32API SetThreadDesktop
5251 * Purpose : The SetThreadDesktop function assigns a desktop to the calling
5252 * thread. All subsequent operations on the desktop use the access
5253 * rights granted to hDesk.
5254 * Parameters: HDESK hDesk handle of the desktop to assign to this thread
5255 * Variables :
5256 * Result : If the function succeeds, the return value is TRUE.
5257 * If the function fails, the return value is FALSE. To get extended
5258 * error information, call GetLastError.
5259 * Remark :
5260 * Status : UNTESTED STUB
5261 *
5262 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5263 *****************************************************************************/
5264
5265BOOL WIN32API SetThreadDesktop(HDESK hDesktop)
5266{
5267 dprintf(("USER32:SetThreadDesktop (%08x) not implemented.\n",
5268 hDesktop));
5269
5270 return (FALSE);
5271}
5272
5273
5274/*****************************************************************************
5275 * Name : BOOL WIN32API SetUserObjectInformationA
5276 * Purpose : The SetUserObjectInformation function sets information about a
5277 * window station or desktop object.
5278 * Parameters: HANDLE hObject handle of the object for which to set information
5279 * int nIndex type of information to set
5280 * PVOID lpvInfo points to a buffer that contains the information
5281 * DWORD cbInfo size, in bytes, of lpvInfo buffer
5282 * Variables :
5283 * Result : If the function succeeds, the return value is TRUE.
5284 * If the function fails the return value is FALSE. To get extended
5285 * error information, call GetLastError.
5286 * Remark :
5287 * Status : UNTESTED STUB
5288 *
5289 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5290 *****************************************************************************/
5291
5292BOOL WIN32API SetUserObjectInformationA(HANDLE hObject,
5293 int nIndex,
5294 PVOID lpvInfo,
5295 DWORD cbInfo)
5296{
5297 dprintf(("USER32:SetUserObjectInformationA (%08xh,%u,%08xh,%08x) not implemented.\n",
5298 hObject,
5299 nIndex,
5300 lpvInfo,
5301 cbInfo));
5302
5303 return (FALSE);
5304}
5305
5306
5307/*****************************************************************************
5308 * Name : BOOL WIN32API SetUserObjectInformationW
5309 * Purpose : The SetUserObjectInformation function sets information about a
5310 * window station or desktop object.
5311 * Parameters: HANDLE hObject handle of the object for which to set information
5312 * int nIndex type of information to set
5313 * PVOID lpvInfo points to a buffer that contains the information
5314 * DWORD cbInfo size, in bytes, of lpvInfo buffer
5315 * Variables :
5316 * Result : If the function succeeds, the return value is TRUE.
5317 * If the function fails the return value is FALSE. To get extended
5318 * error information, call GetLastError.
5319 * Remark :
5320 * Status : UNTESTED STUB
5321 *
5322 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5323 *****************************************************************************/
5324
5325BOOL WIN32API SetUserObjectInformationW(HANDLE hObject,
5326 int nIndex,
5327 PVOID lpvInfo,
5328 DWORD cbInfo)
5329{
5330 dprintf(("USER32:SetUserObjectInformationW (%08xh,%u,%08xh,%08x) not implemented.\n",
5331 hObject,
5332 nIndex,
5333 lpvInfo,
5334 cbInfo));
5335
5336 return (FALSE);
5337}
5338
5339
5340/*****************************************************************************
5341 * Name : BOOL WIN32API SetUserObjectSecurity
5342 * Purpose : The SetUserObjectSecurity function sets the security of a user
5343 * object. This can be, for example, a window or a DDE conversation
5344 * Parameters: HANDLE hObject handle of user object
5345 * SECURITY_INFORMATION * psi address of security information
5346 * LPSECURITY_DESCRIPTOR psd address of security descriptor
5347 * Variables :
5348 * Result : If the function succeeds, the return value is TRUE.
5349 * If the function fails, the return value is FALSE. To get extended
5350 * error information, call GetLastError.
5351 * Remark :
5352 * Status : UNTESTED STUB
5353 *
5354 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5355 *****************************************************************************/
5356
5357BOOL WIN32API SetUserObjectSecurity(HANDLE hObject,
5358 SECURITY_INFORMATION * psi,
5359 LPSECURITY_DESCRIPTOR psd)
5360{
5361 dprintf(("USER32:SetUserObjectSecuroty (%08xh,%08xh,%08x) not implemented.\n",
5362 hObject,
5363 psi,
5364 psd));
5365
5366 return (FALSE);
5367}
5368
5369
5370/*****************************************************************************
5371 * Name : int WIN32API SetWindowRgn
5372 * Purpose : The SetWindowRgn function sets the window region of a window. The
5373 * window region determines the area within the window where the
5374 * operating system permits drawing. The operating system does not
5375 * display any portion of a window that lies outside of the window region
5376 * Parameters: HWND hWnd handle to window whose window region is to be set
5377 * HRGN hRgn handle to region
5378 * BOOL bRedraw window redraw flag
5379 * Variables :
5380 * Result : If the function succeeds, the return value is non-zero.
5381 * If the function fails, the return value is zero.
5382 * Remark :
5383 * Status : UNTESTED STUB
5384 *
5385 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5386 *****************************************************************************/
5387
5388int WIN32API SetWindowRgn(HWND hWnd,
5389 HRGN hRgn,
5390 BOOL bRedraw)
5391{
5392 dprintf(("USER32:SetWindowRgn (%08xh,%08xh,%u) not implemented.\n",
5393 hWnd,
5394 hRgn,
5395 bRedraw));
5396
5397 return (0);
5398}
5399
5400
5401/*****************************************************************************
5402 * Name : BOOL WIN32API SetWindowsHookW
5403 * Purpose : The SetWindowsHook function is not implemented in the Win32 API.
5404 * Win32-based applications should use the SetWindowsHookEx function.
5405 * Parameters:
5406 * Variables :
5407 * Result :
5408 * Remark : ARGH ! MICROSOFT !
5409 * Status : UNTESTED STUB
5410 *
5411 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5412 *****************************************************************************/
5413
5414HHOOK WIN32API SetWindowsHookW(int nFilterType, HOOKPROC pfnFilterProc)
5415
5416{
5417 return (FALSE);
5418}
5419
5420
5421/*****************************************************************************
5422 * Name : BOOL WIN32API ShowWindowAsync
5423 * Purpose : The ShowWindowAsync function sets the show state of a window
5424 * created by a different thread.
5425 * Parameters: HWND hwnd handle of window
5426 * int nCmdShow show state of window
5427 * Variables :
5428 * Result : If the window was previously visible, the return value is TRUE.
5429 * If the window was previously hidden, the return value is FALSE.
5430 * Remark :
5431 * Status : UNTESTED STUB
5432 *
5433 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5434 *****************************************************************************/
5435
5436BOOL WIN32API ShowWindowAsync (HWND hWnd,
5437 int nCmdShow)
5438{
5439 dprintf(("USER32:ShowWindowAsync (%08xh,%08x) not implemented.\n",
5440 hWnd,
5441 nCmdShow));
5442
5443 return (FALSE);
5444}
5445
5446
5447/*****************************************************************************
5448 * Name : BOOL WIN32API SwitchDesktop
5449 * Purpose : The SwitchDesktop function makes a desktop visible and activates
5450 * it. This enables the desktop to receive input from the user. The
5451 * calling process must have DESKTOP_SWITCHDESKTOP access to the
5452 * desktop for the SwitchDesktop function to succeed.
5453 * Parameters:
5454 * Variables :
5455 * Result : If the function succeeds, the return value is TRUE.
5456 * If the function fails, the return value is FALSE. To get extended
5457 * error information, call GetLastError.
5458 * Remark :
5459 * Status : UNTESTED STUB
5460 *
5461 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5462 *****************************************************************************/
5463
5464BOOL WIN32API SwitchDesktop(HDESK hDesktop)
5465{
5466 dprintf(("USER32:SwitchDesktop (%08x) not implemented.\n",
5467 hDesktop));
5468
5469 return (FALSE);
5470}
5471
5472
5473/*****************************************************************************
5474 * Name : WORD WIN32API TileWindows
5475 * Purpose : The TileWindows function tiles the specified windows, or the child
5476 * windows of the specified parent window.
5477 * Parameters: HWND hwndParent handle of parent window
5478 * WORD wFlags types of windows not to arrange
5479 * LPCRECT lpRect rectangle to arrange windows in
5480 * WORD cChildrenb number of windows to arrange
5481 * const HWND *ahwndChildren array of window handles
5482 * Variables :
5483 * Result : If the function succeeds, the return value is the number of
5484 * windows arranged.
5485 * If the function fails, the return value is zero.
5486 * Remark :
5487 * Status : UNTESTED STUB
5488 *
5489 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5490 *****************************************************************************/
5491
5492WORD WIN32API TileWindows(HWND hwndParent,
5493 UINT wFlags,
5494 const LPRECT lpRect,
5495 UINT cChildrenb,
5496 const HWND *ahwndChildren)
5497{
5498 dprintf(("USER32:TileWindows (%08xh,%08xh,%08xh,%08xh,%08x) not implemented.\n",
5499 hwndParent,
5500 wFlags,
5501 lpRect,
5502 cChildrenb,
5503 ahwndChildren));
5504
5505 return (0);
5506}
5507
5508
5509/*****************************************************************************
5510 * Name : int WIN32API ToAscii
5511 * Purpose : The ToAscii function translates the specified virtual-key code
5512 * and keyboard state to the corresponding Windows character or characters.
5513 * Parameters: UINT uVirtKey virtual-key code
5514 * UINT uScanCode scan code
5515 * PBYTE lpbKeyState address of key-state array
5516 * LPWORD lpwTransKey buffer for translated key
5517 * UINT fuState active-menu flag
5518 * Variables :
5519 * Result : 0 The specified virtual key has no translation for the current
5520 * state of the keyboard.
5521 * 1 One Windows character was copied to the buffer.
5522 * 2 Two characters were copied to the buffer. This usually happens
5523 * when a dead-key character (accent or diacritic) stored in the
5524 * keyboard layout cannot be composed with the specified virtual
5525 * key to form a single character.
5526 * Remark :
5527 * Status : UNTESTED STUB
5528 *
5529 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5530 *****************************************************************************/
5531
5532int WIN32API ToAscii(UINT uVirtKey,
5533 UINT uScanCode,
5534 PBYTE lpbKeyState,
5535 LPWORD lpwTransKey,
5536 UINT fuState)
5537{
5538 dprintf(("USER32:ToAscii (%u,%u,%08xh,%08xh,%u) not implemented.\n",
5539 uVirtKey,
5540 uScanCode,
5541 lpbKeyState,
5542 lpwTransKey,
5543 fuState));
5544
5545 return (0);
5546}
5547
5548
5549/*****************************************************************************
5550 * Name : int WIN32API ToAsciiEx
5551 * Purpose : The ToAscii function translates the specified virtual-key code
5552 * and keyboard state to the corresponding Windows character or characters.
5553 * Parameters: UINT uVirtKey virtual-key code
5554 * UINT uScanCode scan code
5555 * PBYTE lpbKeyState address of key-state array
5556 * LPWORD lpwTransKey buffer for translated key
5557 * UINT fuState active-menu flag
5558 * HLK hlk keyboard layout handle
5559 * Variables :
5560 * Result : 0 The specified virtual key has no translation for the current
5561 * state of the keyboard.
5562 * 1 One Windows character was copied to the buffer.
5563 * 2 Two characters were copied to the buffer. This usually happens
5564 * when a dead-key character (accent or diacritic) stored in the
5565 * keyboard layout cannot be composed with the specified virtual
5566 * key to form a single character.
5567 * Remark :
5568 * Status : UNTESTED STUB
5569 *
5570 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5571 *****************************************************************************/
5572
5573int WIN32API ToAsciiEx(UINT uVirtKey,
5574 UINT uScanCode,
5575 PBYTE lpbKeyState,
5576 LPWORD lpwTransKey,
5577 UINT fuState,
5578 HKL hkl)
5579{
5580 dprintf(("USER32:ToAsciiEx (%u,%u,%08xh,%08xh,%u,%08x) not implemented.\n",
5581 uVirtKey,
5582 uScanCode,
5583 lpbKeyState,
5584 lpwTransKey,
5585 fuState,
5586 hkl));
5587
5588 return (0);
5589}
5590
5591
5592/*****************************************************************************
5593 * Name : int WIN32API ToUnicode
5594 * Purpose : The ToUnicode function translates the specified virtual-key code
5595 * and keyboard state to the corresponding Unicode character or characters.
5596 * Parameters: UINT wVirtKey virtual-key code
5597 * UINT wScanCode scan code
5598 * PBYTE lpKeyState address of key-state array
5599 * LPWSTR pwszBuff buffer for translated key
5600 * int cchBuff size of translated key buffer
5601 * UINT wFlags set of function-conditioning flags
5602 * Variables :
5603 * Result : - 1 The specified virtual key is a dead-key character (accent or
5604 * diacritic). This value is returned regardless of the keyboard
5605 * layout, even if several characters have been typed and are
5606 * stored in the keyboard state. If possible, even with Unicode
5607 * keyboard layouts, the function has written a spacing version of
5608 * the dead-key character to the buffer specified by pwszBuffer.
5609 * For example, the function writes the character SPACING ACUTE
5610 * (0x00B4), rather than the character NON_SPACING ACUTE (0x0301).
5611 * 0 The specified virtual key has no translation for the current
5612 * state of the keyboard. Nothing was written to the buffer
5613 * specified by pwszBuffer.
5614 * 1 One character was written to the buffer specified by pwszBuffer.
5615 * 2 or more Two or more characters were written to the buffer specified by
5616 * pwszBuff. The most common cause for this is that a dead-key
5617 * character (accent or diacritic) stored in the keyboard layout
5618 * could not be combined with the specified virtual key to form a
5619 * single character.
5620 * Remark :
5621 * Status : UNTESTED STUB
5622 *
5623 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5624 *****************************************************************************/
5625
5626int WIN32API ToUnicode(UINT uVirtKey,
5627 UINT uScanCode,
5628 PBYTE lpKeyState,
5629 LPWSTR pwszBuff,
5630 int cchBuff,
5631 UINT wFlags)
5632{
5633 dprintf(("USER32:ToUnicode (%u,%u,%08xh,%08xh,%u,%08x) not implemented.\n",
5634 uVirtKey,
5635 uScanCode,
5636 lpKeyState,
5637 pwszBuff,
5638 cchBuff,
5639 wFlags));
5640
5641 return (0);
5642}
5643
5644
5645/*****************************************************************************
5646 * Name : BOOL WIN32API UnloadKeyboardLayout
5647 * Purpose : The UnloadKeyboardLayout function removes a keyboard layout.
5648 * Parameters: HKL hkl handle of keyboard layout
5649 * Variables :
5650 * Result : If the function succeeds, the return value is the handle of the
5651 * keyboard layout; otherwise, it is NULL. To get extended error
5652 * information, use the GetLastError function.
5653 * Remark :
5654 * Status : UNTESTED STUB
5655 *
5656 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5657 *****************************************************************************/
5658
5659BOOL WIN32API UnloadKeyboardLayout (HKL hkl)
5660{
5661 dprintf(("USER32:UnloadKeyboardLayout (%08x) not implemented.\n",
5662 hkl));
5663
5664 return (0);
5665}
5666
5667
5668/*****************************************************************************
5669 * Name : SHORT WIN32API VkKeyScanExW
5670 * Purpose : The VkKeyScanEx function translates a character to the
5671 * corresponding virtual-key code and shift state. The function
5672 * translates the character using the input language and physical
5673 * keyboard layout identified by the given keyboard layout handle.
5674 * Parameters: UINT uChar character to translate
5675 * HKL hkl keyboard layout handle
5676 * Variables :
5677 * Result : see docs
5678 * Remark :
5679 * Status : UNTESTED STUB
5680 *
5681 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5682 *****************************************************************************/
5683
5684WORD WIN32API VkKeyScanExW(WCHAR uChar,
5685 HKL hkl)
5686{
5687 dprintf(("USER32:VkKeyScanExW (%u,%08x) not implemented.\n",
5688 uChar,
5689 hkl));
5690
5691 return (uChar);
5692}
5693
5694
5695/*****************************************************************************
5696 * Name : SHORT WIN32API VkKeyScanExA
5697 * Purpose : The VkKeyScanEx function translates a character to the
5698 * corresponding virtual-key code and shift state. The function
5699 * translates the character using the input language and physical
5700 * keyboard layout identified by the given keyboard layout handle.
5701 * Parameters: UINT uChar character to translate
5702 * HKL hkl keyboard layout handle
5703 * Variables :
5704 * Result : see docs
5705 * Remark :
5706 * Status : UNTESTED STUB
5707 *
5708 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5709 *****************************************************************************/
5710
5711WORD WIN32API VkKeyScanExA(CHAR uChar,
5712 HKL hkl)
5713{
5714 dprintf(("USER32:VkKeyScanExA (%u,%08x) not implemented.\n",
5715 uChar,
5716 hkl));
5717
5718 return (uChar);
5719}
5720
5721
5722/*****************************************************************************
5723 * Name : VOID WIN32API keybd_event
5724 * Purpose : The keybd_event function synthesizes a keystroke. The system
5725 * can use such a synthesized keystroke to generate a WM_KEYUP or
5726 * WM_KEYDOWN message. The keyboard driver's interrupt handler calls
5727 * the keybd_event function.
5728 * Parameters: BYTE bVk virtual-key code
5729
5730 * BYTE bScan hardware scan code
5731 * DWORD dwFlags flags specifying various function options
5732 * DWORD dwExtraInfo additional data associated with keystroke
5733 * Variables :
5734 * Result :
5735 * Remark :
5736 * Status : UNTESTED STUB
5737 *
5738 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5739 *****************************************************************************/
5740
5741VOID WIN32API keybd_event (BYTE bVk,
5742 BYTE bScan,
5743 DWORD dwFlags,
5744 DWORD dwExtraInfo)
5745{
5746 dprintf(("USER32:keybd_event (%u,%u,%08xh,%08x) not implemented.\n",
5747 bVk,
5748 bScan,
5749 dwFlags,
5750 dwExtraInfo));
5751}
5752
5753
5754/*****************************************************************************
5755 * Name : VOID WIN32API mouse_event
5756 * Purpose : The mouse_event function synthesizes mouse motion and button clicks.
5757 * Parameters: DWORD dwFlags flags specifying various motion/click variants
5758 * DWORD dx horizontal mouse position or position change
5759 * DWORD dy vertical mouse position or position change
5760 * DWORD cButtons unused, reserved for future use, set to zero
5761 * DWORD dwExtraInfo 32 bits of application-defined information
5762 * Variables :
5763 * Result :
5764 * Remark :
5765 * Status : UNTESTED STUB
5766 *
5767 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5768 *****************************************************************************/
5769
5770VOID WIN32API mouse_event(DWORD dwFlags,
5771 DWORD dx,
5772 DWORD dy,
5773 DWORD cButtons,
5774 DWORD dwExtraInfo)
5775{
5776 dprintf(("USER32:mouse_event (%08xh,%u,%u,%u,%08x) not implemented.\n",
5777 dwFlags,
5778 dx,
5779 dy,
5780 cButtons,
5781 dwExtraInfo));
5782}
5783
5784
5785/*****************************************************************************
5786 * Name : BOOL WIN32API SetShellWindow
5787 * Purpose : Unknown
5788 * Parameters: Unknown
5789 * Variables :
5790 * Result :
5791 * Remark :
5792 * Status : UNTESTED UNKNOWN STUB
5793 *
5794 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
5795 *****************************************************************************/
5796
5797BOOL WIN32API SetShellWindow(DWORD x1)
5798{
5799 dprintf(("USER32: SetShellWindow(%08x) not implemented.\n",
5800 x1));
5801
5802 return (FALSE); /* default */
5803}
5804
5805
5806/*****************************************************************************
5807 * Name : BOOL WIN32API PlaySoundEvent
5808 * Purpose : Unknown
5809 * Parameters: Unknown
5810 * Variables :
5811 * Result :
5812 * Remark :
5813 * Status : UNTESTED UNKNOWN STUB
5814 *
5815 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
5816 *****************************************************************************/
5817
5818BOOL WIN32API PlaySoundEvent(DWORD x1)
5819{
5820 dprintf(("USER32: PlaySoundEvent(%08x) not implemented.\n",
5821 x1));
5822
5823 return (FALSE); /* default */
5824}
5825
5826
5827/*****************************************************************************
5828 * Name : BOOL WIN32API TileChildWindows
5829 * Purpose : Unknown
5830 * Parameters: Unknown
5831 * Variables :
5832 * Result :
5833 * Remark :
5834 * Status : UNTESTED UNKNOWN STUB
5835 *
5836 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
5837 *****************************************************************************/
5838
5839BOOL WIN32API TileChildWindows(DWORD x1,
5840 DWORD x2)
5841{
5842 dprintf(("USER32: TileChildWindows(%08xh,%08xh) not implemented.\n",
5843 x1,
5844 x2));
5845
5846 return (FALSE); /* default */
5847}
5848
5849
5850/*****************************************************************************
5851 * Name : BOOL WIN32API SetSysColorsTemp
5852 * Purpose : Unknown
5853 * Parameters: Unknown
5854 * Variables :
5855 * Result :
5856 * Remark :
5857 * Status : UNTESTED UNKNOWN STUB
5858 *
5859 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
5860 *****************************************************************************/
5861
5862BOOL WIN32API SetSysColorsTemp(void)
5863{
5864 dprintf(("USER32: SetSysColorsTemp() not implemented.\n"));
5865
5866 return (FALSE); /* default */
5867}
5868
5869
5870/*****************************************************************************
5871 * Name : BOOL WIN32API RegisterNetworkCapabilities
5872 * Purpose : Unknown
5873 * Parameters: Unknown
5874 * Variables :
5875 * Result :
5876 * Remark :
5877 * Status : UNTESTED UNKNOWN STUB
5878 *
5879 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
5880 *****************************************************************************/
5881
5882BOOL WIN32API RegisterNetworkCapabilities(DWORD x1,
5883 DWORD x2)
5884{
5885 dprintf(("USER32: RegisterNetworkCapabilities(%08xh,%08xh) not implemented.\n",
5886 x1,
5887 x2));
5888
5889 return (FALSE); /* default */
5890}
5891
5892
5893/*****************************************************************************
5894 * Name : BOOL WIN32API EndTask
5895 * Purpose : Unknown
5896 * Parameters: Unknown
5897 * Variables :
5898 * Result :
5899 * Remark :
5900 * Status : UNTESTED UNKNOWN STUB
5901 *
5902 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
5903 *****************************************************************************/
5904
5905BOOL WIN32API EndTask(DWORD x1,
5906 DWORD x2,
5907 DWORD x3)
5908{
5909 dprintf(("USER32: EndTask(%08xh,%08xh,%08xh) not implemented.\n",
5910 x1,
5911 x2,
5912 x3));
5913
5914 return (FALSE); /* default */
5915}
5916
5917
5918/*****************************************************************************
5919 * Name : BOOL WIN32API SwitchToThisWindow
5920 * Purpose : Unknown
5921 * Parameters: Unknown
5922 * Variables :
5923 * Result :
5924 * Remark :
5925 * Status : UNTESTED UNKNOWN STUB
5926 *
5927 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
5928 *****************************************************************************/
5929
5930BOOL WIN32API SwitchToThisWindow(HWND hwnd,
5931 BOOL x2)
5932{
5933 dprintf(("USER32: SwitchToThisWindow(%08xh,%08xh) not implemented.\n",
5934 hwnd,
5935 x2));
5936
5937 return (FALSE); /* default */
5938}
5939
5940
5941/*****************************************************************************
5942 * Name : BOOL WIN32API GetNextQueueWindow
5943 * Purpose : Unknown
5944 * Parameters: Unknown
5945 * Variables :
5946 * Result :
5947 * Remark :
5948 * Status : UNTESTED UNKNOWN STUB
5949 *
5950 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
5951 *****************************************************************************/
5952
5953BOOL WIN32API GetNextQueueWindow(DWORD x1,
5954 DWORD x2)
5955{
5956 dprintf(("USER32: GetNextQueueWindow(%08xh,%08xh) not implemented.\n",
5957 x1,
5958 x2));
5959
5960 return (FALSE); /* default */
5961}
5962
5963
5964/*****************************************************************************
5965 * Name : BOOL WIN32API YieldTask
5966 * Purpose : Unknown
5967 * Parameters: Unknown
5968 * Variables :
5969 * Result :
5970 * Remark :
5971 * Status : UNTESTED UNKNOWN STUB
5972 *
5973 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
5974 *****************************************************************************/
5975
5976BOOL WIN32API YieldTask(void)
5977{
5978 dprintf(("USER32: YieldTask() not implemented.\n"));
5979
5980 return (FALSE); /* default */
5981}
5982
5983
5984/*****************************************************************************
5985 * Name : BOOL WIN32API WinOldAppHackoMatic
5986 * Purpose : Unknown
5987 * Parameters: Unknown
5988 * Variables :
5989 * Result :
5990 * Remark :
5991 * Status : UNTESTED UNKNOWN STUB
5992 *
5993 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
5994 *****************************************************************************/
5995
5996BOOL WIN32API WinOldAppHackoMatic(DWORD x1)
5997{
5998 dprintf(("USER32: WinOldAppHackoMatic(%08x) not implemented.\n",
5999 x1));
6000
6001 return (FALSE); /* default */
6002}
6003
6004
6005/*****************************************************************************
6006 * Name : BOOL WIN32API DragObject
6007 * Purpose : Unknown
6008 * Parameters: Unknown
6009 * Variables :
6010 * Result :
6011 * Remark :
6012 * Status : UNTESTED UNKNOWN STUB
6013 *
6014 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6015 *****************************************************************************/
6016
6017DWORD WIN32API DragObject(HWND x1,HWND x2,UINT x3,DWORD x4,HCURSOR x5)
6018{
6019 dprintf(("USER32: DragObject(%08x,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
6020 x1,
6021 x2,
6022 x3,
6023 x4,
6024 x5));
6025
6026 return (FALSE); /* default */
6027}
6028
6029
6030/*****************************************************************************
6031 * Name : BOOL WIN32API CascadeChildWindows
6032 * Purpose : Unknown
6033 * Parameters: Unknown
6034 * Variables :
6035 * Result :
6036 * Remark :
6037 * Status : UNTESTED UNKNOWN STUB
6038 *
6039 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6040 *****************************************************************************/
6041
6042BOOL WIN32API CascadeChildWindows(DWORD x1,
6043 DWORD x2)
6044{
6045 dprintf(("USER32: CascadeChildWindows(%08xh,%08xh) not implemented.\n",
6046 x1,
6047 x2));
6048
6049 return (FALSE); /* default */
6050}
6051
6052
6053/*****************************************************************************
6054 * Name : BOOL WIN32API RegisterSystemThread
6055 * Purpose : Unknown
6056 * Parameters: Unknown
6057 * Variables :
6058 * Result :
6059 * Remark :
6060 * Status : UNTESTED UNKNOWN STUB
6061 *
6062 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6063 *****************************************************************************/
6064
6065BOOL WIN32API RegisterSystemThread(DWORD x1,
6066 DWORD x2)
6067{
6068 dprintf(("USER32: RegisterSystemThread(%08xh,%08xh) not implemented.\n",
6069 x1,
6070 x2));
6071
6072 return (FALSE); /* default */
6073}
6074
6075
6076/*****************************************************************************
6077 * Name : BOOL WIN32API IsHungThread
6078 * Purpose : Unknown
6079 * Parameters: Unknown
6080 * Variables :
6081 * Result :
6082 * Remark :
6083 * Status : UNTESTED UNKNOWN STUB
6084 *
6085 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6086 *****************************************************************************/
6087
6088BOOL WIN32API IsHungThread(DWORD x1)
6089{
6090 dprintf(("USER32: IsHungThread(%08xh) not implemented.\n",
6091 x1));
6092
6093 return (FALSE); /* default */
6094}
6095
6096
6097/*****************************************************************************
6098 * Name : BOOL WIN32API SysErrorBox
6099 * Purpose : Unknown
6100 * Parameters: Unknown
6101 * Variables :
6102 * Result :
6103 * Remark : HARDERR like ?
6104 * Status : UNTESTED UNKNOWN STUB
6105 *
6106 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6107 *****************************************************************************/
6108
6109BOOL WIN32API SysErrorBox(DWORD x1,
6110 DWORD x2,
6111 DWORD x3)
6112{
6113 dprintf(("USER32: SysErrorBox(%08xh,%08xh,%08xh) not implemented.\n",
6114 x1,
6115 x2,
6116 x3));
6117
6118 return (FALSE); /* default */
6119}
6120
6121
6122/*****************************************************************************
6123 * Name : BOOL WIN32API UserSignalProc
6124 * Purpose : Unknown
6125 * Parameters: Unknown
6126 * Variables :
6127 * Result :
6128 * Remark :
6129 * Status : UNTESTED UNKNOWN STUB
6130 *
6131 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6132 *****************************************************************************/
6133
6134BOOL WIN32API UserSignalProc(DWORD x1,
6135 DWORD x2,
6136 DWORD x3,
6137 DWORD x4)
6138{
6139 dprintf(("USER32: SysErrorBox(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
6140 x1,
6141 x2,
6142 x3,
6143 x4));
6144
6145 return (FALSE); /* default */
6146}
6147
6148
6149/*****************************************************************************
6150 * Name : BOOL WIN32API GetShellWindow
6151 * Purpose : Unknown
6152 * Parameters: Unknown
6153 * Variables :
6154 * Result :
6155 * Remark :
6156 * Status : UNTESTED UNKNOWN STUB
6157 *
6158 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6159 *****************************************************************************/
6160
6161HWND WIN32API GetShellWindow(void)
6162{
6163 dprintf(("USER32: GetShellWindow() not implemented.\n"));
6164
6165 return (0); /* default */
6166}
6167
6168
6169
6170/***********************************************************************
6171 * RegisterTasklist32 [USER32.436]
6172 */
6173DWORD WIN32API RegisterTasklist (DWORD x)
6174{
6175 dprintf(("USER32: RegisterTasklist(%08xh) not implemented.\n",
6176 x));
6177
6178 return TRUE;
6179}
6180
6181
6182/***********************************************************************
6183 * DrawCaptionTemp32A [USER32.599]
6184 *
6185 * PARAMS
6186 *
6187 * RETURNS
6188 * Success:
6189 * Failure:
6190 */
6191
6192BOOL WIN32API DrawCaptionTempA(HWND hwnd,
6193 HDC hdc,
6194 const RECT *rect,
6195 HFONT hFont,
6196 HICON hIcon,
6197 LPCSTR str,
6198 UINT uFlags)
6199{
6200 RECT rc = *rect;
6201
6202 dprintf(("USER32: DrawCaptionTempA(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh)\n",
6203 hwnd,
6204 hdc,
6205 rect,
6206 hFont,
6207 hIcon,
6208 str,
6209 uFlags));
6210
6211 /* drawing background */
6212 if (uFlags & DC_INBUTTON)
6213 {
6214 O32_FillRect (hdc,
6215 &rc,
6216 GetSysColorBrush (COLOR_3DFACE));
6217
6218 if (uFlags & DC_ACTIVE)
6219 {
6220 HBRUSH hbr = O32_SelectObject (hdc,
6221 GetSysColorBrush (COLOR_ACTIVECAPTION));
6222 O32_PatBlt (hdc,
6223 rc.left,
6224 rc.top,
6225 rc.right - rc.left,
6226 rc.bottom - rc.top,
6227 0xFA0089);
6228
6229 O32_SelectObject (hdc,
6230 hbr);
6231 }
6232 }
6233 else
6234 {
6235 O32_FillRect (hdc,
6236 &rc,
6237 GetSysColorBrush ((uFlags & DC_ACTIVE) ?
6238 COLOR_ACTIVECAPTION : COLOR_INACTIVECAPTION));
6239 }
6240
6241
6242 /* drawing icon */
6243 if ((uFlags & DC_ICON) && !(uFlags & DC_SMALLCAP))
6244 {
6245 POINT pt;
6246
6247 pt.x = rc.left + 2;
6248 pt.y = (rc.bottom + rc.top - O32_GetSystemMetrics(SM_CYSMICON)) / 2;
6249
6250 if (hIcon)
6251 {
6252 DrawIconEx (hdc,
6253 pt.x,
6254 pt.y,
6255 hIcon,
6256 O32_GetSystemMetrics(SM_CXSMICON),
6257 O32_GetSystemMetrics(SM_CYSMICON),
6258 0,
6259 0,
6260 DI_NORMAL);
6261 }
6262 else
6263 {
6264 /* @@@PH 1999/06/08 not ported yet, just don't draw any icon
6265 WND *wndPtr = WIN_FindWndPtr(hwnd);
6266 HICON hAppIcon = 0;
6267
6268 if (wndPtr->class->hIconSm)
6269 hAppIcon = wndPtr->class->hIconSm;
6270 else
6271 if (wndPtr->class->hIcon)
6272 hAppIcon = wndPtr->class->hIcon;
6273
6274 DrawIconEx (hdc,
6275 pt.x,
6276 pt.y,
6277 hAppIcon,
6278 GetSystemMetrics(SM_CXSMICON),
6279 GetSystemMetrics(SM_CYSMICON),
6280 0,
6281 0,
6282 DI_NORMAL);
6283
6284 WIN_ReleaseWndPtr(wndPtr);
6285 */
6286 }
6287
6288 rc.left += (rc.bottom - rc.top);
6289 }
6290
6291 /* drawing text */
6292 if (uFlags & DC_TEXT)
6293 {
6294 HFONT hOldFont;
6295
6296 if (uFlags & DC_INBUTTON)
6297 O32_SetTextColor (hdc,
6298 O32_GetSysColor (COLOR_BTNTEXT));
6299 else
6300 if (uFlags & DC_ACTIVE)
6301 O32_SetTextColor (hdc,
6302 O32_GetSysColor (COLOR_CAPTIONTEXT));
6303 else
6304 O32_SetTextColor (hdc,
6305 O32_GetSysColor (COLOR_INACTIVECAPTIONTEXT));
6306
6307 O32_SetBkMode (hdc,
6308 TRANSPARENT);
6309
6310 if (hFont)
6311 hOldFont = O32_SelectObject (hdc,
6312 hFont);
6313 else
6314 {
6315 NONCLIENTMETRICSA nclm;
6316 HFONT hNewFont;
6317
6318 nclm.cbSize = sizeof(NONCLIENTMETRICSA);
6319 O32_SystemParametersInfo (SPI_GETNONCLIENTMETRICS,
6320 0,
6321 &nclm,
6322 0);
6323 hNewFont = O32_CreateFontIndirect ((uFlags & DC_SMALLCAP) ?
6324 &nclm.lfSmCaptionFont : &nclm.lfCaptionFont);
6325 hOldFont = O32_SelectObject (hdc,
6326 hNewFont);
6327 }
6328
6329 if (str)
6330 O32_DrawText (hdc,
6331 str,
6332 -1,
6333 &rc,
6334 DT_SINGLELINE | DT_VCENTER | DT_NOPREFIX | DT_LEFT);
6335 else
6336 {
6337 CHAR szText[128];
6338 INT nLen;
6339
6340 nLen = O32_GetWindowText (hwnd,
6341 szText,
6342 128);
6343
6344 O32_DrawText (hdc,
6345 szText,
6346 nLen,
6347 &rc,
6348 DT_SINGLELINE | DT_VCENTER | DT_NOPREFIX | DT_LEFT);
6349 }
6350
6351 if (hFont)
6352 O32_SelectObject (hdc,
6353 hOldFont);
6354 else
6355 O32_DeleteObject (O32_SelectObject (hdc,
6356 hOldFont));
6357 }
6358
6359 /* drawing focus ??? */
6360 if (uFlags & 0x2000)
6361 {
6362 dprintf(("USER32: DrawCaptionTempA undocumented flag (0x2000)!\n"));
6363 }
6364
6365 return 0;
6366}
6367
6368
6369/***********************************************************************
6370 * DrawCaptionTemp32W [USER32.602]
6371 *
6372 * PARAMS
6373 *
6374 * RETURNS
6375 * Success:
6376 * Failure:
6377 */
6378
6379BOOL WIN32API DrawCaptionTempW (HWND hwnd,
6380 HDC hdc,
6381 const RECT *rect,
6382 HFONT hFont,
6383 HICON hIcon,
6384 LPCWSTR str,
6385 UINT uFlags)
6386{
6387 LPSTR strAscii = UnicodeToAsciiString((LPWSTR)str);
6388
6389 BOOL res = DrawCaptionTempA (hwnd,
6390 hdc,
6391 rect,
6392 hFont,
6393 hIcon,
6394 strAscii,
6395 uFlags);
6396
6397 FreeAsciiString(strAscii);
6398
6399 return res;
6400}
6401
Note: See TracBrowser for help on using the repository browser.