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

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

* empty log message *

File size: 231.4 KB
Line 
1/* $Id: user32.cpp,v 1.16 1999-06-26 15:07:00 sandervl Exp $ */
2
3/*
4 * Win32 misc user32 API functions for OS/2
5 *
6 * Copyright 1998 Sander van Leeuwen
7 * Copyright 1998 Patrick Haller
8 * Copyright 1998 Peter Fitzsimmons
9 * Copyright 1999 Christoph Bratschi
10 *
11 *
12 * Project Odin Software License can be found in LICENSE.TXT
13 *
14 */
15/*****************************************************************************
16 * Name : USER32.CPP
17 * Purpose : This module maps all Win32 functions contained in USER32.DLL
18 * to their OS/2-specific counterparts as far as possible.
19 *****************************************************************************/
20
21#include <os2win.h>
22#include "misc.h"
23
24#include "user32.h"
25#include "wndproc.h"
26#include "wndclass.h"
27#include "icon.h"
28#include "usrcall.h"
29#include "syscolor.h"
30
31#include <wchar.h>
32#include <stdlib.h>
33#include <string.h>
34
35//undocumented stuff
36// WIN32API CalcChildScroll
37// WIN32API CascadeChildWindows
38// WIN32API ClientThreadConnect
39// WIN32API DragObject
40// WIN32API DrawFrame
41// WIN32API EditWndProc
42// WIN32API EndTask
43// WIN32API GetInputDesktop
44// WIN32API GetNextQueueWindow
45// WIN32API GetShellWindow
46// WIN32API InitSharedTable
47// WIN32API InitTask
48// WIN32API IsHungThread
49// WIN32API LockWindowStation
50// WIN32API ModifyAccess
51// WIN32API PlaySoundEvent
52// WIN32API RegisterLogonProcess
53// WIN32API RegisterNetworkCapabilities
54// WIN32API RegisterSystemThread
55// WIN32API SetDeskWallpaper
56// WIN32API SetDesktopBitmap
57// WIN32API SetInternalWindowPos
58// WIN32API SetLogonNotifyWindow
59// WIN32API SetShellWindow
60// WIN32API SetSysColorsTemp
61// WIN32API SetWindowFullScreenState
62// WIN32API SwitchToThisWindow
63// WIN32API SysErrorBox
64// WIN32API TileChildWindows
65// WIN32API UnlockWindowStation
66// WIN32API UserClientDllInitialize
67// WIN32API UserSignalProc
68// WIN32API WinOldAppHackoMatic
69// WIN32API WNDPROC_CALLBACK
70// WIN32API YieldTask
71
72
73
74
75//******************************************************************************
76//******************************************************************************
77HWND WIN32API GetActiveWindow()
78{
79 return(O32_GetActiveWindow());
80}
81//******************************************************************************
82//******************************************************************************
83int __cdecl wsprintfA(char *lpOut, LPCSTR lpFmt, ...)
84{
85 int rc;
86 va_list argptr;
87
88#ifdef DEBUG
89 WriteLog("USER32: wsprintfA\n");
90 WriteLog("USER32: %s\n", lpFmt);
91#endif
92 va_start(argptr, lpFmt);
93 rc = O32_wvsprintf(lpOut, (char *)lpFmt, argptr);
94 va_end(argptr);
95#ifdef DEBUG
96 WriteLog("USER32: %s\n", lpOut);
97#endif
98 return(rc);
99}
100//******************************************************************************
101//******************************************************************************
102int __cdecl wsprintfW(LPWSTR lpOut, LPCWSTR lpFmt, ...)
103{
104 int rc;
105 char *lpFmtA;
106 char szOut[512];
107 va_list argptr;
108
109 dprintf(("USER32: wsprintfW(%08xh,%08xh).\n",
110 lpOut,
111 lpFmt));
112
113 lpFmtA = UnicodeToAsciiString((LPWSTR)lpFmt);
114
115 /* @@@PH 98/07/13 transform "%s" to "%ls" does the unicode magic */
116 {
117 PSZ pszTemp;
118 PSZ pszTemp1;
119 ULONG ulStrings;
120 ULONG ulIndex; /* temporary string counter */
121
122 for (ulStrings = 0, /* determine number of placeholders */
123 pszTemp = lpFmtA;
124
125 (pszTemp != NULL) &&
126 (*pszTemp != 0);
127
128 ulStrings++)
129 {
130 pszTemp = strstr(pszTemp,
131 "%s");
132 if (pszTemp != NULL) /* skip 2 characters */
133 {
134 pszTemp++;
135 pszTemp++;
136 }
137 else
138 break; /* leave loop immediately */
139 }
140
141 if (ulStrings != 0) /* transformation required ? */
142 {
143 /* now reallocate lpFmt */
144 ulStrings += strlen(lpFmtA); /* calculate total string length */
145 pszTemp = lpFmtA; /* save string pointer */
146 pszTemp1 = lpFmtA; /* save string pointer */
147
148 /* @@@PH allocation has to be compatible to FreeAsciiString !!! */
149 lpFmtA = (char *)malloc(ulStrings + 1);
150 if (lpFmtA == NULL) /* check proper allocation */
151 return (0); /* raise error condition */
152
153 for (ulIndex = 0;
154 ulIndex <= ulStrings;
155 ulIndex++,
156 pszTemp++)
157 {
158 if ((pszTemp[0] == '%') &&
159 (pszTemp[1] == 's') )
160 {
161 /* replace %s by %ls */
162 lpFmtA[ulIndex++] = '%';
163 lpFmtA[ulIndex ] = 'l';
164 lpFmtA[ulIndex+1] = 's';
165 }
166 else
167 lpFmtA[ulIndex] = *pszTemp; /* just copy over the character */
168 }
169
170 lpFmtA[ulStrings] = 0; /* string termination */
171
172 FreeAsciiString(pszTemp1); /* the original string is obsolete */
173 }
174 }
175
176 dprintf(("USER32: wsprintfW (%s).\n",
177 lpFmt));
178
179 va_start(argptr,
180 lpFmt);
181
182 rc = O32_wvsprintf(szOut,
183 lpFmtA,
184 argptr);
185
186 AsciiToUnicode(szOut,
187 lpOut);
188
189 FreeAsciiString(lpFmtA);
190 return(rc);
191}
192//******************************************************************************
193//******************************************************************************
194int WIN32API MessageBoxA(HWND hwndOwner, LPCTSTR lpszText, LPCTSTR lpszTitle, UINT fuStyle)
195{
196 dprintf(("USER32: MessageBoxA %s %s\n", lpszText, lpszTitle));
197 return(O32_MessageBox(hwndOwner, lpszText, lpszTitle, fuStyle));
198}
199//******************************************************************************
200//******************************************************************************
201BOOL WIN32API MessageBeep( UINT arg1)
202{
203#ifdef DEBUG
204 WriteLog("USER32: MessageBeep\n");
205#endif
206 return O32_MessageBeep(arg1);
207}
208//******************************************************************************
209//******************************************************************************
210LONG WIN32API SendDlgItemMessageA( HWND arg1, int arg2, UINT arg3, WPARAM arg4, LPARAM arg5)
211{
212#ifdef DEBUG
213 WriteLog("USER32: SendDlgItemMessageA\n");
214#endif
215 return O32_SendDlgItemMessage(arg1, arg2, arg3, arg4, arg5);
216}
217//******************************************************************************
218//******************************************************************************
219VOID WIN32API PostQuitMessage( int arg1)
220{
221 dprintf(("USER32: PostQuitMessage\n"));
222 O32_PostQuitMessage(arg1);
223}
224//******************************************************************************
225// Not implemented by Open32 (31-5-99 Christoph Bratschi)
226//******************************************************************************
227BOOL WIN32API IsDlgButtonChecked( HWND arg1, UINT arg2)
228{
229#ifdef DEBUG
230 WriteLog("USER32: IsDlgButtonChecked\n");
231#endif
232// return O32_IsDlgButtonChecked(arg1, arg2);
233 return (BOOL)SendDlgItemMessageA(arg1,arg2,BM_GETCHECK,0,0);
234}
235//******************************************************************************
236//******************************************************************************
237int WIN32API GetWindowTextLengthA( HWND arg1)
238{
239 dprintf(("USER32: GetWindowTextLength\n"));
240 return O32_GetWindowTextLength(arg1);
241}
242//******************************************************************************
243//******************************************************************************
244int WIN32API GetWindowTextA( HWND arg1, LPSTR arg2, int arg3)
245{
246 dprintf(("USER32: GetWindowTextA\n"));
247 return O32_GetWindowText(arg1, arg2, arg3);
248}
249//******************************************************************************
250
251/*******************************************************************
252 * InternalGetWindowText (USER32.326)
253 */
254int WIN32API InternalGetWindowText(HWND hwnd,
255 LPWSTR lpString,
256 INT nMaxCount )
257{
258 dprintf(("USER32: InternalGetWindowText(%08xh,%08xh,%08xh) not properly implemented.\n",
259 hwnd,
260 lpString,
261 nMaxCount));
262
263 return GetWindowTextW(hwnd,lpString,nMaxCount);
264}
265
266
267//******************************************************************************
268BOOL WIN32API GetWindowRect( HWND arg1, PRECT arg2)
269{
270 BOOL rc;
271
272 rc = O32_GetWindowRect(arg1, arg2);
273 dprintf(("USER32: GetWindowRect %X returned %d\n", arg1, rc));
274 return(rc);
275}
276//******************************************************************************
277//******************************************************************************
278HWND WIN32API GetNextDlgTabItem( HWND arg1, HWND arg2, BOOL arg3)
279{
280 dprintf(("USER32: GetNextDlgTabItem\n"));
281 return O32_GetNextDlgTabItem(arg1, arg2, arg3);
282}
283//******************************************************************************
284//******************************************************************************
285BOOL WIN32API GetMessageA( LPMSG arg1, HWND arg2, UINT arg3, UINT arg4)
286{
287//// dprintf(("USER32: GetMessage\n"));
288 return O32_GetMessage(arg1, arg2, arg3, arg4);
289}
290//******************************************************************************
291//******************************************************************************
292HWND WIN32API GetFocus(void)
293{
294// dprintf(("USER32: GetFocus\n"));
295 return O32_GetFocus();
296}
297//******************************************************************************
298//******************************************************************************
299HWND WIN32API GetDlgItem(HWND arg1, int arg2)
300{
301 HWND rc;
302
303 rc = O32_GetDlgItem(arg1, arg2);
304 dprintf(("USER32: GetDlgItem %d returned %d\n", arg2, rc));
305 return(rc);
306}
307//******************************************************************************
308//******************************************************************************
309int WIN32API GetDlgCtrlID( HWND arg1)
310{
311 dprintf(("USER32: GetDlgCtrlID\n"));
312 return O32_GetDlgCtrlID(arg1);
313}
314//******************************************************************************
315//******************************************************************************
316HWND WIN32API GetDesktopWindow(void)
317{
318 dprintf(("USER32: GetDesktopWindow\n"));
319 return O32_GetDesktopWindow();
320}
321//******************************************************************************
322//******************************************************************************
323BOOL WIN32API EnumThreadWindows(DWORD dwThreadId, WNDENUMPROC lpfn, LPARAM lParam)
324{
325 BOOL rc;
326 EnumWindowCallback *callback = new EnumWindowCallback(lpfn, lParam);
327
328 dprintf(("USER32: EnumThreadWindows\n"));
329 rc = O32_EnumThreadWindows(dwThreadId, callback->GetOS2Callback(), (LPARAM)callback);
330 if(callback)
331 delete callback;
332 return(rc);
333}
334//******************************************************************************
335//******************************************************************************
336BOOL WIN32API EndDialog( HWND arg1, int arg2)
337{
338 BOOL rc;
339
340 dprintf(("USER32: EndDialog\n"));
341 rc = O32_EndDialog(arg1, arg2);
342 return(rc);
343}
344//******************************************************************************
345//******************************************************************************
346LONG WIN32API DispatchMessageA( const MSG * arg1)
347{
348//// dprintf(("USER32: DispatchMessage\n"));
349 return O32_DispatchMessage(arg1);
350}
351//******************************************************************************
352//******************************************************************************
353BOOL WIN32API OffsetRect( PRECT arg1, int arg2, int arg3)
354{
355#ifdef DEBUG
356//// WriteLog("USER32: OffsetRect\n");
357#endif
358 return O32_OffsetRect(arg1, arg2, arg3);
359}
360//******************************************************************************
361//******************************************************************************
362BOOL WIN32API CopyRect( PRECT arg1, const RECT * arg2)
363{
364// ddprintf(("USER32: CopyRect\n"));
365 return O32_CopyRect(arg1, arg2);
366}
367//******************************************************************************
368// Not implemented by Open32 (5-31-99 Christoph Bratschi)
369//******************************************************************************
370BOOL WIN32API CheckDlgButton( HWND arg1, int arg2, UINT arg3)
371{
372#ifdef DEBUG
373 WriteLog("USER32: CheckDlgButton\n");
374#endif
375// return O32_CheckDlgButton(arg1, arg2, arg3);
376 return (BOOL)SendDlgItemMessageA(arg1,arg2,BM_SETCHECK,arg3,0);
377}
378//******************************************************************************
379//******************************************************************************
380HWND WIN32API SetFocus( HWND arg1)
381{
382 dprintf(("USER32: SetFocus\n"));
383 return O32_SetFocus(arg1);
384}
385//******************************************************************************
386//******************************************************************************
387BOOL WIN32API TranslateMessage( const MSG * arg1)
388{
389#ifdef DEBUG
390//// WriteLog("USER32: TranslateMessage\n");
391#endif
392 return O32_TranslateMessage(arg1);
393}
394//******************************************************************************
395//******************************************************************************
396BOOL WIN32API SetWindowPos( HWND arg1, HWND arg2, int arg3, int arg4, int arg5, int arg6, UINT arg7)
397{
398#ifdef DEBUG
399 WriteLog("USER32: SetWindowPos\n");
400#endif
401 return O32_SetWindowPos(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
402}
403//******************************************************************************
404//******************************************************************************
405BOOL WIN32API ShowWindow(HWND arg1, int arg2)
406{
407#ifdef DEBUG
408 WriteLog("USER32: ShowWindow %X %d\n", arg1, arg2);
409#endif
410 return O32_ShowWindow(arg1, arg2);
411}
412//******************************************************************************
413//******************************************************************************
414BOOL WIN32API SetWindowTextA(HWND arg1, LPCSTR arg2)
415{
416#ifdef DEBUG
417 WriteLog("USER32: SetWindowText %s\n", arg2);
418#endif
419 return O32_SetWindowText(arg1, arg2);
420}
421//******************************************************************************
422//******************************************************************************
423BOOL WIN32API SetForegroundWindow(HWND arg1)
424{
425#ifdef DEBUG
426 WriteLog("USER32: SetForegroundWindow\n");
427#endif
428 return O32_SetForegroundWindow(arg1);
429}
430//******************************************************************************
431//******************************************************************************
432int WIN32API ReleaseDC( HWND arg1, HDC arg2)
433{
434#ifdef DEBUG
435 WriteLog("USER32: ReleaseDC\n");
436#endif
437 return O32_ReleaseDC(arg1, arg2);
438}
439//******************************************************************************
440//******************************************************************************
441BOOL WIN32API InvalidateRect(HWND arg1, const RECT *arg2, BOOL arg3)
442{
443#ifdef DEBUG
444 if(arg2)
445 WriteLog("USER32: InvalidateRect for window %X (%d,%d)(%d,%d) %d\n", arg1, arg2->left, arg2->top, arg2->right, arg2->bottom, arg3);
446 else WriteLog("USER32: InvalidateRect for window %X NULL, %d\n", arg1, arg3);
447#endif
448 return O32_InvalidateRect(arg1, arg2, arg3);
449}
450//******************************************************************************
451//******************************************************************************
452BOOL WIN32API GetUpdateRect( HWND arg1, PRECT arg2, BOOL arg3)
453{
454#ifdef DEBUG
455 WriteLog("USER32: GetUpdateRect\n");
456#endif
457 return O32_GetUpdateRect(arg1, arg2, arg3);
458}
459//******************************************************************************
460//******************************************************************************
461HDC WIN32API GetDC( HWND arg1)
462{
463 HDC hdc;
464
465 hdc = O32_GetDC(arg1);
466#ifdef DEBUG
467 WriteLog("USER32: GetDC of %X returns %X\n", arg1, hdc);
468#endif
469 return(hdc);
470}
471//******************************************************************************
472//******************************************************************************
473HDC WIN32API GetDCEx(HWND arg1, HRGN arg2, DWORD arg3)
474{
475#ifdef DEBUG
476 WriteLog("USER32: GetDCEx\n");
477#endif
478 return O32_GetDCEx(arg1, arg2, arg3);
479}
480//******************************************************************************
481//******************************************************************************
482BOOL WIN32API GetClientRect( HWND arg1, PRECT arg2)
483{
484#ifdef DEBUG
485 WriteLog("USER32: GetClientRect of %X\n", arg1);
486#endif
487
488 return O32_GetClientRect(arg1, arg2);
489}
490//******************************************************************************
491//******************************************************************************
492HWND WIN32API FindWindowA(LPCSTR arg1, LPCSTR arg2)
493{
494#ifdef DEBUG
495 WriteLog("USER32: FindWindow\n");
496#endif
497 return O32_FindWindow(arg1, arg2);
498}
499//******************************************************************************
500//******************************************************************************
501HWND WIN32API FindWindowExA(HWND arg1, HWND arg2, LPCSTR arg3, LPCSTR arg4)
502{
503#ifdef DEBUG
504 WriteLog("USER32: FindWindowExA, not completely implemented\n");
505#endif
506 return O32_FindWindow(arg3, arg4);
507}
508//******************************************************************************
509//******************************************************************************
510BOOL WIN32API FlashWindow( HWND arg1, BOOL arg2)
511{
512#ifdef DEBUG
513 WriteLog("USER32: FlashWindow\n");
514#endif
515 return O32_FlashWindow(arg1, arg2);
516}
517//******************************************************************************
518//******************************************************************************
519BOOL WIN32API EndPaint( HWND arg1, const PAINTSTRUCT * arg2)
520{
521#ifdef DEBUG
522 WriteLog("USER32: EndPaint\n");
523#endif
524 return O32_EndPaint(arg1, arg2);
525}
526//******************************************************************************
527//******************************************************************************
528BOOL WIN32API MoveWindow(HWND arg1, int arg2, int arg3, int arg4, int arg5, BOOL arg6)
529{
530 BOOL rc;
531
532 rc = O32_MoveWindow(arg1, arg2, arg3, arg4, arg5, arg6);
533 dprintf(("USER32: MoveWindow %X to (%d,%d) size (%d,%d), repaint = %d returned %d\n", arg1, arg2, arg3, arg4, arg5, arg6, rc));
534 return(rc);
535}
536//******************************************************************************
537//******************************************************************************
538HWND WIN32API CreateWindowExA(DWORD dwExStyle,
539 LPCSTR arg2,
540 LPCSTR arg3,
541 DWORD dwStyle,
542 int x,
543 int y,
544 int nWidth,
545 int nHeight,
546 HWND parent,
547 HMENU arg10,
548 HINSTANCE arg11,
549 PVOID arg12)
550{
551 HWND hwnd;
552 Win32WindowProc *window = NULL;
553
554 /* @@@PH 98/06/12 CreateWindow crashes somewhere in Open32 */
555 if(arg3 == NULL)
556 arg3 = (LPCSTR)"CRASH, CRASH";
557
558 // 6-12-99 CB: WS_CLIPCHILDREN not set -> controls not redrawn
559 // Problems with group boxes
560 //SvL: Not necessary anymore (EB's fixes)
561// dwStyle |= WS_CLIPCHILDREN;
562
563 //SvL: Correct window style (like Wine does)
564 if(dwStyle & WS_CHILD) {
565 dwStyle |= WS_CLIPSIBLINGS;
566 if(!(dwStyle & WS_POPUP)) {
567 dwStyle |= WS_CAPTION;
568 }
569 }
570 if(dwExStyle & WS_EX_DLGMODALFRAME)
571 {
572 dwStyle &= ~WS_THICKFRAME;
573 }
574
575#ifdef DEBUG
576 WriteLog("USER32: CreateWindow: dwExStyle = %X\n", dwExStyle);
577 if((int)arg2 >> 16 != 0)
578 WriteLog("USER32: CreateWindow: classname = %s\n", arg2);
579 else WriteLog("USER32: CreateWindow: classname = %X\n", arg2);
580 WriteLog("USER32: CreateWindow: windowname= %s\n", arg3);
581 WriteLog("USER32: CreateWindow: dwStyle = %X\n", dwStyle);
582 WriteLog("USER32: CreateWindow: x = %d\n", x);
583 WriteLog("USER32: CreateWindow: y = %d\n", y);
584 WriteLog("USER32: CreateWindow: nWidth = %d\n", nWidth);
585 WriteLog("USER32: CreateWindow: nHeight = %d\n", nHeight);
586 WriteLog("USER32: CreateWindow: parent = %X\n", parent);
587 WriteLog("USER32: CreateWindow: hwmenu = %X\n", arg10);
588 WriteLog("USER32: CreateWindow: hinstance = %X\n", arg11);
589 WriteLog("USER32: CreateWindow: param = %X\n", arg12);
590 #endif
591
592 if((int) arg2 >> 16 != 0 && strcmp(arg2, "COMBOBOX") == 0)
593 {
594 dprintf(("COMBOBOX creation"));
595 //TODO: #%@#%$ Open32 doesn't support this
596 dwStyle &= ~(CBS_OWNERDRAWFIXED | CBS_OWNERDRAWVARIABLE);
597
598 /* @@@PH 98/06/12 drop down combos are problematic too */
599 /* so we translate the styles to OS/2 style */
600 dwStyle |= CBS_DROPDOWN | CBS_DROPDOWNLIST;
601 }
602
603 //Classname might be name of system class, in which case we don't
604 //need to use our own callback
605// if(Win32WindowClass::FindClass((LPSTR)arg2) != NULL) {
606 window = new Win32WindowProc(arg11, arg2);
607// }
608
609 hwnd = O32_CreateWindowEx(dwExStyle,
610 arg2,
611 arg3,
612 dwStyle,
613 x,
614 y,
615 nWidth,
616 nHeight,
617 parent,
618 arg10,
619 arg11,
620 arg12);
621
622 //SvL: 16-11-'97: window can be already destroyed if hwnd == 0
623 if(hwnd == 0 && window != 0 && Win32WindowProc::FindWindowProc(window)) {
624 delete(window);
625 window = 0;
626 }
627 if(window) {
628 window->SetWindowHandle(hwnd);
629 }
630
631 dprintf(("USER32: ************CreateWindowExA %s (%d,%d,%d,%d), hwnd = %X\n", arg2, x, y, nWidth, nHeight, hwnd));
632 return(hwnd);
633}
634//******************************************************************************
635//******************************************************************************
636LRESULT WIN32API SendMessageA(HWND arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
637{
638 LRESULT rc;
639
640#ifdef DEBUG1
641 WriteLog("USER32: SendMessage....\n");
642#endif
643 rc = O32_SendMessage(arg1, arg2, arg3, arg4);
644#ifdef DEBUG1
645 WriteLog("USER32: *****SendMessage %X %X %X %X returned %d\n", arg1, arg2, arg3, arg4, rc);
646#endif
647 return(rc);
648}
649//******************************************************************************
650//******************************************************************************
651HWND WIN32API SetActiveWindow( HWND arg1)
652{
653#ifdef DEBUG
654 WriteLog("USER32: SetActiveWindow\n");
655#endif
656 return O32_SetActiveWindow(arg1);
657}
658//******************************************************************************
659//******************************************************************************
660HDC WIN32API BeginPaint(HWND arg1, PPAINTSTRUCT arg2)
661{
662 dprintf(("USER32: BeginPaint %X\n", arg2));
663 return O32_BeginPaint(arg1, arg2);
664}
665//******************************************************************************
666//******************************************************************************
667BOOL WIN32API IsDialogMessageA( HWND arg1, LPMSG arg2)
668{
669#ifdef DEBUG
670//// WriteLog("USER32: IsDialogMessage\n");
671#endif
672 return O32_IsDialogMessage(arg1, arg2);
673}
674//******************************************************************************
675//******************************************************************************
676int WIN32API DrawTextA(HDC arg1, LPCSTR arg2, int arg3, PRECT arg4, UINT arg5)
677{
678#ifdef DEBUG
679 WriteLog("USER32: DrawTextA %s", arg2);
680#endif
681 return O32_DrawText(arg1, arg2, arg3, arg4, arg5);
682}
683//******************************************************************************
684//******************************************************************************
685int WIN32API DrawTextExA(HDC arg1, LPCSTR arg2, int arg3, PRECT arg4, UINT arg5, LPDRAWTEXTPARAMS lpDTParams)
686{
687#ifdef DEBUG
688 WriteLog("USER32: DrawTextExA (not completely implemented) %s", arg2);
689#endif
690 return O32_DrawText(arg1, arg2, arg3, arg4, arg5);
691}
692//******************************************************************************
693//******************************************************************************
694int WIN32API GetSystemMetrics(int arg1)
695{
696 int rc;
697
698 switch(arg1) {
699 case SM_CXICONSPACING: //TODO: size of grid cell for large icons
700 rc = O32_GetSystemMetrics(SM_CXICON);
701 break;
702 case SM_CYICONSPACING:
703 rc = O32_GetSystemMetrics(SM_CYICON);
704 break;
705 case SM_PENWINDOWS:
706 rc = FALSE;
707 break;
708 case SM_DBCSENABLED:
709 rc = FALSE;
710 break;
711 case SM_CXEDGE: //size of 3D window edge (not supported)
712 rc = 1;
713 break;
714 case SM_CYEDGE:
715 rc = 1;
716 break;
717 case SM_CXMINSPACING: //can be SM_CXMINIMIZED or larger
718 rc = O32_GetSystemMetrics(SM_CXMINIMIZED);
719 break;
720 case SM_CYMINSPACING:
721 rc = GetSystemMetrics(SM_CYMINIMIZED);
722 break;
723 case SM_CXSMICON: //recommended size of small icons (TODO: adjust to screen res.)
724 rc = 16;
725 break;
726 case SM_CYSMICON:
727 rc = 16;
728 break;
729 case SM_CYSMCAPTION: //size in pixels of a small caption (TODO: ????)
730 rc = 8;
731 break;
732 case SM_CXSMSIZE: //size of small caption buttons (pixels) (TODO: implement properly)
733 rc = 16;
734 break;
735 case SM_CYSMSIZE:
736 rc = 16;
737 break;
738 case SM_CXMENUSIZE: //TODO: size of menu bar buttons (such as MDI window close)
739 rc = 16;
740 break;
741 case SM_CYMENUSIZE:
742 rc = 16;
743 break;
744 case SM_ARRANGE:
745 rc = ARW_BOTTOMLEFT | ARW_LEFT;
746 break;
747 case SM_CXMINIMIZED:
748 break;
749 case SM_CYMINIMIZED:
750 break;
751 case SM_CXMAXTRACK: //max window size
752 case SM_CXMAXIMIZED: //max toplevel window size
753 rc = O32_GetSystemMetrics(SM_CXSCREEN);
754 break;
755 case SM_CYMAXTRACK:
756 case SM_CYMAXIMIZED:
757 rc = O32_GetSystemMetrics(SM_CYSCREEN);
758 break;
759 case SM_NETWORK:
760 rc = 0x01; //TODO: default = yes
761 break;
762 case SM_CLEANBOOT:
763 rc = 0; //normal boot
764 break;
765 case SM_CXDRAG: //nr of pixels before drag becomes a real one
766 rc = 2;
767 break;
768 case SM_CYDRAG:
769 rc = 2;
770 break;
771 case SM_SHOWSOUNDS: //show instead of play sound
772 rc = FALSE;
773 break;
774 case SM_CXMENUCHECK:
775 rc = 4; //TODO
776 break;
777 case SM_CYMENUCHECK:
778 rc = O32_GetSystemMetrics(SM_CYMENU);
779 break;
780 case SM_SLOWMACHINE:
781 rc = FALSE; //even a slow machine is fast with OS/2 :)
782 break;
783 case SM_MIDEASTENABLED:
784 rc = FALSE;
785 break;
786 case SM_CMETRICS:
787 rc = O32_GetSystemMetrics(44); //Open32 changed this one
788 break;
789 default:
790 rc = O32_GetSystemMetrics(arg1);
791 break;
792 }
793#ifdef DEBUG
794 WriteLog("USER32: GetSystemMetrics %d returned %d\n", arg1, rc);
795#endif
796 return(rc);
797}
798//******************************************************************************
799//******************************************************************************
800UINT WIN32API SetTimer( HWND arg1, UINT arg2, UINT arg3, TIMERPROC arg4)
801{
802#ifdef DEBUG
803 WriteLog("USER32: SetTimer INCORRECT CALLING CONVENTION FOR HANDLER!!!!!\n");
804#endif
805 //SvL: Write callback handler class for this one
806 return O32_SetTimer(arg1, arg2, arg3, (TIMERPROC_O32)arg4);
807}
808//******************************************************************************
809//******************************************************************************
810BOOL WIN32API KillTimer(HWND arg1, UINT arg2)
811{
812#ifdef DEBUG
813 WriteLog("USER32: KillTimer\n");
814#endif
815 return O32_KillTimer(arg1, arg2);
816}
817//******************************************************************************
818//******************************************************************************
819BOOL WIN32API DestroyWindow(HWND arg1)
820{
821#ifdef DEBUG
822 WriteLog("USER32: DestroyWindow\n");
823#endif
824 return O32_DestroyWindow(arg1);
825}
826//******************************************************************************
827//******************************************************************************
828BOOL WIN32API PostMessageA( HWND arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
829{
830#ifdef DEBUG
831 WriteLog("USER32: PostMessageA %X %X %X %X\n", arg1, arg2, arg3, arg4);
832#endif
833 return O32_PostMessage(arg1, arg2, arg3, arg4);
834}
835//******************************************************************************
836//******************************************************************************
837BOOL WIN32API InflateRect( PRECT arg1, int arg2, int arg3)
838{
839#ifdef DEBUG
840 WriteLog("USER32: InflateRect\n");
841#endif
842 return O32_InflateRect(arg1, arg2, arg3);
843}
844//******************************************************************************
845//TODO:How can we emulate this one in OS/2???
846//******************************************************************************
847DWORD WIN32API WaitForInputIdle(HANDLE hProcess, DWORD dwTimeOut)
848{
849#ifdef DEBUG
850 WriteLog("USER32: WaitForInputIdle (Not Implemented) %d\n", dwTimeOut);
851#endif
852
853 if(dwTimeOut == INFINITE) return(0);
854
855// DosSleep(dwTimeOut/16);
856 return(0);
857}
858//******************************************************************************
859//******************************************************************************
860UINT WIN32API GetDlgItemTextA(HWND arg1, int arg2, LPSTR arg3, UINT arg4)
861{
862 UINT rc;
863
864 rc = O32_GetDlgItemText(arg1, arg2, arg3, arg4);
865#ifdef DEBUG
866 if(rc)
867 WriteLog("USER32: GetDlgItemTextA returned %s\n", arg3);
868 else WriteLog("USER32: GetDlgItemTextA returned 0 (%d)\n", GetLastError());
869#endif
870 return(rc);
871}
872//******************************************************************************
873//******************************************************************************
874BOOL WIN32API PeekMessageA(LPMSG arg1, HWND arg2, UINT arg3, UINT arg4, UINT arg5)
875{
876#ifdef DEBUG
877// WriteLog("USER32: PeekMessage\n");
878#endif
879 return O32_PeekMessage(arg1, arg2, arg3, arg4, arg5);
880}
881//******************************************************************************
882//******************************************************************************
883int WIN32API ShowCursor( BOOL arg1)
884{
885#ifdef DEBUG
886 WriteLog("USER32: ShowCursor\n");
887#endif
888 return O32_ShowCursor(arg1);
889}
890//******************************************************************************
891//BUGBUG: UpdateWindow sends a WM_ERASEBKGRND when it shouldn't!
892// So we just do it manually
893//******************************************************************************
894BOOL WIN32API UpdateWindow(HWND hwnd)
895{
896 RECT rect;
897
898#ifdef DEBUG
899 WriteLog("USER32: UpdateWindow\n");
900#endif
901
902#if 0 // EB: ->>> doesn't work. No correct update of Winhlp32 scrolling area.
903 if(O32_GetUpdateRect(hwnd, &rect, FALSE) != FALSE) {//update region empty?
904 WndCallback(hwnd, WM_PAINT, 0, 0);
905// O32_PostMessage(hwnd, WM_PAINT, 0, 0);
906 }
907#ifdef DEBUG
908 else WriteLog("USER32: Update region empty!\n");
909#endif
910 return(TRUE);
911#endif
912
913 return O32_UpdateWindow(hwnd);
914}
915//******************************************************************************
916//******************************************************************************
917BOOL WIN32API AdjustWindowRect( PRECT arg1, DWORD arg2, BOOL arg3)
918{
919#ifdef DEBUG
920 WriteLog("USER32: AdjustWindowRect\n");
921#endif
922 return O32_AdjustWindowRect(arg1, arg2, arg3);
923}
924//******************************************************************************
925//******************************************************************************
926BOOL WIN32API AdjustWindowRectEx( PRECT arg1, DWORD arg2, BOOL arg3, DWORD arg4)
927{
928#ifdef DEBUG
929 WriteLog("USER32: AdjustWindowRectEx\n");
930#endif
931 return O32_AdjustWindowRectEx(arg1, arg2, arg3, arg4);
932}
933//******************************************************************************
934//******************************************************************************
935BOOL WIN32API ClientToScreen( HWND arg1, PPOINT arg2)
936{
937#ifdef DEBUG
938//// WriteLog("USER32: ClientToScreen\n");
939#endif
940 return O32_ClientToScreen(arg1, arg2);
941}
942//******************************************************************************
943//******************************************************************************
944BOOL WIN32API SetRect( PRECT arg1, int arg2, int arg3, int arg4, int arg5)
945{
946#ifdef DEBUG
947 WriteLog("USER32: SetRect\n");
948#endif
949 return O32_SetRect(arg1, arg2, arg3, arg4, arg5);
950}
951//******************************************************************************
952//******************************************************************************
953BOOL WIN32API SetDlgItemInt( HWND arg1, int arg2, UINT arg3, BOOL arg4)
954{
955#ifdef DEBUG
956 WriteLog("USER32: SetDlgItemInt\n");
957#endif
958 return O32_SetDlgItemInt(arg1, arg2, arg3, arg4);
959}
960//******************************************************************************
961//******************************************************************************
962BOOL WIN32API SetDlgItemTextA( HWND arg1, int arg2, LPCSTR arg3)
963{
964#ifdef DEBUG
965 WriteLog("USER32: SetDlgItemText to %s\n", arg3);
966#endif
967 return O32_SetDlgItemText(arg1, arg2, arg3);
968}
969//******************************************************************************
970//******************************************************************************
971BOOL WIN32API WinHelpA( HWND arg1, LPCSTR arg2, UINT arg3, DWORD arg4)
972{
973#ifdef DEBUG
974 WriteLog("USER32: WinHelp not implemented %s\n", arg2);
975#endif
976// return O32_WinHelp(arg1, arg2, arg3, arg4);
977 return(TRUE);
978}
979//******************************************************************************
980//******************************************************************************
981BOOL WIN32API IsIconic( HWND arg1)
982{
983#ifdef DEBUG
984 WriteLog("USER32: IsIconic\n");
985#endif
986 return O32_IsIconic(arg1);
987}
988//******************************************************************************
989//******************************************************************************
990int WIN32API TranslateAcceleratorA(HWND arg1, HACCEL arg2, LPMSG arg3)
991{
992#ifdef DEBUG
993//// WriteLog("USER32: TranslateAccelerator\n");
994#endif
995 return O32_TranslateAccelerator(arg1, arg2, arg3);
996}
997//******************************************************************************
998//******************************************************************************
999HWND WIN32API GetWindow(HWND arg1, UINT arg2)
1000{
1001 HWND rc;
1002
1003 rc = O32_GetWindow(arg1, arg2);
1004#ifdef DEBUG
1005 WriteLog("USER32: GetWindow %X %d returned %d\n", arg1, arg2, rc);
1006#endif
1007 return(rc);
1008}
1009//******************************************************************************
1010//******************************************************************************
1011HDC WIN32API GetWindowDC(HWND arg1)
1012{
1013#ifdef DEBUG
1014 WriteLog("USER32: GetWindowDC\n");
1015#endif
1016 return O32_GetWindowDC(arg1);
1017}
1018//******************************************************************************
1019//******************************************************************************
1020BOOL WIN32API SubtractRect( PRECT arg1, const RECT * arg2, const RECT * arg3)
1021{
1022#ifdef DEBUG
1023 WriteLog("USER32: SubtractRect");
1024#endif
1025 return O32_SubtractRect(arg1, arg2, arg3);
1026}
1027//******************************************************************************
1028//SvL: 24-6-'97 - Added
1029//******************************************************************************
1030BOOL WIN32API ClipCursor(const RECT * arg1)
1031{
1032#ifdef DEBUG
1033 WriteLog("USER32: ClipCursor\n");
1034#endif
1035 return O32_ClipCursor(arg1);
1036}
1037//******************************************************************************
1038//SvL: 24-6-'97 - Added
1039//TODO: Not implemented
1040//******************************************************************************
1041WORD WIN32API GetAsyncKeyState(INT nVirtKey)
1042{
1043#ifdef DEBUG
1044//// WriteLog("USER32: GetAsyncKeyState Not implemented\n");
1045#endif
1046 return 0;
1047}
1048//******************************************************************************
1049//SvL: 24-6-'97 - Added
1050//******************************************************************************
1051HCURSOR WIN32API GetCursor(void)
1052{
1053#ifdef DEBUG
1054//// WriteLog("USER32: GetCursor\n");
1055#endif
1056 return O32_GetCursor();
1057}
1058//******************************************************************************
1059//SvL: 24-6-'97 - Added
1060//******************************************************************************
1061BOOL WIN32API GetCursorPos( PPOINT arg1)
1062{
1063#ifdef DEBUG
1064//// WriteLog("USER32: GetCursorPos\n");
1065#endif
1066 return O32_GetCursorPos(arg1);
1067}
1068//******************************************************************************
1069//SvL: 24-6-'97 - Added
1070//******************************************************************************
1071UINT WIN32API RegisterWindowMessageA(LPCSTR arg1)
1072{
1073 UINT rc;
1074
1075 rc = O32_RegisterWindowMessage(arg1);
1076#ifdef DEBUG
1077 WriteLog("USER32: RegisterWindowMessageA %s returned %X\n", arg1, rc);
1078#endif
1079 return(rc);
1080}
1081//******************************************************************************
1082//SvL: 24-6-'97 - Added
1083//******************************************************************************
1084WORD WIN32API VkKeyScanA( char arg1)
1085{
1086#ifdef DEBUG
1087 WriteLog("USER32: VkKeyScanA\n");
1088#endif
1089 return O32_VkKeyScan(arg1);
1090}
1091//******************************************************************************
1092//SvL: 24-6-'97 - Added
1093//******************************************************************************
1094SHORT WIN32API GetKeyState( int arg1)
1095{
1096#ifdef DEBUG
1097 WriteLog("USER32: GetKeyState %d\n", arg1);
1098#endif
1099 return O32_GetKeyState(arg1);
1100}
1101//******************************************************************************
1102//******************************************************************************
1103HCURSOR WIN32API SetCursor( HCURSOR arg1)
1104{
1105#ifdef DEBUG
1106 WriteLog("USER32: SetCursor\n");
1107#endif
1108 return O32_SetCursor(arg1);
1109}
1110//******************************************************************************
1111//******************************************************************************
1112BOOL WIN32API SetCursorPos( int arg1, int arg2)
1113{
1114#ifdef DEBUG
1115 WriteLog("USER32: SetCursorPos\n");
1116#endif
1117 return O32_SetCursorPos(arg1, arg2);
1118}
1119//******************************************************************************
1120//******************************************************************************
1121BOOL WIN32API EnableScrollBar( HWND arg1, INT arg2, UINT arg3)
1122{
1123#ifdef DEBUG
1124 WriteLog("USER32: EnableScrollBar\n");
1125#endif
1126 return O32_EnableScrollBar(arg1, arg2, arg3);
1127}
1128//******************************************************************************
1129//******************************************************************************
1130BOOL WIN32API EnableWindow( HWND arg1, BOOL arg2)
1131{
1132#ifdef DEBUG
1133 WriteLog("USER32: EnableWindow\n");
1134#endif
1135 return O32_EnableWindow(arg1, arg2);
1136}
1137//******************************************************************************
1138//******************************************************************************
1139HWND WIN32API SetCapture( HWND arg1)
1140{
1141#ifdef DEBUG
1142 WriteLog("USER32: SetCapture\n");
1143#endif
1144 return O32_SetCapture(arg1);
1145}
1146//******************************************************************************
1147//******************************************************************************
1148BOOL WIN32API ReleaseCapture(void)
1149{
1150#ifdef DEBUG
1151 WriteLog("USER32: ReleaseCapture\n");
1152#endif
1153 return O32_ReleaseCapture();
1154}
1155//******************************************************************************
1156//******************************************************************************
1157DWORD WIN32API MsgWaitForMultipleObjects( DWORD arg1, LPHANDLE arg2, BOOL arg3, DWORD arg4, DWORD arg5)
1158{
1159#ifdef DEBUG
1160 WriteLog("USER32: MsgWaitForMultipleObjects\n");
1161#endif
1162 return O32_MsgWaitForMultipleObjects(arg1, arg2, arg3, arg4, arg5);
1163}
1164//******************************************************************************
1165//******************************************************************************
1166HDWP WIN32API BeginDeferWindowPos( int arg1)
1167{
1168#ifdef DEBUG
1169 WriteLog("USER32: BeginDeferWindowPos\n");
1170#endif
1171 return O32_BeginDeferWindowPos(arg1);
1172}
1173//******************************************************************************
1174//******************************************************************************
1175BOOL WIN32API BringWindowToTop( HWND arg1)
1176{
1177#ifdef DEBUG
1178 WriteLog("USER32: BringWindowToTop\n");
1179#endif
1180 return O32_BringWindowToTop(arg1);
1181}
1182//******************************************************************************
1183//******************************************************************************
1184BOOL WIN32API CallMsgFilterA( LPMSG arg1, int arg2)
1185{
1186#ifdef DEBUG
1187 WriteLog("USER32: CallMsgFilterA\n");
1188#endif
1189 return O32_CallMsgFilter(arg1, arg2);
1190}
1191//******************************************************************************
1192//******************************************************************************
1193BOOL WIN32API CallMsgFilterW( LPMSG arg1, int arg2)
1194{
1195#ifdef DEBUG
1196 WriteLog("USER32: CallMsgFilterW\n");
1197#endif
1198 // NOTE: This will not work as is (needs UNICODE support)
1199 return O32_CallMsgFilter(arg1, arg2);
1200}
1201//******************************************************************************
1202//******************************************************************************
1203LRESULT WIN32API CallWindowProcA(WNDPROC wndprcPrev,
1204 HWND arg2,
1205 UINT arg3,
1206 WPARAM arg4,
1207 LPARAM arg5)
1208{
1209#ifdef DEBUG
1210//// WriteLog("USER32: CallWindowProcA %X hwnd=%X, msg = %X\n", wndprcPrev, arg2, arg3);
1211#endif
1212
1213 return wndprcPrev(arg2, arg3, arg4, arg5); //win32 callback (__stdcall)
1214}
1215//******************************************************************************
1216//******************************************************************************
1217LRESULT WIN32API CallWindowProcW(WNDPROC arg1,
1218 HWND arg2,
1219 UINT arg3,
1220 WPARAM arg4,
1221 LPARAM arg5)
1222{
1223 dprintf(("USER32: CallWindowProcW(%08xh,%08xh,%08xh,%08xh,%08xh) not properly implemented.\n",
1224 arg1,
1225 arg2,
1226 arg3,
1227 arg4,
1228 arg5));
1229
1230 return CallWindowProcA(arg1,
1231 arg2,
1232 arg3,
1233 arg4,
1234 arg5);
1235}
1236//******************************************************************************
1237//******************************************************************************
1238BOOL WIN32API ChangeClipboardChain( HWND arg1, HWND arg2)
1239{
1240#ifdef DEBUG
1241 WriteLog("USER32: ChangeClipboardChain\n");
1242#endif
1243 return O32_ChangeClipboardChain(arg1, arg2);
1244}
1245//******************************************************************************
1246//******************************************************************************
1247UINT WIN32API ArrangeIconicWindows( HWND arg1)
1248{
1249#ifdef DEBUG
1250 WriteLog("USER32: ArrangeIconicWindows\n");
1251#endif
1252 return O32_ArrangeIconicWindows(arg1);
1253}
1254//******************************************************************************
1255// Not implemented by Open32 (5-31-99 Christoph Bratschi)
1256//******************************************************************************
1257BOOL WIN32API CheckRadioButton( HWND arg1, UINT arg2, UINT arg3, UINT arg4)
1258{
1259#ifdef DEBUG
1260 WriteLog("USER32: CheckRadioButton\n");
1261#endif
1262// return O32_CheckRadioButton(arg1, arg2, arg3, arg4);
1263 if (arg2 > arg3) return (FALSE);
1264 for (UINT x=arg2;x <= arg3;x++)
1265 {
1266 SendDlgItemMessageA(arg1,x,BM_SETCHECK,(x == arg4) ? BST_CHECKED : BST_UNCHECKED,0);
1267 }
1268 return (TRUE);
1269}
1270//******************************************************************************
1271//******************************************************************************
1272HWND WIN32API ChildWindowFromPoint( HWND arg1, POINT arg2)
1273{
1274#ifdef DEBUG
1275 WriteLog("USER32: ChildWindowFromPoint\n");
1276#endif
1277 return O32_ChildWindowFromPoint(arg1, arg2);
1278}
1279//******************************************************************************
1280//******************************************************************************
1281HWND WIN32API ChildWindowFromPointEx(HWND arg1, POINT arg2, UINT uFlags)
1282{
1283#ifdef DEBUG
1284 WriteLog("USER32: ChildWindowFromPointEx, not completely supported!\n");
1285#endif
1286 return O32_ChildWindowFromPoint(arg1, arg2);
1287}
1288//******************************************************************************
1289//******************************************************************************
1290BOOL WIN32API CloseClipboard(void)
1291{
1292#ifdef DEBUG
1293 WriteLog("USER32: CloseClipboard\n");
1294#endif
1295 return O32_CloseClipboard();
1296}
1297//******************************************************************************
1298//******************************************************************************
1299BOOL WIN32API CloseWindow( HWND arg1)
1300{
1301#ifdef DEBUG
1302 WriteLog("USER32: CloseWindow\n");
1303#endif
1304 return O32_CloseWindow(arg1);
1305}
1306//******************************************************************************
1307//******************************************************************************
1308HICON WIN32API CopyIcon( HICON arg1)
1309{
1310#ifdef DEBUG
1311 WriteLog("USER32: CopyIcon\n");
1312#endif
1313 return O32_CopyIcon(arg1);
1314}
1315//******************************************************************************
1316//******************************************************************************
1317int WIN32API CountClipboardFormats(void)
1318{
1319#ifdef DEBUG
1320 WriteLog("USER32: CountClipboardFormats\n");
1321#endif
1322 return O32_CountClipboardFormats();
1323}
1324//******************************************************************************
1325//******************************************************************************
1326HACCEL WIN32API CreateAcceleratorTableA( LPACCEL arg1, int arg2)
1327{
1328#ifdef DEBUG
1329 WriteLog("USER32: CreateAcceleratorTableA\n");
1330#endif
1331 return O32_CreateAcceleratorTable(arg1, arg2);
1332}
1333//******************************************************************************
1334//******************************************************************************
1335HACCEL WIN32API CreateAcceleratorTableW( LPACCEL arg1, int arg2)
1336{
1337#ifdef DEBUG
1338 WriteLog("USER32: CreateAcceleratorTableW\n");
1339#endif
1340 // NOTE: This will not work as is (needs UNICODE support)
1341 return O32_CreateAcceleratorTable(arg1, arg2);
1342}
1343//******************************************************************************
1344//******************************************************************************
1345BOOL WIN32API CreateCaret( HWND arg1, HBITMAP arg2, int arg3, int arg4)
1346{
1347#ifdef DEBUG
1348 WriteLog("USER32: CreateCaret\n");
1349#endif
1350 return O32_CreateCaret(arg1, arg2, arg3, arg4);
1351}
1352//******************************************************************************
1353//******************************************************************************
1354HCURSOR WIN32API CreateCursor( HINSTANCE arg1, int arg2, int arg3, int arg4, int arg5, const VOID * arg6, const VOID * arg7)
1355{
1356#ifdef DEBUG
1357 WriteLog("USER32: CreateCursor\n");
1358#endif
1359 return O32_CreateCursor(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
1360}
1361//******************************************************************************
1362//******************************************************************************
1363HICON WIN32API CreateIcon( HINSTANCE arg1, INT arg2, INT arg3, BYTE arg4, BYTE arg5, LPCVOID arg6, LPCVOID arg7)
1364{
1365#ifdef DEBUG
1366 WriteLog("USER32: CreateIcon\n");
1367#endif
1368 return O32_CreateIcon(arg1, arg2, arg3, arg4, arg5, (const BYTE *)arg6, (const BYTE *)arg7);
1369}
1370//******************************************************************************
1371//ASSERT dwVer == win31 (ok according to SDK docs)
1372//******************************************************************************
1373HICON WIN32API CreateIconFromResource(PBYTE presbits, UINT dwResSize,
1374 BOOL fIcon, DWORD dwVer)
1375{
1376 HICON hicon;
1377 DWORD OS2ResSize = 0;
1378 PBYTE OS2Icon = ConvertWin32Icon(presbits, dwResSize, &OS2ResSize);
1379
1380 hicon = O32_CreateIconFromResource(OS2Icon, OS2ResSize, fIcon, dwVer);
1381#ifdef DEBUG
1382 WriteLog("USER32: CreateIconFromResource returned %X (%X)\n", hicon, GetLastError());
1383#endif
1384 if(OS2Icon)
1385 FreeIcon(OS2Icon);
1386
1387 return(hicon);
1388}
1389//******************************************************************************
1390//******************************************************************************
1391HICON WIN32API CreateIconFromResourceEx(PBYTE presbits, UINT dwResSize,
1392 BOOL fIcon, DWORD dwVer,
1393 int cxDesired, int cyDesired,
1394 UINT Flags)
1395{
1396#ifdef DEBUG
1397 WriteLog("USER32: CreateIconFromResourceEx %X %d %d %X %d %d %X, not completely supported!\n", presbits, dwResSize, fIcon, dwVer, cxDesired, cyDesired, Flags);
1398#endif
1399 return CreateIconFromResource(presbits, dwResSize, fIcon, dwVer);
1400}
1401//******************************************************************************
1402//******************************************************************************
1403HICON WIN32API CreateIconIndirect(LPICONINFO arg1)
1404{
1405#ifdef DEBUG
1406 WriteLog("USER32: CreateIconIndirect\n");
1407#endif
1408 return O32_CreateIconIndirect(arg1);
1409}
1410//******************************************************************************
1411//******************************************************************************
1412HWND WIN32API CreateMDIWindowA(LPCSTR arg1, LPCSTR arg2, DWORD arg3,
1413 int arg4, int arg5, int arg6, int arg7,
1414 HWND arg8, HINSTANCE arg9, LPARAM arg10)
1415{
1416 HWND hwnd;
1417
1418#ifdef DEBUG
1419 WriteLog("USER32: CreateMDIWindowA\n");
1420#endif
1421 Win32WindowProc *window = new Win32WindowProc(arg9, arg1);
1422 hwnd = O32_CreateMDIWindow((LPSTR)arg1, (LPSTR)arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
1423 //SvL: 16-11-'97: window can be already destroyed if hwnd == 0
1424 if(hwnd == 0 && window != 0 && Win32WindowProc::FindWindowProc(window)) {
1425 delete(window);
1426 window = 0;
1427 }
1428
1429#ifdef DEBUG
1430 WriteLog("USER32: CreateMDIWindowA returned %X\n", hwnd);
1431#endif
1432 return hwnd;
1433}
1434//******************************************************************************
1435//******************************************************************************
1436HWND WIN32API CreateMDIWindowW(LPCWSTR arg1, LPCWSTR arg2, DWORD arg3, int arg4,
1437 int arg5, int arg6, int arg7, HWND arg8, HINSTANCE arg9,
1438 LPARAM arg10)
1439{
1440 HWND hwnd;
1441 char *astring1 = NULL, *astring2 = NULL;
1442 Win32WindowProc *window = NULL;
1443
1444 if((int)arg1 >> 16 != 0) {
1445 astring1 = UnicodeToAsciiString((LPWSTR)arg1);
1446 }
1447 else astring1 = (char *)arg2;
1448
1449 astring2 = UnicodeToAsciiString((LPWSTR)arg2);
1450
1451 //Classname might be name of system class, in which case we don't
1452 //need to use our own callback
1453// if(Win32WindowClass::FindClass((LPSTR)astring1) != NULL) {
1454 window = new Win32WindowProc(arg9, astring1);
1455// }
1456 hwnd = O32_CreateMDIWindow(astring1, astring2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
1457 //SvL: 16-11-'97: window can be already destroyed if hwnd == 0
1458 if(hwnd == 0 && window != 0 && Win32WindowProc::FindWindowProc(window)) {
1459 delete(window);
1460 window = 0;
1461 }
1462 if(window) {
1463 window->SetWindowHandle(hwnd);
1464 }
1465
1466 if(astring1) FreeAsciiString(astring1);
1467 FreeAsciiString(astring2);
1468#ifdef DEBUG
1469 WriteLog("USER32: CreateMDIWindowW hwnd = %X\n", hwnd);
1470#endif
1471 return(hwnd);
1472}
1473//******************************************************************************
1474//******************************************************************************
1475HWND WIN32API CreateWindowExW(DWORD arg1,
1476 LPCWSTR arg2,
1477 LPCWSTR arg3,
1478 DWORD dwStyle,
1479 int arg5,
1480 int arg6,
1481 int arg7,
1482 int arg8,
1483 HWND arg9,
1484 HMENU arg10,
1485 HINSTANCE arg11,
1486 PVOID arg12)
1487{
1488 HWND hwnd;
1489 char *astring1 = NULL,
1490 *astring2 = NULL;
1491 Win32WindowProc *window = NULL;
1492
1493 /* @@@PH 98/06/21 changed to call OS2CreateWindowExA */
1494 if((int)arg2 >> 16 != 0)
1495 astring1 = UnicodeToAsciiString((LPWSTR)arg2);
1496 else
1497 astring1 = (char *)arg2;
1498
1499 astring2 = UnicodeToAsciiString((LPWSTR)arg3);
1500
1501#ifdef DEBUG
1502 WriteLog("USER32: CreateWindowExW: dwExStyle = %X\n", arg1);
1503 if((int)arg2 >> 16 != 0)
1504 WriteLog("USER32: CreateWindow: classname = %s\n", astring1);
1505 else WriteLog("USER32: CreateWindow: classname = %X\n", arg2);
1506 WriteLog("USER32: CreateWindow: windowname= %s\n", astring2);
1507 WriteLog("USER32: CreateWindow: dwStyle = %X\n", dwStyle);
1508 WriteLog("USER32: CreateWindow: x = %d\n", arg5);
1509 WriteLog("USER32: CreateWindow: y = %d\n", arg6);
1510 WriteLog("USER32: CreateWindow: nWidth = %d\n", arg7);
1511 WriteLog("USER32: CreateWindow: nHeight = %d\n", arg8);
1512 WriteLog("USER32: CreateWindow: parent = %X\n", arg9);
1513 WriteLog("USER32: CreateWindow: hwmenu = %X\n", arg10);
1514 WriteLog("USER32: CreateWindow: hinstance = %X\n", arg11);
1515 WriteLog("USER32: CreateWindow: param = %X\n", arg12);
1516 #endif
1517
1518 hwnd = CreateWindowExA(arg1,
1519 astring1,
1520 astring2,
1521 dwStyle,
1522 arg5,
1523 arg6,
1524 arg7,
1525 arg8,
1526 arg9,
1527 arg10,
1528 arg11,
1529 arg12);
1530
1531 if(astring1)
1532 FreeAsciiString(astring1);
1533
1534 FreeAsciiString(astring2);
1535
1536#ifdef DEBUG
1537 WriteLog("USER32: ************CreateWindowExW hwnd = %X (%X)\n", hwnd, GetLastError());
1538#endif
1539 return(hwnd);
1540}
1541//******************************************************************************
1542//******************************************************************************
1543HDWP WIN32API DeferWindowPos( HDWP arg1, HWND arg2, HWND arg3, int arg4, int arg5, int arg6, int arg7, UINT arg8)
1544{
1545#ifdef DEBUG
1546 WriteLog("USER32: DeferWindowPos\n");
1547#endif
1548 return O32_DeferWindowPos(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
1549}
1550//******************************************************************************
1551//******************************************************************************
1552BOOL WIN32API DestroyAcceleratorTable( HACCEL arg1)
1553{
1554#ifdef DEBUG
1555 WriteLog("USER32: DestroyAcceleratorTable\n");
1556#endif
1557 return O32_DestroyAcceleratorTable(arg1);
1558}
1559//******************************************************************************
1560//******************************************************************************
1561BOOL WIN32API DestroyCaret(void)
1562{
1563#ifdef DEBUG
1564 WriteLog("USER32: DestroyCaret\n");
1565#endif
1566 return O32_DestroyCaret();
1567}
1568//******************************************************************************
1569//******************************************************************************
1570BOOL WIN32API DestroyCursor( HCURSOR arg1)
1571{
1572#ifdef DEBUG
1573 WriteLog("USER32: DestroyCursor\n");
1574#endif
1575 return O32_DestroyCursor(arg1);
1576}
1577//******************************************************************************
1578//******************************************************************************
1579BOOL WIN32API DestroyIcon( HICON arg1)
1580{
1581#ifdef DEBUG
1582 WriteLog("USER32: DestroyIcon\n");
1583#endif
1584 return O32_DestroyIcon(arg1);
1585}
1586//******************************************************************************
1587//******************************************************************************
1588LONG WIN32API DispatchMessageW( const MSG * arg1)
1589{
1590#ifdef DEBUG
1591 WriteLog("USER32: DispatchMessageW\n");
1592#endif
1593 // NOTE: This will not work as is (needs UNICODE support)
1594 return O32_DispatchMessage(arg1);
1595}
1596//******************************************************************************
1597//******************************************************************************
1598int WIN32API DlgDirListA( HWND arg1, LPSTR arg2, int arg3, int arg4, UINT arg5)
1599{
1600#ifdef DEBUG
1601 WriteLog("USER32: DlgDirListA\n");
1602#endif
1603 return O32_DlgDirList(arg1, arg2, arg3, arg4, arg5);
1604}
1605//******************************************************************************
1606//******************************************************************************
1607int WIN32API DlgDirListComboBoxA( HWND arg1, LPSTR arg2, int arg3, int arg4, UINT arg5)
1608{
1609#ifdef DEBUG
1610 WriteLog("USER32: DlgDirListComboBoxA\n");
1611#endif
1612 return O32_DlgDirListComboBox(arg1, arg2, arg3, arg4, arg5);
1613}
1614//******************************************************************************
1615//******************************************************************************
1616int WIN32API DlgDirListComboBoxW( HWND arg1, LPWSTR arg2, int arg3, int arg4, UINT arg5)
1617{
1618#ifdef DEBUG
1619 WriteLog("USER32: DlgDirListComboBoxW NOT WORKING\n");
1620#endif
1621 // NOTE: This will not work as is (needs UNICODE support)
1622 return 0;
1623// return O32_DlgDirListComboBox(arg1, arg2, arg3, arg4, arg5);
1624}
1625//******************************************************************************
1626//******************************************************************************
1627int WIN32API DlgDirListW( HWND arg1, LPWSTR arg2, int arg3, int arg4, UINT arg5)
1628{
1629#ifdef DEBUG
1630 WriteLog("USER32: DlgDirListW NOT WORKING\n");
1631#endif
1632 // NOTE: This will not work as is (needs UNICODE support)
1633 return 0;
1634// return O32_DlgDirList(arg1, arg2, arg3, arg4, arg5);
1635}
1636//******************************************************************************
1637//******************************************************************************
1638BOOL WIN32API DlgDirSelectComboBoxExA( HWND arg1, LPSTR arg2, int arg3, int arg4)
1639{
1640#ifdef DEBUG
1641 WriteLog("USER32: DlgDirSelectComboBoxExA\n");
1642#endif
1643 return O32_DlgDirSelectComboBoxEx(arg1, arg2, arg3, arg4);
1644}
1645//******************************************************************************
1646//******************************************************************************
1647BOOL WIN32API DlgDirSelectComboBoxExW( HWND arg1, LPWSTR arg2, int arg3, int arg4)
1648{
1649#ifdef DEBUG
1650 WriteLog("USER32: DlgDirSelectComboBoxExW NOT WORKING\n");
1651#endif
1652 // NOTE: This will not work as is (needs UNICODE support)
1653 return 0;
1654// return O32_DlgDirSelectComboBoxEx(arg1, arg2, arg3, arg4);
1655}
1656//******************************************************************************
1657//******************************************************************************
1658BOOL WIN32API DlgDirSelectExA( HWND arg1, LPSTR arg2, int arg3, int arg4)
1659{
1660#ifdef DEBUG
1661 WriteLog("USER32: DlgDirSelectExA\n");
1662#endif
1663 return O32_DlgDirSelectEx(arg1, arg2, arg3, arg4);
1664}
1665//******************************************************************************
1666//******************************************************************************
1667BOOL WIN32API DlgDirSelectExW( HWND arg1, LPWSTR arg2, int arg3, int arg4)
1668{
1669#ifdef DEBUG
1670 WriteLog("USER32: DlgDirSelectExW NOT WORKING\n");
1671#endif
1672 // NOTE: This will not work as is (needs UNICODE support)
1673 return 0;
1674// return O32_DlgDirSelectEx(arg1, arg2, arg3, arg4);
1675}
1676//******************************************************************************
1677//******************************************************************************
1678BOOL WIN32API DrawFocusRect( HDC arg1, const RECT * arg2)
1679{
1680#ifdef DEBUG
1681 WriteLog("USER32: DrawFocusRect\n");
1682#endif
1683 return O32_DrawFocusRect(arg1, arg2);
1684}
1685//******************************************************************************
1686//******************************************************************************
1687BOOL WIN32API DrawIcon( HDC arg1, int arg2, int arg3, HICON arg4)
1688{
1689#ifdef DEBUG
1690 WriteLog("USER32: DrawIcon\n");
1691#endif
1692 return O32_DrawIcon(arg1, arg2, arg3, arg4);
1693}
1694//******************************************************************************
1695//******************************************************************************
1696BOOL WIN32API DrawIconEx(HDC hdc, int xLeft, int xRight, HICON hIcon,
1697 int cxWidth, int cyWidth, UINT istepIfAniCur,
1698 HBRUSH hbrFlickerFreeDraw, UINT diFlags)
1699{
1700#ifdef DEBUG
1701 WriteLog("USER32: DrawIcon, partially implemented\n");
1702#endif
1703 return O32_DrawIcon(hdc, xLeft, xRight, hIcon);
1704}
1705//******************************************************************************
1706//******************************************************************************
1707BOOL WIN32API DrawMenuBar( HWND arg1)
1708{
1709#ifdef DEBUG
1710 WriteLog("USER32: DrawMenuBar\n");
1711#endif
1712 return O32_DrawMenuBar(arg1);
1713}
1714//******************************************************************************
1715//******************************************************************************
1716int WIN32API DrawTextW( HDC arg1, LPCWSTR arg2, int arg3, PRECT arg4, UINT arg5)
1717{
1718 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
1719 int rc;
1720
1721#ifdef DEBUG
1722 WriteLog("USER32: DrawTextW %s\n", astring);
1723#endif
1724 rc = O32_DrawText(arg1, astring, arg3, arg4, arg5);
1725 FreeAsciiString(astring);
1726 return(rc);
1727}
1728//******************************************************************************
1729//******************************************************************************
1730int WIN32API DrawTextExW(HDC arg1, LPCWSTR arg2, int arg3, PRECT arg4, UINT arg5, LPDRAWTEXTPARAMS lpDTParams)
1731{
1732 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
1733 int rc;
1734
1735#ifdef DEBUG
1736 WriteLog("USER32: DrawTextExW (not completely supported) %s\n", astring);
1737#endif
1738 rc = O32_DrawText(arg1, astring, arg3, arg4, arg5);
1739 FreeAsciiString(astring);
1740 return(rc);
1741}
1742//******************************************************************************
1743//******************************************************************************
1744BOOL WIN32API EmptyClipboard(void)
1745{
1746#ifdef DEBUG
1747 WriteLog("USER32: EmptyClipboard\n");
1748#endif
1749 return O32_EmptyClipboard();
1750}
1751//******************************************************************************
1752//******************************************************************************
1753BOOL WIN32API EndDeferWindowPos( HDWP arg1)
1754{
1755#ifdef DEBUG
1756 WriteLog("USER32: EndDeferWindowPos\n");
1757#endif
1758 return O32_EndDeferWindowPos(arg1);
1759}
1760//******************************************************************************
1761//******************************************************************************
1762BOOL WIN32API EnumChildWindows(HWND hwnd, WNDENUMPROC lpfn, LPARAM lParam)
1763{
1764 BOOL rc;
1765 EnumWindowCallback *callback = new EnumWindowCallback(lpfn, lParam);
1766
1767#ifdef DEBUG
1768 WriteLog("USER32: EnumChildWindows\n");
1769#endif
1770 rc = O32_EnumChildWindows(hwnd, callback->GetOS2Callback(), (LPARAM)callback);
1771 if(callback)
1772 delete callback;
1773 return(rc);
1774}
1775//******************************************************************************
1776//******************************************************************************
1777UINT WIN32API EnumClipboardFormats(UINT arg1)
1778{
1779#ifdef DEBUG
1780 WriteLog("USER32: EnumClipboardFormats\n");
1781#endif
1782 return O32_EnumClipboardFormats(arg1);
1783}
1784//******************************************************************************
1785//******************************************************************************
1786int WIN32API EnumPropsA(HWND arg1, PROPENUMPROCA arg2)
1787{
1788#ifdef DEBUG
1789 WriteLog("USER32: EnumPropsA DOES NOT WORK\n");
1790#endif
1791 //calling convention problems
1792 return 0;
1793// return O32_EnumProps(arg1, (PROPENUMPROC_O32)arg2);
1794}
1795//******************************************************************************
1796//******************************************************************************
1797int WIN32API EnumPropsExA( HWND arg1, PROPENUMPROCEXA arg2, LPARAM arg3)
1798{
1799#ifdef DEBUG
1800 WriteLog("USER32: EnumPropsExA DOES NOT WORK\n");
1801#endif
1802 //calling convention problems
1803 return 0;
1804// return O32_EnumPropsEx(arg1, arg2, (PROPENUMPROCEX_O32)arg3);
1805}
1806//******************************************************************************
1807//******************************************************************************
1808int WIN32API EnumPropsExW( HWND arg1, PROPENUMPROCEXW arg2, LPARAM arg3)
1809{
1810#ifdef DEBUG
1811 WriteLog("USER32: EnumPropsExW\n");
1812#endif
1813 // NOTE: This will not work as is (needs UNICODE support)
1814 //calling convention problems
1815 return 0;
1816// return O32_EnumPropsEx(arg1, arg2, arg3);
1817}
1818//******************************************************************************
1819//******************************************************************************
1820int WIN32API EnumPropsW( HWND arg1, PROPENUMPROCW arg2)
1821{
1822#ifdef DEBUG
1823 WriteLog("USER32: EnumPropsW\n");
1824#endif
1825 // NOTE: This will not work as is (needs UNICODE support)
1826 //calling convention problems
1827 return 0;
1828// return O32_EnumProps(arg1, arg2);
1829}
1830//******************************************************************************
1831//******************************************************************************
1832BOOL WIN32API EnumWindows(WNDENUMPROC lpfn, LPARAM lParam)
1833{
1834 BOOL rc;
1835 EnumWindowCallback *callback = new EnumWindowCallback(lpfn, lParam);
1836
1837#ifdef DEBUG
1838 WriteLog("USER32: EnumWindows\n");
1839#endif
1840 rc = O32_EnumWindows(callback->GetOS2Callback(), (LPARAM)callback);
1841 if(callback)
1842 delete callback;
1843 return(rc);
1844}
1845//******************************************************************************
1846//******************************************************************************
1847BOOL WIN32API EqualRect( const RECT * arg1, const RECT * arg2)
1848{
1849#ifdef DEBUG
1850 WriteLog("USER32: EqualRect\n");
1851#endif
1852 return O32_EqualRect(arg1, arg2);
1853}
1854//******************************************************************************
1855//******************************************************************************
1856BOOL WIN32API ExcludeUpdateRgn( HDC arg1, HWND arg2)
1857{
1858#ifdef DEBUG
1859 WriteLog("USER32: ExcludeUpdateRgn\n");
1860#endif
1861 return O32_ExcludeUpdateRgn(arg1, arg2);
1862}
1863//******************************************************************************
1864//******************************************************************************
1865BOOL WIN32API ExitWindowsEx( UINT arg1, DWORD arg2)
1866{
1867#ifdef DEBUG
1868 WriteLog("USER32: ExitWindowsEx\n");
1869#endif
1870 return O32_ExitWindowsEx(arg1, arg2);
1871}
1872//******************************************************************************
1873//******************************************************************************
1874int WIN32API FillRect(HDC arg1, const RECT * arg2, HBRUSH arg3)
1875{
1876#ifdef DEBUG
1877 WriteLog("USER32: FillRect (%d,%d)(%d,%d) brush %X\n", arg2->left, arg2->top, arg2->right, arg2->bottom, arg3);
1878#endif
1879 return O32_FillRect(arg1, arg2, arg3);
1880}
1881//******************************************************************************
1882//******************************************************************************
1883HWND WIN32API FindWindowW( LPCWSTR arg1, LPCWSTR arg2)
1884{
1885 char *astring1 = UnicodeToAsciiString((LPWSTR)arg1);
1886 char *astring2 = UnicodeToAsciiString((LPWSTR)arg2);
1887 HWND rc;
1888
1889#ifdef DEBUG
1890 WriteLog("USER32: FindWindowW\n");
1891#endif
1892 rc = O32_FindWindow(astring1, astring2);
1893 FreeAsciiString(astring1);
1894 FreeAsciiString(astring2);
1895 return rc;
1896}
1897//******************************************************************************
1898//******************************************************************************
1899int WIN32API FrameRect( HDC arg1, const RECT * arg2, HBRUSH arg3)
1900{
1901#ifdef DEBUG
1902 WriteLog("USER32: FrameRect\n");
1903#endif
1904 return O32_FrameRect(arg1, arg2, arg3);
1905}
1906//******************************************************************************
1907//******************************************************************************
1908HWND WIN32API GetCapture(void)
1909{
1910#ifdef DEBUG
1911 WriteLog("USER32: GetCapture\n");
1912#endif
1913 return O32_GetCapture();
1914}
1915//******************************************************************************
1916//******************************************************************************
1917UINT WIN32API GetCaretBlinkTime(void)
1918{
1919#ifdef DEBUG
1920 WriteLog("USER32: GetCaretBlinkTime\n");
1921#endif
1922 return O32_GetCaretBlinkTime();
1923}
1924//******************************************************************************
1925//******************************************************************************
1926BOOL WIN32API GetCaretPos( PPOINT arg1)
1927{
1928#ifdef DEBUG
1929 WriteLog("USER32: GetCaretPos\n");
1930#endif
1931 return O32_GetCaretPos(arg1);
1932}
1933//******************************************************************************
1934//******************************************************************************
1935BOOL WIN32API GetClipCursor( PRECT arg1)
1936{
1937#ifdef DEBUG
1938 WriteLog("USER32: GetClipCursor\n");
1939#endif
1940 return O32_GetClipCursor(arg1);
1941}
1942//******************************************************************************
1943//******************************************************************************
1944HANDLE WIN32API GetClipboardData( UINT arg1)
1945{
1946#ifdef DEBUG
1947 WriteLog("USER32: GetClipboardData\n");
1948#endif
1949 return O32_GetClipboardData(arg1);
1950}
1951//******************************************************************************
1952//******************************************************************************
1953int WIN32API GetClipboardFormatNameA( UINT arg1, LPSTR arg2, int arg3)
1954{
1955#ifdef DEBUG
1956 WriteLog("USER32: GetClipboardFormatNameA %s\n", arg2);
1957#endif
1958 return O32_GetClipboardFormatName(arg1, arg2, arg3);
1959}
1960//******************************************************************************
1961//******************************************************************************
1962int WIN32API GetClipboardFormatNameW(UINT arg1, LPWSTR arg2, int arg3)
1963{
1964 int rc;
1965 char *astring = UnicodeToAsciiString(arg2);
1966
1967#ifdef DEBUG
1968 WriteLog("USER32: GetClipboardFormatNameW %s\n", astring);
1969#endif
1970 rc = O32_GetClipboardFormatName(arg1, astring, arg3);
1971 FreeAsciiString(astring);
1972 return(rc);
1973}
1974//******************************************************************************
1975//******************************************************************************
1976HWND WIN32API GetClipboardOwner(void)
1977{
1978#ifdef DEBUG
1979 WriteLog("USER32: GetClipboardOwner\n");
1980#endif
1981 return O32_GetClipboardOwner();
1982}
1983//******************************************************************************
1984//******************************************************************************
1985HWND WIN32API GetClipboardViewer(void)
1986{
1987#ifdef DEBUG
1988 WriteLog("USER32: GetClipboardViewer\n");
1989#endif
1990 return O32_GetClipboardViewer();
1991}
1992//******************************************************************************
1993//******************************************************************************
1994DWORD WIN32API GetDialogBaseUnits(void)
1995{
1996#ifdef DEBUG
1997 WriteLog("USER32: GetDialogBaseUnits\n");
1998#endif
1999 return O32_GetDialogBaseUnits();
2000}
2001//******************************************************************************
2002//******************************************************************************
2003UINT WIN32API GetDlgItemInt( HWND arg1, int arg2, PBOOL arg3, BOOL arg4)
2004{
2005#ifdef DEBUG
2006 WriteLog("USER32: GetDlgItemInt\n");
2007#endif
2008 return O32_GetDlgItemInt(arg1, arg2, arg3, arg4);
2009}
2010
2011
2012/*****************************************************************************
2013 * Name : UINT WIN32API GetDlgItemTextW
2014 * Purpose : Determine the text of a window control
2015 * Parameters: HWND arg1
2016 * int arg2
2017 * LPWSTR arg3
2018 * UINT arg4
2019 * Variables :
2020 * Result :
2021 * Remark :
2022 * Status : UNTESTED UNKNOWN STUB
2023 *
2024 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2025 *****************************************************************************/
2026
2027UINT WIN32API GetDlgItemTextW(HWND arg1,
2028 int arg2,
2029 LPWSTR arg3,
2030 UINT arg4)
2031{
2032 LPSTR lpBuffer; /* temporary buffer for the ascii result */
2033 UINT uiResult; /* return value of the ascii variant */
2034
2035 dprintf(("USER32: GetDlgItemTextW(%08xh,%08xh,%08xh,%08xh)\n",
2036 arg1,
2037 arg2,
2038 arg3,
2039 arg4));
2040
2041
2042 lpBuffer = (LPSTR)malloc(arg4); /* allocate temporary buffer */
2043 uiResult = GetDlgItemTextA(arg1, /* call ascii variant */
2044 arg2,
2045 lpBuffer,
2046 arg4);
2047
2048 AsciiToUnicodeN(lpBuffer, /* now convert result to unicode */
2049 arg3,
2050 arg4);
2051
2052 free(lpBuffer); /* free the temporary buffer */
2053
2054 return (uiResult); /* OK, that's it */
2055}
2056
2057
2058//******************************************************************************
2059//******************************************************************************
2060UINT WIN32API GetDoubleClickTime(void)
2061{
2062#ifdef DEBUG
2063 WriteLog("USER32: GetDoubleClickTime\n");
2064#endif
2065 return O32_GetDoubleClickTime();
2066}
2067//******************************************************************************
2068//******************************************************************************
2069HWND WIN32API GetForegroundWindow(void)
2070{
2071#ifdef DEBUG
2072 WriteLog("USER32: GetForegroundWindow\n");
2073#endif
2074 return O32_GetForegroundWindow();
2075}
2076//******************************************************************************
2077//******************************************************************************
2078BOOL WIN32API GetIconInfo( HICON arg1, LPICONINFO arg2)
2079{
2080#ifdef DEBUG
2081 WriteLog("USER32: GetIconInfo\n");
2082#endif
2083 return O32_GetIconInfo(arg1, arg2);
2084}
2085//******************************************************************************
2086//******************************************************************************
2087int WIN32API GetKeyNameTextA( LPARAM arg1, LPSTR arg2, int arg3)
2088{
2089#ifdef DEBUG
2090 WriteLog("USER32: GetKeyNameTextA\n");
2091#endif
2092 return O32_GetKeyNameText(arg1, arg2, arg3);
2093}
2094//******************************************************************************
2095//******************************************************************************
2096int WIN32API GetKeyNameTextW( LPARAM arg1, LPWSTR arg2, int arg3)
2097{
2098#ifdef DEBUG
2099 WriteLog("USER32: GetKeyNameTextW DOES NOT WORK\n");
2100#endif
2101 // NOTE: This will not work as is (needs UNICODE support)
2102 return 0;
2103// return O32_GetKeyNameText(arg1, arg2, arg3);
2104}
2105//******************************************************************************
2106//******************************************************************************
2107int WIN32API GetKeyboardType( int arg1)
2108{
2109#ifdef DEBUG
2110 WriteLog("USER32: GetKeyboardType\n");
2111#endif
2112 return O32_GetKeyboardType(arg1);
2113}
2114//******************************************************************************
2115//******************************************************************************
2116HWND WIN32API GetLastActivePopup( HWND arg1)
2117{
2118#ifdef DEBUG
2119 WriteLog("USER32: GetLastActivePopup\n");
2120#endif
2121 return O32_GetLastActivePopup(arg1);
2122}
2123//******************************************************************************
2124//******************************************************************************
2125LONG WIN32API GetMessageExtraInfo(void)
2126{
2127 dprintf(("USER32: GetMessageExtraInfo\n"));
2128 return O32_GetMessageExtraInfo();
2129}
2130//******************************************************************************
2131//******************************************************************************
2132DWORD WIN32API GetMessagePos(void)
2133{
2134 dprintf(("USER32: GetMessagePos\n"));
2135 return O32_GetMessagePos();
2136}
2137//******************************************************************************
2138//******************************************************************************
2139LONG WIN32API GetMessageTime(void)
2140{
2141 dprintf(("USER32: GetMessageTime\n"));
2142 return O32_GetMessageTime();
2143}
2144//******************************************************************************
2145//******************************************************************************
2146BOOL WIN32API GetMessageW(LPMSG arg1, HWND arg2, UINT arg3, UINT arg4)
2147{
2148 BOOL rc;
2149
2150 // NOTE: This will not work as is (needs UNICODE support)
2151 rc = O32_GetMessage(arg1, arg2, arg3, arg4);
2152 dprintf(("USER32: GetMessageW %X returned %d\n", arg2, rc));
2153 return(rc);
2154}
2155//******************************************************************************
2156//******************************************************************************
2157HWND WIN32API GetNextDlgGroupItem( HWND arg1, HWND arg2, BOOL arg3)
2158{
2159#ifdef DEBUG
2160 WriteLog("USER32: GetNextDlgGroupItem\n");
2161#endif
2162 return O32_GetNextDlgGroupItem(arg1, arg2, arg3);
2163}
2164//******************************************************************************
2165//******************************************************************************
2166HWND WIN32API GetOpenClipboardWindow(void)
2167{
2168#ifdef DEBUG
2169 WriteLog("USER32: GetOpenClipboardWindow\n");
2170#endif
2171 return O32_GetOpenClipboardWindow();
2172}
2173//******************************************************************************
2174//******************************************************************************
2175HWND WIN32API GetParent( HWND arg1)
2176{
2177#ifdef DEBUG
2178//// WriteLog("USER32: GetParent\n");
2179#endif
2180 return O32_GetParent(arg1);
2181}
2182//******************************************************************************
2183//******************************************************************************
2184int WIN32API GetPriorityClipboardFormat( PUINT arg1, int arg2)
2185{
2186#ifdef DEBUG
2187 WriteLog("USER32: GetPriorityClipboardFormat\n");
2188#endif
2189 return O32_GetPriorityClipboardFormat(arg1, arg2);
2190}
2191//******************************************************************************
2192//******************************************************************************
2193HANDLE WIN32API GetPropA( HWND arg1, LPCSTR arg2)
2194{
2195#ifdef DEBUG
2196 if((int)arg2 >> 16 != 0)
2197 WriteLog("USER32: GetPropA %s\n", arg2);
2198 else WriteLog("USER32: GetPropA %X\n", arg2);
2199#endif
2200 return O32_GetProp(arg1, arg2);
2201}
2202//******************************************************************************
2203//******************************************************************************
2204HANDLE WIN32API GetPropW(HWND arg1, LPCWSTR arg2)
2205{
2206 BOOL handle;
2207 char *astring;
2208
2209 if((int)arg2 >> 16 != 0)
2210 astring = UnicodeToAsciiString((LPWSTR)arg2);
2211 else astring = (char *)arg2;
2212#ifdef DEBUG
2213 if((int)arg2 >> 16 != 0)
2214 WriteLog("USER32: GetPropW %s\n", astring);
2215 else WriteLog("USER32: GetPropW %X\n", astring);
2216#endif
2217 handle = GetPropA(arg1, (LPCSTR)astring);
2218 if((int)arg2 >> 16 != 0)
2219 FreeAsciiString(astring);
2220
2221 return(handle);
2222}
2223//******************************************************************************
2224//******************************************************************************
2225DWORD WIN32API GetQueueStatus( UINT arg1)
2226{
2227#ifdef DEBUG
2228 WriteLog("USER32: GetQueueStatus\n");
2229#endif
2230 return O32_GetQueueStatus(arg1);
2231}
2232//******************************************************************************
2233//******************************************************************************
2234int WIN32API GetScrollPos(HWND hwnd, int fnBar)
2235{
2236 int pos;
2237
2238 pos = O32_GetScrollPos(hwnd, fnBar);
2239#ifdef DEBUG
2240 WriteLog("USER32: GetScrollPos of %X type %d returned %d\n", hwnd, fnBar, pos);
2241#endif
2242 return(pos);
2243}
2244//******************************************************************************
2245//******************************************************************************
2246BOOL WIN32API GetScrollRange( HWND arg1, int arg2, int * arg3, int * arg4)
2247{
2248#ifdef DEBUG
2249 WriteLog("USER32: GetScrollRange\n");
2250#endif
2251 return O32_GetScrollRange(arg1, arg2, arg3, arg4);
2252}
2253//******************************************************************************
2254//******************************************************************************
2255DWORD WIN32API GetTabbedTextExtentA( HDC arg1, LPCSTR arg2, int arg3, int arg4, int * arg5)
2256{
2257#ifdef DEBUG
2258 WriteLog("USER32: GetTabbedTextExtentA\n");
2259#endif
2260 return O32_GetTabbedTextExtent(arg1, arg2, arg3, arg4, arg5);
2261}
2262//******************************************************************************
2263//******************************************************************************
2264DWORD WIN32API GetTabbedTextExtentW( HDC arg1, LPCWSTR arg2, int arg3, int arg4, int * arg5)
2265{
2266 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
2267 DWORD rc;
2268
2269#ifdef DEBUG
2270 WriteLog("USER32: GetTabbedTextExtentW\n");
2271#endif
2272 rc = O32_GetTabbedTextExtent(arg1, astring, arg3, arg4, arg5);
2273 FreeAsciiString(astring);
2274 return rc;
2275}
2276//******************************************************************************
2277//******************************************************************************
2278HWND WIN32API GetTopWindow( HWND arg1)
2279{
2280#ifdef DEBUG
2281//// WriteLog("USER32: GetTopWindow\n");
2282#endif
2283 return O32_GetTopWindow(arg1);
2284}
2285//******************************************************************************
2286//******************************************************************************
2287int WIN32API GetUpdateRgn( HWND arg1, HRGN arg2, BOOL arg3)
2288{
2289#ifdef DEBUG
2290 WriteLog("USER32: GetUpdateRgn\n");
2291#endif
2292 return O32_GetUpdateRgn(arg1, arg2, arg3);
2293}
2294//******************************************************************************
2295//******************************************************************************
2296BOOL WIN32API GetWindowPlacement( HWND arg1, LPWINDOWPLACEMENT arg2)
2297{
2298#ifdef DEBUG
2299 WriteLog("USER32: GetWindowPlacement\n");
2300#endif
2301 return O32_GetWindowPlacement(arg1, arg2);
2302}
2303//******************************************************************************
2304
2305/***********************************************************************
2306 * GetInternalWindowPos (USER32.245)
2307 */
2308UINT WIN32API GetInternalWindowPos(HWND hwnd,
2309 LPRECT rectWnd,
2310 LPPOINT ptIcon )
2311{
2312 WINDOWPLACEMENT wndpl;
2313
2314 dprintf(("USER32: GetInternalWindowPos(%08xh,%08xh,%08xh)\n",
2315 hwnd,
2316 rectWnd,
2317 ptIcon));
2318
2319 if (O32_GetWindowPlacement( hwnd, &wndpl ))
2320 {
2321 if (rectWnd) *rectWnd = wndpl.rcNormalPosition;
2322 if (ptIcon) *ptIcon = wndpl.ptMinPosition;
2323 return wndpl.showCmd;
2324 }
2325 return 0;
2326}
2327
2328
2329//******************************************************************************
2330int WIN32API GetWindowTextLengthW( HWND arg1)
2331{
2332#ifdef DEBUG
2333 WriteLog("USER32: GetWindowTextLengthW\n");
2334#endif
2335 return O32_GetWindowTextLength(arg1);
2336}
2337//******************************************************************************
2338//******************************************************************************
2339int WIN32API GetWindowTextW(HWND hwnd, LPWSTR lpsz, int cch)
2340{
2341 char title[128];
2342 int rc;
2343
2344 rc = O32_GetWindowText(hwnd, title, sizeof(title));
2345#ifdef DEBUG
2346 WriteLog("USER32: GetWindowTextW returned %s\n", title);
2347#endif
2348 if(rc > cch) {
2349 title[cch-1] = 0;
2350 rc = cch;
2351 }
2352 AsciiToUnicode(title, lpsz);
2353 return(rc);
2354}
2355//******************************************************************************
2356//******************************************************************************
2357DWORD WIN32API GetWindowThreadProcessId(HWND arg1, PDWORD arg2)
2358{
2359#ifdef DEBUG
2360 WriteLog("USER32: GetWindowThreadProcessId\n");
2361#endif
2362 return O32_GetWindowThreadProcessId(arg1, arg2);
2363}
2364//******************************************************************************
2365//******************************************************************************
2366BOOL WIN32API HideCaret( HWND arg1)
2367{
2368#ifdef DEBUG
2369 WriteLog("USER32: HideCaret\n");
2370#endif
2371 return O32_HideCaret(arg1);
2372}
2373//******************************************************************************
2374//******************************************************************************
2375BOOL WIN32API InSendMessage(void)
2376{
2377#ifdef DEBUG
2378 WriteLog("USER32: InSendMessage\n");
2379#endif
2380 return O32_InSendMessage();
2381}
2382//******************************************************************************
2383//******************************************************************************
2384BOOL WIN32API IntersectRect( PRECT arg1, const RECT * arg2, const RECT * arg3)
2385{
2386#ifdef DEBUG
2387//// WriteLog("USER32: IntersectRect\n");
2388#endif
2389 return O32_IntersectRect(arg1, arg2, arg3);
2390}
2391//******************************************************************************
2392//******************************************************************************
2393BOOL WIN32API InvalidateRgn( HWND arg1, HRGN arg2, BOOL arg3)
2394{
2395#ifdef DEBUG
2396 WriteLog("USER32: InvalidateRgn\n");
2397#endif
2398 return O32_InvalidateRgn(arg1, arg2, arg3);
2399}
2400//******************************************************************************
2401//******************************************************************************
2402BOOL WIN32API InvertRect( HDC arg1, const RECT * arg2)
2403{
2404#ifdef DEBUG
2405 WriteLog("USER32: InvertRect\n");
2406#endif
2407 return O32_InvertRect(arg1, arg2);
2408}
2409//******************************************************************************
2410//******************************************************************************
2411BOOL WIN32API IsChild( HWND arg1, HWND arg2)
2412{
2413#ifdef DEBUG
2414 WriteLog("USER32: IsChild\n");
2415#endif
2416 return O32_IsChild(arg1, arg2);
2417}
2418//******************************************************************************
2419//******************************************************************************
2420BOOL WIN32API IsClipboardFormatAvailable( UINT arg1)
2421{
2422#ifdef DEBUG
2423 WriteLog("USER32: IsClipboardFormatAvailable\n");
2424#endif
2425 return O32_IsClipboardFormatAvailable(arg1);
2426}
2427//******************************************************************************
2428//******************************************************************************
2429BOOL WIN32API IsDialogMessageW( HWND arg1, LPMSG arg2)
2430{
2431#ifdef DEBUG
2432 WriteLog("USER32: IsDialogMessageW\n");
2433#endif
2434 // NOTE: This will not work as is (needs UNICODE support)
2435 return O32_IsDialogMessage(arg1, arg2);
2436}
2437//******************************************************************************
2438//******************************************************************************
2439BOOL WIN32API IsRectEmpty( const RECT * arg1)
2440{
2441#ifdef DEBUG
2442 WriteLog("USER32: IsRectEmpty\n");
2443#endif
2444 return O32_IsRectEmpty(arg1);
2445}
2446//******************************************************************************
2447//******************************************************************************
2448BOOL WIN32API IsWindow( HWND arg1)
2449{
2450#ifdef DEBUG
2451 WriteLog("USER32: IsWindow\n");
2452#endif
2453 return O32_IsWindow(arg1);
2454}
2455//******************************************************************************
2456//******************************************************************************
2457BOOL WIN32API IsWindowEnabled( HWND arg1)
2458{
2459#ifdef DEBUG
2460 WriteLog("USER32: IsWindowEnabled\n");
2461#endif
2462 return O32_IsWindowEnabled(arg1);
2463}
2464//******************************************************************************
2465//******************************************************************************
2466BOOL WIN32API IsWindowVisible( HWND arg1)
2467{
2468#ifdef DEBUG
2469 WriteLog("USER32: IsWindowVisible\n");
2470#endif
2471 return O32_IsWindowVisible(arg1);
2472}
2473//******************************************************************************
2474//******************************************************************************
2475BOOL WIN32API IsZoomed( HWND arg1)
2476{
2477#ifdef DEBUG
2478 WriteLog("USER32: IsZoomed\n");
2479#endif
2480 return O32_IsZoomed(arg1);
2481}
2482//******************************************************************************
2483//******************************************************************************
2484BOOL WIN32API LockWindowUpdate( HWND arg1)
2485{
2486#ifdef DEBUG
2487 WriteLog("USER32: LockWindowUpdate\n");
2488#endif
2489 return O32_LockWindowUpdate(arg1);
2490}
2491//******************************************************************************
2492//******************************************************************************
2493BOOL WIN32API MapDialogRect( HWND arg1, PRECT arg2)
2494{
2495#ifdef DEBUG
2496 WriteLog("USER32: MapDialogRect\n");
2497#endif
2498 return O32_MapDialogRect(arg1, arg2);
2499}
2500//******************************************************************************
2501//******************************************************************************
2502UINT WIN32API MapVirtualKeyA( UINT arg1, UINT arg2)
2503{
2504#ifdef DEBUG
2505 WriteLog("USER32: MapVirtualKeyA\n");
2506#endif
2507 return O32_MapVirtualKey(arg1, arg2);
2508}
2509//******************************************************************************
2510//******************************************************************************
2511UINT WIN32API MapVirtualKeyW( UINT arg1, UINT arg2)
2512{
2513#ifdef DEBUG
2514 WriteLog("USER32: MapVirtualKeyW\n");
2515#endif
2516 // NOTE: This will not work as is (needs UNICODE support)
2517 return O32_MapVirtualKey(arg1, arg2);
2518}
2519//******************************************************************************
2520//******************************************************************************
2521int WIN32API MapWindowPoints( HWND arg1, HWND arg2, LPPOINT arg3, UINT arg4)
2522{
2523#ifdef DEBUG
2524 WriteLog("USER32: MapWindowPoints\n");
2525#endif
2526 return O32_MapWindowPoints(arg1, arg2, arg3, arg4);
2527}
2528//******************************************************************************
2529//******************************************************************************
2530int WIN32API MessageBoxW(HWND arg1, LPCWSTR arg2, LPCWSTR arg3, UINT arg4)
2531{
2532 char *astring1, *astring2;
2533 int rc;
2534
2535 astring1 = UnicodeToAsciiString((LPWSTR)arg2);
2536 astring2 = UnicodeToAsciiString((LPWSTR)arg3);
2537#ifdef DEBUG
2538 WriteLog("USER32: MessageBoxW %s %s\n", astring1, astring2);
2539#endif
2540 rc = O32_MessageBox(arg1, astring1, astring2, arg4);
2541 FreeAsciiString(astring1);
2542 FreeAsciiString(astring2);
2543 return(rc);
2544}
2545//******************************************************************************
2546//******************************************************************************
2547BOOL WIN32API OpenClipboard( HWND arg1)
2548{
2549#ifdef DEBUG
2550 WriteLog("USER32: OpenClipboard\n");
2551#endif
2552 return O32_OpenClipboard(arg1);
2553}
2554//******************************************************************************
2555//******************************************************************************
2556BOOL WIN32API PeekMessageW( LPMSG arg1, HWND arg2, UINT arg3, UINT arg4, UINT arg5)
2557{
2558#ifdef DEBUG
2559 WriteLog("USER32: PeekMessageW\n");
2560#endif
2561 // NOTE: This will not work as is (needs UNICODE support)
2562 return O32_PeekMessage(arg1, arg2, arg3, arg4, arg5);
2563}
2564//******************************************************************************
2565//******************************************************************************
2566// NOTE: Open32 function doesn't have the 'W'.
2567BOOL WIN32API PostMessageW( HWND arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
2568{
2569#ifdef DEBUG
2570 WriteLog("USER32: PostMessageW\n");
2571#endif
2572 // NOTE: This will not work as is (needs UNICODE support)
2573 return O32_PostMessage(arg1, arg2, arg3, arg4);
2574}
2575//******************************************************************************
2576//******************************************************************************
2577BOOL WIN32API PostThreadMessageA( DWORD arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
2578{
2579#ifdef DEBUG
2580 WriteLog("USER32: PostThreadMessageA\n");
2581#endif
2582 return O32_PostThreadMessage(arg1, arg2, arg3, arg4);
2583}
2584//******************************************************************************
2585//******************************************************************************
2586BOOL WIN32API PostThreadMessageW( DWORD arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
2587{
2588#ifdef DEBUG
2589 WriteLog("USER32: PostThreadMessageW\n");
2590#endif
2591 // NOTE: This will not work as is (needs UNICODE support)
2592 return O32_PostThreadMessage(arg1, arg2, arg3, arg4);
2593}
2594//******************************************************************************
2595//******************************************************************************
2596BOOL WIN32API PtInRect( const RECT * arg1, POINT arg2)
2597{
2598#ifdef DEBUG1
2599 WriteLog("USER32: PtInRect\n");
2600#endif
2601 return O32_PtInRect(arg1, arg2);
2602}
2603//******************************************************************************
2604//******************************************************************************
2605BOOL WIN32API RedrawWindow( HWND arg1, const RECT * arg2, HRGN arg3, UINT arg4)
2606{
2607 BOOL rc;
2608
2609 rc = O32_RedrawWindow(arg1, arg2, arg3, arg4);
2610#ifdef DEBUG
2611 WriteLog("USER32: RedrawWindow %X , %X, %X, %X returned %d\n", arg1, arg2, arg3, arg4, rc);
2612#endif
2613 InvalidateRect(arg1, arg2, TRUE);
2614 UpdateWindow(arg1);
2615 SendMessageA(arg1, WM_PAINT, 0, 0);
2616 return(rc);
2617}
2618//******************************************************************************
2619//******************************************************************************
2620UINT WIN32API RegisterClipboardFormatA( LPCSTR arg1)
2621{
2622#ifdef DEBUG
2623 WriteLog("USER32: RegisterClipboardFormatA\n");
2624#endif
2625 return O32_RegisterClipboardFormat(arg1);
2626}
2627//******************************************************************************
2628//******************************************************************************
2629UINT WIN32API RegisterClipboardFormatW(LPCWSTR arg1)
2630{
2631 UINT rc;
2632 char *astring = UnicodeToAsciiString((LPWSTR)arg1);
2633
2634#ifdef DEBUG
2635 WriteLog("USER32: RegisterClipboardFormatW %s\n", astring);
2636#endif
2637 rc = O32_RegisterClipboardFormat(astring);
2638 FreeAsciiString(astring);
2639#ifdef DEBUG
2640 WriteLog("USER32: RegisterClipboardFormatW returned %d\n", rc);
2641#endif
2642 return(rc);
2643}
2644//******************************************************************************
2645//******************************************************************************
2646UINT WIN32API RegisterWindowMessageW( LPCWSTR arg1)
2647{
2648 char *astring = UnicodeToAsciiString((LPWSTR)arg1);
2649 UINT rc;
2650
2651#ifdef DEBUG
2652 WriteLog("USER32: RegisterWindowMessageW\n");
2653#endif
2654 rc = O32_RegisterWindowMessage(astring);
2655 FreeAsciiString(astring);
2656 return rc;
2657}
2658//******************************************************************************
2659//******************************************************************************
2660HANDLE WIN32API RemovePropA( HWND arg1, LPCSTR arg2)
2661{
2662#ifdef DEBUG
2663 WriteLog("USER32: RemovePropA\n");
2664#endif
2665 return O32_RemoveProp(arg1, arg2);
2666}
2667//******************************************************************************
2668//******************************************************************************
2669HANDLE WIN32API RemovePropW( HWND arg1, LPCWSTR arg2)
2670{
2671 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
2672 HANDLE rc;
2673
2674#ifdef DEBUG
2675 WriteLog("USER32: RemovePropW\n");
2676#endif
2677 rc = O32_RemoveProp(arg1, astring);
2678 FreeAsciiString(astring);
2679 return rc;
2680}
2681//******************************************************************************
2682//******************************************************************************
2683BOOL WIN32API ReplyMessage( LRESULT arg1)
2684{
2685#ifdef DEBUG
2686 WriteLog("USER32: ReplyMessage\n");
2687#endif
2688 return O32_ReplyMessage(arg1);
2689}
2690//******************************************************************************
2691//******************************************************************************
2692BOOL WIN32API ScreenToClient( HWND arg1, LPPOINT arg2)
2693{
2694#ifdef DEBUG
2695 WriteLog("USER32: ScreenToClient\n");
2696#endif
2697 return O32_ScreenToClient(arg1, arg2);
2698}
2699//******************************************************************************
2700//******************************************************************************
2701BOOL WIN32API ScrollDC( HDC arg1, int arg2, int arg3, const RECT * arg4, const RECT * arg5, HRGN arg6, PRECT arg7)
2702{
2703#ifdef DEBUG
2704 WriteLog("USER32: ScrollDC\n");
2705#endif
2706 return O32_ScrollDC(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
2707}
2708//******************************************************************************
2709//******************************************************************************
2710BOOL WIN32API ScrollWindow( HWND arg1, int arg2, int arg3, const RECT * arg4, const RECT * arg5)
2711{
2712#ifdef DEBUG
2713 WriteLog("USER32: ScrollWindow\n");
2714#endif
2715 return O32_ScrollWindow(arg1, arg2, arg3, arg4, arg5);
2716}
2717//******************************************************************************
2718//******************************************************************************
2719BOOL WIN32API ScrollWindowEx( HWND arg1, int arg2, int arg3, const RECT * arg4, const RECT * arg5, HRGN arg6, PRECT arg7, UINT arg8)
2720{
2721#ifdef DEBUG
2722 WriteLog("USER32: ScrollWindowEx\n");
2723#endif
2724 return O32_ScrollWindowEx(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
2725}
2726//******************************************************************************
2727//******************************************************************************
2728LONG WIN32API SendDlgItemMessageW( HWND arg1, int arg2, UINT arg3, WPARAM arg4, LPARAM arg5)
2729{
2730#ifdef DEBUG
2731 WriteLog("USER32: SendDlgItemMessageW\n");
2732#endif
2733 return O32_SendDlgItemMessage(arg1, arg2, arg3, arg4, arg5);
2734}
2735//******************************************************************************
2736//******************************************************************************
2737LRESULT WIN32API SendMessageW( HWND arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
2738{
2739LRESULT rc;
2740
2741#ifdef DEBUG
2742 WriteLog("USER32: SendMessageW....\n");
2743#endif
2744 rc = O32_SendMessage(arg1, arg2, arg3, arg4);
2745#ifdef DEBUG
2746 WriteLog("USER32: SendMessageW %X %X %X %X returned %d\n", arg1, arg2, arg3, arg4, rc);
2747#endif
2748 return(rc);
2749}
2750//******************************************************************************
2751//******************************************************************************
2752BOOL WIN32API SetCaretBlinkTime( UINT arg1)
2753{
2754#ifdef DEBUG
2755 WriteLog("USER32: SetCaretBlinkTime\n");
2756#endif
2757 return O32_SetCaretBlinkTime(arg1);
2758}
2759//******************************************************************************
2760//******************************************************************************
2761BOOL WIN32API SetCaretPos( int arg1, int arg2)
2762{
2763 dprintf(("USER32: SetCaretPos\n"));
2764 return O32_SetCaretPos(arg1, arg2);
2765}
2766//******************************************************************************
2767//******************************************************************************
2768HANDLE WIN32API SetClipboardData( UINT arg1, HANDLE arg2)
2769{
2770 dprintf(("USER32: SetClipboardData\n"));
2771 return O32_SetClipboardData(arg1, arg2);
2772}
2773//******************************************************************************
2774//******************************************************************************
2775HWND WIN32API SetClipboardViewer( HWND arg1)
2776{
2777 dprintf(("USER32: SetClipboardViewer\n"));
2778 return O32_SetClipboardViewer(arg1);
2779}
2780//******************************************************************************
2781//******************************************************************************
2782BOOL WIN32API SetDlgItemTextW( HWND arg1, int arg2, LPCWSTR arg3)
2783{
2784char *astring = UnicodeToAsciiString((LPWSTR)arg3);
2785BOOL rc;
2786
2787#ifdef DEBUG
2788 WriteLog("USER32: SetDlgItemTextW\n");
2789#endif
2790 // NOTE: This will not work as is (needs UNICODE support)
2791 rc = O32_SetDlgItemText(arg1, arg2, astring);
2792 FreeAsciiString(astring);
2793 return rc;
2794}
2795//******************************************************************************
2796//******************************************************************************
2797BOOL WIN32API SetDoubleClickTime( UINT arg1)
2798{
2799#ifdef DEBUG
2800 WriteLog("USER32: SetDoubleClickTime\n");
2801#endif
2802 return O32_SetDoubleClickTime(arg1);
2803}
2804//******************************************************************************
2805//******************************************************************************
2806HWND WIN32API SetParent( HWND arg1, HWND arg2)
2807{
2808#ifdef DEBUG
2809 WriteLog("USER32: SetParent\n");
2810#endif
2811 return O32_SetParent(arg1, arg2);
2812}
2813//******************************************************************************
2814//******************************************************************************
2815BOOL WIN32API SetPropA( HWND arg1, LPCSTR arg2, HANDLE arg3)
2816{
2817#ifdef DEBUG
2818 if((int)arg2 >> 16 != 0)
2819 WriteLog("USER32: SetPropA %S\n", arg2);
2820 else WriteLog("USER32: SetPropA %X\n", arg2);
2821#endif
2822 return O32_SetProp(arg1, arg2, arg3);
2823}
2824//******************************************************************************
2825//******************************************************************************
2826BOOL WIN32API SetPropW(HWND arg1, LPCWSTR arg2, HANDLE arg3)
2827{
2828 BOOL rc;
2829 char *astring;
2830
2831 if((int)arg2 >> 16 != 0)
2832 astring = UnicodeToAsciiString((LPWSTR)arg2);
2833 else astring = (char *)arg2;
2834
2835#ifdef DEBUG
2836 if((int)arg2 >> 16 != 0)
2837 WriteLog("USER32: SetPropW %S\n", astring);
2838 else WriteLog("USER32: SetPropW %X\n", astring);
2839#endif
2840 rc = O32_SetProp(arg1, astring, arg3);
2841 if((int)astring >> 16 != 0)
2842 FreeAsciiString(astring);
2843 return(rc);
2844}
2845//******************************************************************************
2846//******************************************************************************
2847BOOL WIN32API SetRectEmpty( PRECT arg1)
2848{
2849#ifdef DEBUG
2850 WriteLog("USER32: SetRectEmpty\n");
2851#endif
2852 return O32_SetRectEmpty(arg1);
2853}
2854//******************************************************************************
2855//******************************************************************************
2856int WIN32API SetScrollPos( HWND arg1, int arg2, int arg3, BOOL arg4)
2857{
2858#ifdef DEBUG
2859 WriteLog("USER32: SetScrollPos\n");
2860#endif
2861 return O32_SetScrollPos(arg1, arg2, arg3, arg4);
2862}
2863//******************************************************************************
2864//******************************************************************************
2865BOOL WIN32API SetScrollRange( HWND arg1, int arg2, int arg3, int arg4, BOOL arg5)
2866{
2867#ifdef DEBUG
2868 WriteLog("USER32: SetScrollRange\n");
2869#endif
2870 return O32_SetScrollRange(arg1, arg2, arg3, arg4, arg5);
2871}
2872//******************************************************************************
2873//******************************************************************************
2874BOOL WIN32API SetWindowPlacement( HWND arg1, const WINDOWPLACEMENT * arg2)
2875{
2876 dprintf(("USER32: SetWindowPlacement\n"));
2877 return O32_SetWindowPlacement(arg1, arg2);
2878}
2879//******************************************************************************
2880//******************************************************************************
2881BOOL WIN32API SetWindowTextW( HWND arg1, LPCWSTR arg2)
2882{
2883 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
2884 BOOL rc;
2885
2886 rc = SetWindowTextA(arg1, (LPCSTR)astring);
2887 dprintf(("USER32: SetWindowTextW %X %s returned %d\n", arg1, astring, rc));
2888 FreeAsciiString(astring);
2889 return(rc);
2890}
2891//******************************************************************************
2892//******************************************************************************
2893BOOL WIN32API ShowCaret( HWND arg1)
2894{
2895 dprintf(("USER32: ShowCaret\n"));
2896 return O32_ShowCaret(arg1);
2897}
2898//******************************************************************************
2899//******************************************************************************
2900BOOL WIN32API ShowOwnedPopups( HWND arg1, BOOL arg2)
2901{
2902 dprintf(("USER32: ShowOwnedPopups\n"));
2903 return O32_ShowOwnedPopups(arg1, arg2);
2904}
2905//******************************************************************************
2906//******************************************************************************
2907BOOL WIN32API ShowScrollBar( HWND arg1, int arg2, BOOL arg3)
2908{
2909#ifdef DEBUG
2910 WriteLog("USER32: ShowScrollBar\n");
2911#endif
2912 return O32_ShowScrollBar(arg1, arg2, arg3);
2913}
2914//******************************************************************************
2915//******************************************************************************
2916BOOL WIN32API SwapMouseButton( BOOL arg1)
2917{
2918#ifdef DEBUG
2919 WriteLog("USER32: SwapMouseButton\n");
2920#endif
2921 return O32_SwapMouseButton(arg1);
2922}
2923//******************************************************************************
2924//******************************************************************************
2925BOOL WIN32API SystemParametersInfoA(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni)
2926{
2927 BOOL rc;
2928 NONCLIENTMETRICSA *cmetric = (NONCLIENTMETRICSA *)pvParam;
2929
2930 switch(uiAction) {
2931 case SPI_SCREENSAVERRUNNING:
2932 *(BOOL *)pvParam = FALSE;
2933 rc = TRUE;
2934 break;
2935 case SPI_GETDRAGFULLWINDOWS:
2936 *(BOOL *)pvParam = FALSE;
2937 rc = TRUE;
2938 break;
2939 case SPI_GETNONCLIENTMETRICS:
2940 memset(cmetric, 0, sizeof(NONCLIENTMETRICSA));
2941 cmetric->cbSize = sizeof(NONCLIENTMETRICSA);
2942 O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfCaptionFont),0);
2943 O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfMenuFont),0);
2944 O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfStatusFont),0);
2945 O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfMessageFont),0);
2946 cmetric->iBorderWidth = GetSystemMetrics(SM_CXBORDER);
2947 cmetric->iScrollWidth = GetSystemMetrics(SM_CXHSCROLL);
2948 cmetric->iScrollHeight = GetSystemMetrics(SM_CYHSCROLL);
2949 cmetric->iCaptionWidth = 32; //TODO
2950 cmetric->iCaptionHeight = 16; //TODO
2951 cmetric->iSmCaptionWidth = GetSystemMetrics(SM_CXSMSIZE);
2952 cmetric->iSmCaptionHeight = GetSystemMetrics(SM_CYSMSIZE);
2953 cmetric->iMenuWidth = 32; //TODO
2954 cmetric->iMenuHeight = GetSystemMetrics(SM_CYMENU);
2955 rc = TRUE;
2956 break;
2957 case 104: //TODO: Undocumented
2958 rc = 16;
2959 break;
2960 default:
2961 rc = O32_SystemParametersInfo(uiAction, uiParam, pvParam, fWinIni);
2962 break;
2963 }
2964#ifdef DEBUG
2965 WriteLog("USER32: SystemParametersInfoA %d, returned %d\n", uiAction, rc);
2966#endif
2967 return(rc);
2968}
2969//******************************************************************************
2970//TODO: Check for more options that have different structs for Unicode!!!!
2971//******************************************************************************
2972BOOL WIN32API SystemParametersInfoW(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni)
2973{
2974 BOOL rc;
2975 NONCLIENTMETRICSW *clientMetricsW = (NONCLIENTMETRICSW *)pvParam;
2976 NONCLIENTMETRICSA clientMetricsA = {0};
2977 PVOID pvParamA;
2978 UINT uiParamA;
2979
2980 switch(uiAction) {
2981 case SPI_SETNONCLIENTMETRICS:
2982 clientMetricsA.cbSize = sizeof(NONCLIENTMETRICSA);
2983 clientMetricsA.iBorderWidth = clientMetricsW->iBorderWidth;
2984 clientMetricsA.iScrollWidth = clientMetricsW->iScrollWidth;
2985 clientMetricsA.iScrollHeight = clientMetricsW->iScrollHeight;
2986 clientMetricsA.iCaptionWidth = clientMetricsW->iCaptionWidth;
2987 clientMetricsA.iCaptionHeight = clientMetricsW->iCaptionHeight;
2988 ConvertFontWA(&clientMetricsW->lfCaptionFont, &clientMetricsA.lfCaptionFont);
2989 clientMetricsA.iSmCaptionWidth = clientMetricsW->iSmCaptionWidth;
2990 clientMetricsA.iSmCaptionHeight = clientMetricsW->iSmCaptionHeight;
2991 ConvertFontWA(&clientMetricsW->lfSmCaptionFont, &clientMetricsA.lfSmCaptionFont);
2992 clientMetricsA.iMenuWidth = clientMetricsW->iMenuWidth;
2993 clientMetricsA.iMenuHeight = clientMetricsW->iMenuHeight;
2994 ConvertFontWA(&clientMetricsW->lfMenuFont, &clientMetricsA.lfMenuFont);
2995 ConvertFontWA(&clientMetricsW->lfStatusFont, &clientMetricsA.lfStatusFont);
2996 ConvertFontWA(&clientMetricsW->lfMessageFont, &clientMetricsA.lfMessageFont);
2997 //no break
2998 case SPI_GETNONCLIENTMETRICS:
2999 uiParamA = sizeof(NONCLIENTMETRICSA);
3000 pvParamA = &clientMetricsA;
3001 break;
3002 default:
3003 pvParamA = pvParam;
3004 uiParamA = uiParam;
3005 break;
3006 }
3007 rc = SystemParametersInfoA(uiAction, uiParamA, pvParamA, fWinIni);
3008
3009 switch(uiAction) {
3010 case SPI_GETNONCLIENTMETRICS:
3011 clientMetricsW->cbSize = sizeof(*clientMetricsW);
3012 clientMetricsW->iBorderWidth = clientMetricsA.iBorderWidth;
3013 clientMetricsW->iScrollWidth = clientMetricsA.iScrollWidth;
3014 clientMetricsW->iScrollHeight = clientMetricsA.iScrollHeight;
3015 clientMetricsW->iCaptionWidth = clientMetricsA.iCaptionWidth;
3016 clientMetricsW->iCaptionHeight = clientMetricsA.iCaptionHeight;
3017 ConvertFontAW(&clientMetricsA.lfCaptionFont, &clientMetricsW->lfCaptionFont);
3018
3019 clientMetricsW->iSmCaptionWidth = clientMetricsA.iSmCaptionWidth;
3020 clientMetricsW->iSmCaptionHeight = clientMetricsA.iSmCaptionHeight;
3021 ConvertFontAW(&clientMetricsA.lfSmCaptionFont, &clientMetricsW->lfSmCaptionFont);
3022
3023 clientMetricsW->iMenuWidth = clientMetricsA.iMenuWidth;
3024 clientMetricsW->iMenuHeight = clientMetricsA.iMenuHeight;
3025 ConvertFontAW(&clientMetricsA.lfMenuFont, &clientMetricsW->lfMenuFont);
3026 ConvertFontAW(&clientMetricsA.lfStatusFont, &clientMetricsW->lfStatusFont);
3027 ConvertFontAW(&clientMetricsA.lfMessageFont, &clientMetricsW->lfMessageFont);
3028 break;
3029 }
3030#ifdef DEBUG
3031 WriteLog("USER32: SystemParametersInfoW %d, returned %d\n", uiAction, rc);
3032#endif
3033 return(rc);
3034}
3035//******************************************************************************
3036//******************************************************************************
3037LONG WIN32API TabbedTextOutA( HDC arg1, int arg2, int arg3, LPCSTR arg4, int arg5, int arg6, int * arg7, int arg8)
3038{
3039#ifdef DEBUG
3040 WriteLog("USER32: TabbedTextOutA\n");
3041#endif
3042 return O32_TabbedTextOut(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
3043}
3044//******************************************************************************
3045//******************************************************************************
3046LONG WIN32API TabbedTextOutW( HDC arg1, int arg2, int arg3, LPCWSTR arg4, int arg5, int arg6, int * arg7, int arg8)
3047{
3048 char *astring = UnicodeToAsciiString((LPWSTR)arg4);
3049 LONG rc;
3050
3051#ifdef DEBUG
3052 WriteLog("USER32: TabbedTextOutW\n");
3053#endif
3054 rc = O32_TabbedTextOut(arg1, arg2, arg3, astring, arg5, arg6, arg7, arg8);
3055 FreeAsciiString(astring);
3056 return rc;
3057}
3058//******************************************************************************
3059//******************************************************************************
3060int WIN32API TranslateAccelerator( HWND arg1, HACCEL arg2, LPMSG arg3)
3061{
3062#ifdef DEBUG
3063 WriteLog("USER32: TranslateAccelerator\n");
3064#endif
3065 return O32_TranslateAccelerator(arg1, arg2, arg3);
3066}
3067//******************************************************************************
3068//******************************************************************************
3069int WIN32API TranslateAcceleratorW( HWND arg1, HACCEL arg2, LPMSG arg3)
3070{
3071#ifdef DEBUG
3072 WriteLog("USER32: TranslateAcceleratorW\n");
3073#endif
3074 // NOTE: This will not work as is (needs UNICODE support)
3075 return O32_TranslateAccelerator(arg1, arg2, arg3);
3076}
3077//******************************************************************************
3078//******************************************************************************
3079BOOL WIN32API TranslateMDISysAccel( HWND arg1, LPMSG arg2)
3080{
3081#ifdef DEBUG
3082//// WriteLog("USER32: TranslateMDISysAccel\n");
3083#endif
3084 return O32_TranslateMDISysAccel(arg1, arg2);
3085}
3086//******************************************************************************
3087//******************************************************************************
3088BOOL WIN32API UnionRect( PRECT arg1, const RECT * arg2, const RECT * arg3)
3089{
3090#ifdef DEBUG
3091 WriteLog("USER32: UnionRect\n");
3092#endif
3093 return O32_UnionRect(arg1, arg2, arg3);
3094}
3095//******************************************************************************
3096//******************************************************************************
3097BOOL WIN32API ValidateRect( HWND arg1, const RECT * arg2)
3098{
3099#ifdef DEBUG
3100 WriteLog("USER32: ValidateRect\n");
3101#endif
3102 return O32_ValidateRect(arg1, arg2);
3103}
3104//******************************************************************************
3105//******************************************************************************
3106BOOL WIN32API ValidateRgn( HWND arg1, HRGN arg2)
3107{
3108#ifdef DEBUG
3109 WriteLog("USER32: ValidateRgn\n");
3110#endif
3111 return O32_ValidateRgn(arg1, arg2);
3112}
3113//******************************************************************************
3114//******************************************************************************
3115WORD WIN32API VkKeyScanW( WCHAR arg1)
3116{
3117#ifdef DEBUG
3118 WriteLog("USER32: VkKeyScanW\n");
3119#endif
3120 // NOTE: This will not work as is (needs UNICODE support)
3121 return O32_VkKeyScan((char)arg1);
3122}
3123//******************************************************************************
3124//******************************************************************************
3125BOOL WIN32API WaitMessage(void)
3126{
3127#ifdef DEBUG
3128 WriteLog("USER32: WaitMessage\n");
3129#endif
3130 return O32_WaitMessage();
3131}
3132//******************************************************************************
3133//******************************************************************************
3134BOOL WIN32API WinHelpW( HWND arg1, LPCWSTR arg2, UINT arg3, DWORD arg4)
3135{
3136 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
3137 BOOL rc;
3138
3139#ifdef DEBUG
3140 WriteLog("USER32: WinHelpW\n");
3141#endif
3142 rc = WinHelpA(arg1, astring, arg3, arg4);
3143 FreeAsciiString(astring);
3144 return rc;
3145}
3146//******************************************************************************
3147//******************************************************************************
3148HWND WIN32API WindowFromDC( HDC arg1)
3149{
3150#ifdef DEBUG
3151 WriteLog("USER32: WindowFromDC\n");
3152#endif
3153 return O32_WindowFromDC(arg1);
3154}
3155//******************************************************************************
3156//******************************************************************************
3157HWND WIN32API WindowFromPoint( POINT arg1)
3158{
3159#ifdef DEBUG
3160 WriteLog("USER32: WindowFromPoint\n");
3161#endif
3162 return O32_WindowFromPoint(arg1);
3163}
3164//******************************************************************************
3165//******************************************************************************
3166int WIN32API wvsprintfA( LPSTR arg1, LPCSTR arg2, va_list arg3)
3167{
3168#ifdef DEBUG
3169 WriteLog("USER32: wvsprintfA\n");
3170#endif
3171 return O32_wvsprintf(arg1, arg2, (LPCVOID *)arg3);
3172}
3173//******************************************************************************
3174//******************************************************************************
3175int WIN32API wvsprintfW(LPWSTR lpOut, LPCWSTR lpFmt, va_list argptr)
3176{
3177 int rc;
3178 char szOut[256];
3179 char *lpFmtA;
3180
3181 lpFmtA = UnicodeToAsciiString((LPWSTR)lpFmt);
3182#ifdef DEBUG
3183 WriteLog("USER32: wvsprintfW, DOES NOT HANDLE UNICODE STRINGS!\n");
3184 WriteLog("USER32: %s\n", lpFmt);
3185#endif
3186 rc = O32_wvsprintf(szOut, lpFmtA, (LPCVOID)argptr);
3187
3188 AsciiToUnicode(szOut, lpOut);
3189#ifdef DEBUG
3190 WriteLog("USER32: %s\n", lpOut);
3191#endif
3192 FreeAsciiString(lpFmtA);
3193 return(rc);
3194}
3195//******************************************************************************
3196//No need to support this
3197//******************************************************************************
3198BOOL WIN32API SetMessageQueue(int cMessagesMax)
3199{
3200#ifdef DEBUG
3201 WriteLog("USER32: SetMessageQueue\n");
3202#endif
3203 return(TRUE);
3204}
3205//******************************************************************************
3206//TODO: Not complete
3207//******************************************************************************
3208BOOL WIN32API GetScrollInfo(HWND hwnd, int fnBar, LPSCROLLINFO lpsi)
3209{
3210#ifdef DEBUG
3211 WriteLog("USER32: GetScrollInfo\n");
3212#endif
3213 if(lpsi == NULL)
3214 return(FALSE);
3215
3216 if(lpsi->fMask & SIF_POS)
3217 lpsi->nPos = GetScrollPos(hwnd, fnBar);
3218 if(lpsi->fMask & SIF_RANGE)
3219 GetScrollRange(hwnd, fnBar, &lpsi->nMin, &lpsi->nMax);
3220 if(lpsi->fMask & SIF_PAGE) {
3221#ifdef DEBUG
3222 WriteLog("USER32: GetScrollInfo, page info not implemented\n");
3223#endif
3224 lpsi->nPage = 25;
3225 }
3226 return(TRUE);
3227}
3228//******************************************************************************
3229//TODO: Not complete
3230//******************************************************************************
3231INT WIN32API SetScrollInfo(HWND hwnd, INT fnBar, const SCROLLINFO *lpsi, BOOL fRedraw)
3232{
3233 int smin, smax;
3234
3235#ifdef DEBUG
3236 WriteLog("USER32: SetScrollInfo\n");
3237#endif
3238 if(lpsi == NULL)
3239 return(FALSE);
3240
3241 if(lpsi->fMask & SIF_POS)
3242 SetScrollPos(hwnd, fnBar, lpsi->nPos, fRedraw);
3243 if(lpsi->fMask & SIF_RANGE)
3244 SetScrollRange(hwnd, fnBar, lpsi->nMin, lpsi->nMax, fRedraw);
3245 if(lpsi->fMask & SIF_PAGE) {
3246#ifdef DEBUG
3247 WriteLog("USER32: GetScrollInfo, page info not implemented\n");
3248#endif
3249 }
3250 if(lpsi->fMask & SIF_DISABLENOSCROLL) {
3251#ifdef DEBUG
3252 WriteLog("USER32: GetScrollInfo, disable scrollbar not yet implemented\n");
3253#endif
3254 }
3255 return(TRUE);
3256}
3257//******************************************************************************
3258//******************************************************************************
3259BOOL WIN32API GrayStringA(HDC hdc, HBRUSH hBrush, GRAYSTRINGPROC lpOutputFunc,
3260 LPARAM lpData, int nCount, int X, int Y, int nWidth,
3261 int nHeight)
3262{
3263 BOOL rc;
3264 COLORREF curclr;
3265
3266#ifdef DEBUG
3267 WriteLog("USER32: GrayStringA, not completely implemented\n");
3268#endif
3269 if(lpOutputFunc == NULL && lpData == NULL) {
3270#ifdef DEBUG
3271 WriteLog("USER32: lpOutputFunc == NULL && lpData == NULL\n");
3272#endif
3273 return(FALSE);
3274 }
3275 if(lpOutputFunc) {
3276 return(lpOutputFunc(hdc, lpData, nCount));
3277 }
3278 curclr = SetTextColor(hdc, GetSysColor(COLOR_GRAYTEXT));
3279 rc = TextOutA(hdc, X, Y, (char *)lpData, nCount);
3280 SetTextColor(hdc, curclr);
3281
3282 return(rc);
3283}
3284//******************************************************************************
3285//******************************************************************************
3286BOOL WIN32API GrayStringW(HDC hdc, HBRUSH hBrush, GRAYSTRINGPROC lpOutputFunc,
3287 LPARAM lpData, int nCount, int X, int Y, int nWidth,
3288 int nHeight)
3289{
3290 BOOL rc;
3291 char *astring;
3292 COLORREF curclr;
3293
3294#ifdef DEBUG
3295 WriteLog("USER32: GrayStringW, not completely implemented\n");
3296#endif
3297
3298 if(lpOutputFunc == NULL && lpData == NULL) {
3299#ifdef DEBUG
3300 WriteLog("USER32: lpOutputFunc == NULL && lpData == NULL\n");
3301#endif
3302 return(FALSE);
3303 }
3304 if(nCount == 0)
3305 nCount = UniStrlen((UniChar*)lpData);
3306
3307 if(lpOutputFunc) {
3308 return(lpOutputFunc(hdc, lpData, nCount));
3309 }
3310 astring = UnicodeToAsciiString((LPWSTR)lpData);
3311
3312 curclr = SetTextColor(hdc, GetSysColor(COLOR_GRAYTEXT));
3313 rc = TextOutA(hdc, X, Y, astring, nCount);
3314 SetTextColor(hdc, curclr);
3315
3316 FreeAsciiString(astring);
3317 return(rc);
3318}
3319//******************************************************************************
3320//TODO:
3321//******************************************************************************
3322int WIN32API CopyAcceleratorTableA(HACCEL hAccelSrc, LPACCEL lpAccelDest,
3323 int cAccelEntries)
3324{
3325#ifdef DEBUG
3326 WriteLog("USER32: CopyAcceleratorTableA, not implemented\n");
3327#endif
3328 return(0);
3329}
3330//******************************************************************************
3331//TODO:
3332//******************************************************************************
3333int WIN32API CopyAcceleratorTableW(HACCEL hAccelSrc, LPACCEL lpAccelDest,
3334 int cAccelEntries)
3335{
3336#ifdef DEBUG
3337 WriteLog("USER32: CopyAcceleratorTableW, not implemented\n");
3338#endif
3339 return(0);
3340}
3341//******************************************************************************
3342//******************************************************************************
3343LRESULT WIN32API SendMessageTimeoutA(HWND hwnd, UINT Msg, WPARAM wParam,
3344 LPARAM lParam, UINT fuFlags, UINT uTimeOut,
3345 LPDWORD lpdwResult)
3346{
3347#ifdef DEBUG
3348 WriteLog("USER32: SendMessageTimeoutA, partially implemented\n");
3349#endif
3350 //ignore fuFlags & wTimeOut
3351 *lpdwResult = SendMessageA(hwnd, Msg, wParam, lParam);
3352 return(TRUE);
3353}
3354//******************************************************************************
3355//******************************************************************************
3356LRESULT WIN32API SendMessageTimeoutW(HWND hwnd, UINT Msg, WPARAM wParam,
3357 LPARAM lParam, UINT fuFlags, UINT uTimeOut,
3358 LPDWORD lpdwResult)
3359{
3360#ifdef DEBUG
3361 WriteLog("USER32: SendMessageTimeoutW, partially implemented\n");
3362#endif
3363 return(SendMessageTimeoutA(hwnd, Msg, wParam, lParam, fuFlags, uTimeOut, lpdwResult));
3364}
3365//******************************************************************************
3366//******************************************************************************
3367HANDLE WIN32API CopyImage(HANDLE hImage, UINT uType, int cxDesired, int cyDesired, UINT fuFlags)
3368{
3369#ifdef DEBUG
3370 WriteLog("USER32: CopyImage, not implemented\n");
3371#endif
3372 switch(uType) {
3373 case IMAGE_BITMAP:
3374 case IMAGE_CURSOR:
3375 case IMAGE_ICON:
3376 default:
3377#ifdef DEBUG
3378 WriteLog("USER32: CopyImage, unknown type\n");
3379#endif
3380 return(NULL);
3381 }
3382 return(NULL);
3383}
3384//******************************************************************************
3385//******************************************************************************
3386BOOL WIN32API GetKeyboardState(PBYTE lpKeyState)
3387{
3388#ifdef DEBUG
3389 WriteLog("USER32: GetKeyboardState, not properly implemented\n");
3390#endif
3391 memset(lpKeyState, 0, 256);
3392 return(TRUE);
3393}
3394//******************************************************************************
3395//******************************************************************************
3396BOOL WIN32API SetKeyboardState(PBYTE lpKeyState)
3397{
3398#ifdef DEBUG
3399 WriteLog("USER32: SetKeyboardState, not implemented\n");
3400#endif
3401 return(TRUE);
3402}
3403//******************************************************************************
3404//******************************************************************************
3405BOOL WIN32API SendNotifyMessageA(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)
3406{
3407#ifdef DEBUG
3408 WriteLog("USER32: SendNotifyMessageA, not completely implemented\n");
3409#endif
3410 return(SendMessageA(hwnd, Msg, wParam, lParam));
3411}
3412//******************************************************************************
3413//******************************************************************************
3414BOOL WIN32API SendNotifyMessageW(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)
3415{
3416#ifdef DEBUG
3417 WriteLog("USER32: SendNotifyMessageW, not completely implemented\n");
3418#endif
3419 return(SendMessageA(hwnd, Msg, wParam, lParam));
3420}
3421//******************************************************************************
3422//2nd parameter not used according to SDK (yet?)
3423//******************************************************************************
3424VOID WIN32API SetLastErrorEx(DWORD dwErrCode, DWORD dwType)
3425{
3426#ifdef DEBUG
3427 WriteLog("USER32: SetLastErrorEx\n");
3428#endif
3429 SetLastError(dwErrCode);
3430}
3431//******************************************************************************
3432//******************************************************************************
3433LPARAM WIN32API SetMessageExtraInfo(LPARAM lParam)
3434{
3435#ifdef DEBUG
3436 WriteLog("USER32: SetMessageExtraInfo, not implemented\n");
3437#endif
3438 return(0);
3439}
3440//******************************************************************************
3441//******************************************************************************
3442BOOL WIN32API ActivateKeyboardLayout(HKL hkl, UINT fuFlags)
3443{
3444#ifdef DEBUG
3445 WriteLog("USER32: ActivateKeyboardLayout, not implemented\n");
3446#endif
3447 return(TRUE);
3448}
3449//******************************************************************************
3450//******************************************************************************
3451int WIN32API GetKeyboardLayoutList(int nBuff, HKL *lpList)
3452{
3453#ifdef DEBUG
3454 WriteLog("USER32: GetKeyboardLayoutList, not implemented\n");
3455#endif
3456 return(0);
3457}
3458//******************************************************************************
3459//******************************************************************************
3460HKL WIN32API GetKeyboardLayout(DWORD dwLayout)
3461{
3462#ifdef DEBUG
3463 WriteLog("USER32: GetKeyboardLayout, not implemented\n");
3464#endif
3465 return(0);
3466}
3467//******************************************************************************
3468//******************************************************************************
3469int WIN32API LookupIconIdFromDirectory(PBYTE presbits, BOOL fIcon)
3470{
3471#ifdef DEBUG
3472 WriteLog("USER32: LookupIconIdFromDirectory, not implemented\n");
3473#endif
3474 return(0);
3475}
3476//******************************************************************************
3477//******************************************************************************
3478int WIN32API LookupIconIdFromDirectoryEx(PBYTE presbits, BOOL fIcon,
3479 int cxDesired, int cyDesired,
3480 UINT Flags)
3481{
3482#ifdef DEBUG
3483 WriteLog("USER32: LookupIconIdFromDirectoryEx, not implemented\n");
3484#endif
3485 return(0);
3486}
3487//******************************************************************************
3488//DWORD idAttach; /* thread to attach */
3489//DWORD idAttachTo; /* thread to attach to */
3490//BOOL fAttach; /* attach or detach */
3491//******************************************************************************
3492BOOL WIN32API AttachThreadInput(DWORD idAttach, DWORD idAttachTo, BOOL fAttach)
3493{
3494#ifdef DEBUG
3495 WriteLog("USER32: AttachThreadInput, not implemented\n");
3496#endif
3497 return(TRUE);
3498}
3499//******************************************************************************
3500//******************************************************************************
3501BOOL WIN32API RegisterHotKey(HWND hwnd, int idHotKey, UINT fuModifiers, UINT uVirtKey)
3502{
3503#ifdef DEBUG
3504 WriteLog("USER32: RegisterHotKey, not implemented\n");
3505#endif
3506 return(TRUE);
3507}
3508//******************************************************************************
3509//******************************************************************************
3510BOOL WIN32API UnregisterHotKey(HWND hwnd, int idHotKey)
3511{
3512#ifdef DEBUG
3513 WriteLog("USER32: UnregisterHotKey, not implemented\n");
3514#endif
3515 return(TRUE);
3516}
3517//******************************************************************************
3518//******************************************************************************
3519BOOL WIN32API DrawStateA(HDC hdc, HBRUSH hbc, DRAWSTATEPROC lpOutputFunc,
3520 LPARAM lData, WPARAM wData, int x, int y, int cx,
3521 int cy, UINT fuFlags)
3522{
3523#ifdef DEBUG
3524 WriteLog("USER32: DrawStateA, not implemented\n");
3525#endif
3526 return(TRUE);
3527}
3528//******************************************************************************
3529//******************************************************************************
3530//******************************************************************************
3531//******************************************************************************
3532BOOL WIN32API SetWindowContextHelpId(HWND hwnd, DWORD dwContextHelpId)
3533{
3534#ifdef DEBUG
3535 WriteLog("USER32: SetWindowContextHelpId, not implemented\n");
3536#endif
3537 return(TRUE);
3538}
3539//******************************************************************************
3540//******************************************************************************
3541DWORD WIN32API GetWindowContextHelpId(HWND hwnd)
3542{
3543#ifdef DEBUG
3544 WriteLog("USER32: GetWindowContextHelpId, not implemented\n");
3545#endif
3546 return(0);
3547}
3548//******************************************************************************
3549//restores iconized window to previous size/position
3550//******************************************************************************
3551BOOL WIN32API OpenIcon(HWND hwnd)
3552{
3553#ifdef DEBUG
3554 WriteLog("USER32: OpenIcon\n");
3555#endif
3556 if(!IsIconic(hwnd))
3557 return FALSE;
3558 ShowWindow(hwnd, SW_SHOWNORMAL);
3559 return TRUE;
3560}
3561//******************************************************************************
3562//******************************************************************************
3563BOOL WIN32API IsWindowUnicode(HWND hwnd)
3564{
3565#ifdef DEBUG
3566 WriteLog("USER32: IsWindowUnicode, not implemented\n");
3567#endif
3568 return(FALSE);
3569}
3570//******************************************************************************
3571//******************************************************************************
3572BOOL WIN32API GetMonitorInfoA(HMONITOR,LPMONITORINFO)
3573{
3574#ifdef DEBUG
3575 WriteLog("USER32: GetMonitorInfoA not supported!!\n");
3576#endif
3577 return(FALSE);
3578}
3579//******************************************************************************
3580//******************************************************************************
3581BOOL WIN32API GetMonitorInfoW(HMONITOR,LPMONITORINFO)
3582{
3583#ifdef DEBUG
3584 WriteLog("USER32: GetMonitorInfoW not supported!!\n");
3585#endif
3586 return(FALSE);
3587}
3588//******************************************************************************
3589//******************************************************************************
3590HMONITOR WIN32API MonitorFromWindow(HWND hwnd, DWORD dwFlags)
3591{
3592#ifdef DEBUG
3593 WriteLog("USER32: MonitorFromWindow not correctly supported??\n");
3594#endif
3595 return(0);
3596}
3597//******************************************************************************
3598//******************************************************************************
3599HMONITOR WIN32API MonitorFromRect(LPRECT rect, DWORD dwFlags)
3600{
3601#ifdef DEBUG
3602 WriteLog("USER32: MonitorFromRect not correctly supported??\n");
3603#endif
3604 return(0);
3605}
3606//******************************************************************************
3607//******************************************************************************
3608HMONITOR WIN32API MonitorFromPoint(POINT point, DWORD dwflags)
3609{
3610#ifdef DEBUG
3611 WriteLog("USER32: MonitorFromPoint not correctly supported??\n");
3612#endif
3613 return(0);
3614}
3615//******************************************************************************
3616//******************************************************************************
3617BOOL WIN32API EnumDisplayMonitors(HDC,LPRECT,MONITORENUMPROC,LPARAM)
3618{
3619#ifdef DEBUG
3620 WriteLog("USER32: EnumDisplayMonitors not supported??\n");
3621#endif
3622 return(FALSE);
3623}
3624//******************************************************************************
3625//******************************************************************************
3626BOOL WIN32API EnumDisplaySettingsA(LPCSTR lpszDeviceName, DWORD iModeNum,
3627 LPDEVMODEA lpDevMode)
3628{
3629#ifdef DEBUG
3630 WriteLog("USER32: EnumDisplaySettingsA FAKED\n");
3631#endif
3632 switch(iModeNum) {
3633 case 0:
3634 lpDevMode->dmBitsPerPel = 16;
3635 lpDevMode->dmPelsWidth = 768;
3636 lpDevMode->dmPelsHeight = 1024;
3637 lpDevMode->dmDisplayFlags = 0;
3638 lpDevMode->dmDisplayFrequency = 70;
3639 break;
3640 case 1:
3641 lpDevMode->dmBitsPerPel = 16;
3642 lpDevMode->dmPelsWidth = 640;
3643 lpDevMode->dmPelsHeight = 480;
3644 lpDevMode->dmDisplayFlags = 0;
3645 lpDevMode->dmDisplayFrequency = 70;
3646 break;
3647 default:
3648 return(FALSE);
3649 }
3650 return(TRUE);
3651}
3652//******************************************************************************
3653//******************************************************************************
3654LONG WIN32API ChangeDisplaySettingsA(LPDEVMODEA lpDevMode, DWORD dwFlags)
3655{
3656#ifdef DEBUG
3657 if(lpDevMode) {
3658 WriteLog("USER32: ChangeDisplaySettingsA FAKED %X\n", dwFlags);
3659 WriteLog("USER32: ChangeDisplaySettingsA lpDevMode->dmBitsPerPel %d\n", lpDevMode->dmBitsPerPel);
3660 WriteLog("USER32: ChangeDisplaySettingsA lpDevMode->dmPelsWidth %d\n", lpDevMode->dmPelsWidth);
3661 WriteLog("USER32: ChangeDisplaySettingsA lpDevMode->dmPelsHeight %d\n", lpDevMode->dmPelsHeight);
3662 }
3663#endif
3664 return(DISP_CHANGE_SUCCESSFUL);
3665}
3666//******************************************************************************
3667//******************************************************************************
3668
3669
3670/*****************************************************************************
3671 * Name : BOOL WIN32API AnyPopup
3672 * Purpose : The AnyPopup function indicates whether an owned, visible,
3673 * top-level pop-up, or overlapped window exists on the screen. The
3674 * function searches the entire Windows screen, not just the calling
3675 * application's client area.
3676 * Parameters: VOID
3677 * Variables :
3678 * Result : If a pop-up window exists, the return value is TRUE even if the
3679 * pop-up window is completely covered by other windows. Otherwise,
3680 * it is FALSE.
3681 * Remark : AnyPopup is a Windows version 1.x function and is retained for
3682 * compatibility purposes. It is generally not useful.
3683 * Status : UNTESTED STUB
3684 *
3685 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3686 *****************************************************************************/
3687
3688BOOL WIN32API AnyPopup(VOID)
3689{
3690 dprintf(("USER32:AnyPopup() not implemented.\n"));
3691
3692 return (FALSE);
3693}
3694
3695
3696/*****************************************************************************
3697 * Name : long WIN32API BroadcastSystemMessage
3698 * Purpose : The BroadcastSystemMessage function sends a message to the given
3699 * recipients. The recipients can be applications, installable
3700 * drivers, Windows-based network drivers, system-level device
3701 * drivers, or any combination of these system components.
3702 * Parameters: DWORD dwFlags,
3703 LPDWORD lpdwRecipients,
3704 UINT uiMessage,
3705 WPARAM wParam,
3706 LPARAM lParam
3707 * Variables :
3708 * Result : If the function succeeds, the return value is a positive value.
3709 * If the function is unable to broadcast the message, the return value is -1.
3710 * If the dwFlags parameter is BSF_QUERY and at least one recipient returned FALSE to the corresponding message, the return value is zero.
3711 * Remark :
3712 * Status : UNTESTED STUB
3713 *
3714 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3715 *****************************************************************************/
3716
3717long WIN32API BroadcastSystemMessage(DWORD dwFlags,
3718 LPDWORD lpdwRecipients,
3719 UINT uiMessage,
3720 WPARAM wParam,
3721 LPARAM lParam)
3722{
3723 dprintf(("USER32:BroadcastSystemMessage(%08xh,%08xh,%08xh,%08xh,%08x) not implemented.\n",
3724 dwFlags,
3725 lpdwRecipients,
3726 uiMessage,
3727 wParam,
3728 lParam));
3729
3730 return (-1);
3731}
3732
3733
3734/*****************************************************************************
3735 * Name : WORD WIN32API CascadeWindows
3736 * Purpose : The CascadeWindows function cascades the specified windows or
3737 * the child windows of the specified parent window.
3738 * Parameters: HWND hwndParent handle of parent window
3739 * UINT wHow types of windows not to arrange
3740 * CONST RECT * lpRect rectangle to arrange windows in
3741 * UINT cKids number of windows to arrange
3742 * const HWND FAR * lpKids array of window handles
3743 * Variables :
3744 * Result : If the function succeeds, the return value is the number of windows arranged.
3745 * If the function fails, the return value is zero.
3746 * Remark :
3747 * Status : UNTESTED STUB
3748 *
3749 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3750 *****************************************************************************/
3751
3752WORD WIN32API CascadeWindows(HWND hwndParent,
3753 UINT wHow,
3754 CONST LPRECT lpRect,
3755 UINT cKids,
3756 const HWND *lpKids)
3757{
3758 dprintf(("USER32:CascadeWindows(%08xh,%u,%08xh,%u,%08x) not implemented.\n",
3759 hwndParent,
3760 wHow,
3761 lpRect,
3762 cKids,
3763 lpKids));
3764
3765 return (0);
3766}
3767
3768
3769/*****************************************************************************
3770 * Name : LONG WIN32API ChangeDisplaySettingsW
3771 * Purpose : The ChangeDisplaySettings function changes the display settings
3772 * to the specified graphics mode.
3773 * Parameters: LPDEVMODEW lpDevModeW
3774 * DWORD dwFlags
3775 * Variables :
3776 * Result : DISP_CHANGE_SUCCESSFUL The settings change was successful.
3777 * DISP_CHANGE_RESTART The computer must be restarted in order for the graphics mode to work.
3778 * DISP_CHANGE_BADFLAGS An invalid set of flags was passed in.
3779 * DISP_CHANGE_FAILED The display driver failed the specified graphics mode.
3780 * DISP_CHANGE_BADMODE The graphics mode is not supported.
3781 * DISP_CHANGE_NOTUPDATED Unable to write settings to the registry.
3782 * Remark :
3783 * Status : UNTESTED STUB
3784 *
3785 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3786 *****************************************************************************/
3787
3788LONG WIN32API ChangeDisplaySettingsW(LPDEVMODEW lpDevMode,
3789 DWORD dwFlags)
3790{
3791 dprintf(("USER32:ChangeDisplaySettingsW(%08xh,%08x) not implemented.\n",
3792 lpDevMode,
3793 dwFlags));
3794
3795 return (ChangeDisplaySettingsA((LPDEVMODEA)lpDevMode,
3796 dwFlags));
3797}
3798
3799/*****************************************************************************
3800 * Name : BOOL WIN32API CloseDesktop
3801 * Purpose : The CloseDesktop function closes an open handle of a desktop
3802 * object. A desktop is a secure object contained within a window
3803 * station object. A desktop has a logical display surface and
3804 * contains windows, menus and hooks.
3805 * Parameters: HDESK hDesktop
3806 * Variables :
3807 * Result : If the function succeeds, the return value is TRUE.
3808 * If the functions fails, the return value is FALSE. To get
3809 * extended error information, call GetLastError.
3810 * Remark :
3811 * Status : UNTESTED STUB
3812 *
3813 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3814 *****************************************************************************/
3815
3816BOOL WIN32API CloseDesktop(HDESK hDesktop)
3817{
3818 dprintf(("USER32:CloseDesktop(%08x) not implemented.\n",
3819 hDesktop));
3820
3821 return (FALSE);
3822}
3823
3824
3825/*****************************************************************************
3826 * Name : BOOL WIN32API CloseWindowStation
3827 * Purpose : The CloseWindowStation function closes an open window station handle.
3828 * Parameters: HWINSTA hWinSta
3829 * Variables :
3830 * Result :
3831 * Remark : If the function succeeds, the return value is TRUE.
3832 * If the functions fails, the return value is FALSE. To get
3833 * extended error information, call GetLastError.
3834 * Status : UNTESTED STUB
3835 *
3836 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3837 *****************************************************************************/
3838
3839BOOL WIN32API CloseWindowStation(HWINSTA hWinSta)
3840{
3841 dprintf(("USER32:CloseWindowStation(%08x) not implemented.\n",
3842 hWinSta));
3843
3844 return (FALSE);
3845}
3846
3847
3848/*****************************************************************************
3849 * Name : HDESK WIN32API CreateDesktopA
3850 * Purpose : The CreateDesktop function creates a new desktop on the window
3851 * station associated with the calling process.
3852 * Parameters: LPCTSTR lpszDesktop name of the new desktop
3853 * LPCTSTR lpszDevice name of display device to assign to the desktop
3854 * LPDEVMODE pDevMode reserved; must be NULL
3855 * DWORD dwFlags flags to control interaction with other applications
3856 * DWORD dwDesiredAccess specifies access of returned handle
3857 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the desktop
3858 * Variables :
3859 * Result : If the function succeeds, the return value is a handle of the
3860 * newly created desktop.
3861 * If the function fails, the return value is NULL. To get extended
3862 * error information, call GetLastError.
3863 * Remark :
3864 * Status : UNTESTED STUB
3865 *
3866 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3867 *****************************************************************************/
3868
3869HDESK WIN32API CreateDesktopA(LPCTSTR lpszDesktop,
3870 LPCTSTR lpszDevice,
3871 LPDEVMODEA pDevMode,
3872 DWORD dwFlags,
3873 DWORD dwDesiredAccess,
3874 LPSECURITY_ATTRIBUTES lpsa)
3875{
3876 dprintf(("USER32:CreateDesktopA(%s,%s,%08xh,%08xh,%08xh,%08x) not implemented.\n",
3877 lpszDesktop,
3878 lpszDevice,
3879 pDevMode,
3880 dwFlags,
3881 dwDesiredAccess,
3882 lpsa));
3883
3884 return (NULL);
3885}
3886
3887
3888/*****************************************************************************
3889 * Name : HDESK WIN32API CreateDesktopW
3890 * Purpose : The CreateDesktop function creates a new desktop on the window
3891 * station associated with the calling process.
3892 * Parameters: LPCTSTR lpszDesktop name of the new desktop
3893 * LPCTSTR lpszDevice name of display device to assign to the desktop
3894 * LPDEVMODE pDevMode reserved; must be NULL
3895 * DWORD dwFlags flags to control interaction with other applications
3896 * DWORD dwDesiredAccess specifies access of returned handle
3897 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the desktop
3898 * Variables :
3899 * Result : If the function succeeds, the return value is a handle of the
3900 * newly created desktop.
3901 * If the function fails, the return value is NULL. To get extended
3902 * error information, call GetLastError.
3903 * Remark :
3904 * Status : UNTESTED STUB
3905 *
3906 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3907 *****************************************************************************/
3908
3909HDESK WIN32API CreateDesktopW(LPCTSTR lpszDesktop,
3910 LPCTSTR lpszDevice,
3911 LPDEVMODEW pDevMode,
3912 DWORD dwFlags,
3913 DWORD dwDesiredAccess,
3914 LPSECURITY_ATTRIBUTES lpsa)
3915{
3916 dprintf(("USER32:CreateDesktopW(%s,%s,%08xh,%08xh,%08xh,%08x) not implemented.\n",
3917 lpszDesktop,
3918 lpszDevice,
3919 pDevMode,
3920 dwFlags,
3921 dwDesiredAccess,
3922 lpsa));
3923
3924 return (NULL);
3925}
3926
3927
3928/*****************************************************************************
3929 * Name : HWINSTA WIN32API CreateWindowStationA
3930 * Purpose : The CreateWindowStation function creates a window station object.
3931 * It returns a handle that can be used to access the window station.
3932 * A window station is a secure object that contains a set of global
3933 * atoms, a clipboard, and a set of desktop objects.
3934 * Parameters: LPTSTR lpwinsta name of the new window station
3935 * DWORD dwReserved reserved; must be NULL
3936 * DWORD dwDesiredAccess specifies access of returned handle
3937 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the window station
3938 * Variables :
3939 * Result : If the function succeeds, the return value is the handle to the
3940 * newly created window station.
3941 * If the function fails, the return value is NULL. To get extended
3942 * error information, call GetLastError.
3943 * Remark :
3944 * Status : UNTESTED STUB
3945 *
3946 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3947 *****************************************************************************/
3948
3949HWINSTA WIN32API CreateWindowStationA(LPTSTR lpWinSta,
3950 DWORD dwReserved,
3951 DWORD dwDesiredAccess,
3952 LPSECURITY_ATTRIBUTES lpsa)
3953{
3954 dprintf(("USER32:CreateWindowStationA(%s,%08xh,%08xh,%08x) not implemented.\n",
3955 lpWinSta,
3956 dwReserved,
3957 dwDesiredAccess,
3958 lpsa));
3959
3960 return (NULL);
3961}
3962
3963
3964/*****************************************************************************
3965 * Name : HWINSTA WIN32API CreateWindowStationW
3966 * Purpose : The CreateWindowStation function creates a window station object.
3967 * It returns a handle that can be used to access the window station.
3968 * A window station is a secure object that contains a set of global
3969 * atoms, a clipboard, and a set of desktop objects.
3970 * Parameters: LPTSTR lpwinsta name of the new window station
3971 * DWORD dwReserved reserved; must be NULL
3972 * DWORD dwDesiredAccess specifies access of returned handle
3973 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the window station
3974 * Variables :
3975 * Result : If the function succeeds, the return value is the handle to the
3976 * newly created window station.
3977 * If the function fails, the return value is NULL. To get extended
3978 * error information, call GetLastError.
3979 * Remark :
3980 * Status : UNTESTED STUB
3981 *
3982 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3983 *****************************************************************************/
3984
3985HWINSTA WIN32API CreateWindowStationW(LPWSTR lpWinSta,
3986 DWORD dwReserved,
3987 DWORD dwDesiredAccess,
3988 LPSECURITY_ATTRIBUTES lpsa)
3989{
3990 dprintf(("USER32:CreateWindowStationW(%s,%08xh,%08xh,%08x) not implemented.\n",
3991 lpWinSta,
3992 dwReserved,
3993 dwDesiredAccess,
3994 lpsa));
3995
3996 return (NULL);
3997}
3998
3999/*****************************************************************************
4000 * Name : BOOL WIN32API DragDetect
4001 * Purpose : The DragDetect function captures the mouse and tracks its movement
4002 * Parameters: HWND hwnd
4003 * POINT pt
4004 * Variables :
4005 * Result : If the user moved the mouse outside of the drag rectangle while
4006 * holding the left button down, the return value is TRUE.
4007 * If the user did not move the mouse outside of the drag rectangle
4008 * while holding the left button down, the return value is FALSE.
4009 * Remark :
4010 * Status : UNTESTED STUB
4011 *
4012 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4013 *****************************************************************************/
4014
4015BOOL WIN32API DragDetect(HWND hwnd,
4016 POINT pt)
4017{
4018 dprintf(("USER32:DragDetect(%08xh,...) not implemented.\n",
4019 hwnd));
4020
4021 return (FALSE);
4022}
4023
4024
4025/*****************************************************************************
4026 * Name : BOOL WIN32API DrawAnimatedRects
4027 * Purpose : The DrawAnimatedRects function draws a wire-frame rectangle
4028 * and animates it to indicate the opening of an icon or the
4029 * minimizing or maximizing of a window.
4030 * Parameters: HWND hwnd handle of clipping window
4031 * int idAni type of animation
4032 * CONST RECT * lprcFrom address of rectangle coordinates (minimized)
4033 * CONST RECT * lprcTo address of rectangle coordinates (restored)
4034 * Variables :
4035 * Result : If the function succeeds, the return value is TRUE.
4036 * If the function fails, the return value is FALSE.
4037 * Remark :
4038 * Status : UNTESTED STUB
4039 *
4040 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4041 *****************************************************************************/
4042
4043BOOL WIN32API DrawAnimatedRects(HWND hwnd,
4044 int idAni,
4045 CONST RECT *lprcFrom,
4046 CONST RECT *lprcTo)
4047{
4048 dprintf(("USER32:DrawAnimatedRects (%08xh,%u,%08xh,%08x) not implemented.\n",
4049 hwnd,
4050 idAni,
4051 lprcFrom,
4052 lprcTo));
4053
4054 return (TRUE);
4055}
4056
4057
4058/*****************************************************************************
4059 * Name : VOID WIN32API DrawCaption
4060 * Purpose : The DrawCaption function draws a window caption.
4061 * Parameters: HDC hdc handle of device context
4062 * LPRECT lprc address of bounding rectangle coordinates
4063 * HFONT hfont handle of font for caption
4064 * HICON hicon handle of icon in caption
4065 * LPSTR lpszText address of caption string
4066 * WORD wFlags drawing options
4067 * Variables :
4068 * Result :
4069 * Remark :
4070 * Status : UNTESTED STUB
4071 *
4072 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4073 *****************************************************************************/
4074
4075BOOL WIN32API DrawCaption (HWND hwnd,
4076 HDC hdc,
4077 const RECT *lprc,
4078 UINT wFlags)
4079{
4080 dprintf(("USER32:DrawCaption (%08xh,%08xh,%08xh,%08xh) not implemented.\n",
4081 hwnd,
4082 hdc,
4083 lprc,
4084 wFlags));
4085
4086 return FALSE;
4087}
4088
4089
4090/*****************************************************************************
4091 * Name :
4092 * Purpose :
4093 * Parameters:
4094 * Variables :
4095 * Result :
4096 * Remark :
4097 * Status : UNTESTED STUB
4098 *
4099 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4100 *****************************************************************************/
4101
4102BOOL WIN32API DrawStateW(HDC hdc,
4103 HBRUSH hBrush,
4104 DRAWSTATEPROC lpOutputFunc,
4105 LPARAM lParam,
4106 WPARAM wParam,
4107 int x,
4108 int y,
4109 int cx,
4110 int cy,
4111 UINT fuFlags)
4112{
4113 dprintf(("USER32:DrawStateW (%08xh,%08xh,%08xh,%08xh,%08xh,%d,%d,%d,%d,%08x) not implemented.\n",
4114 hdc,
4115 hBrush,
4116 lpOutputFunc,
4117 lParam,
4118 wParam,
4119 x,
4120 y,
4121 cx,
4122 cy,
4123 fuFlags));
4124
4125 return(DrawStateA(hdc,
4126 hBrush,
4127 lpOutputFunc,
4128 lParam,
4129 wParam,
4130 x,
4131 y,
4132 cx,
4133 cy,
4134 fuFlags));
4135}
4136
4137
4138/*****************************************************************************
4139 * Name : BOOL WIN32API EnumDesktopWindows
4140 * Purpose : The EnumDesktopWindows function enumerates all windows in a
4141 * desktop by passing the handle of each window, in turn, to an
4142 * application-defined callback function.
4143 * Parameters: HDESK hDesktop handle of desktop to enumerate
4144 * WNDENUMPROC lpfn points to application's callback function
4145 * LPARAM lParam 32-bit value to pass to the callback function
4146 * Variables :
4147 * Result : If the function succeeds, the return value is TRUE.
4148 * If the function fails, the return value is FALSE. To get
4149 * extended error information, call GetLastError.
4150 * Remark :
4151 * Status : UNTESTED STUB
4152 *
4153 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4154 *****************************************************************************/
4155
4156BOOL WIN32API EnumDesktopWindows(HDESK hDesktop,
4157 WNDENUMPROC lpfn,
4158 LPARAM lParam)
4159{
4160 dprintf(("USER32:EnumDesktopWindows (%08xh,%08xh,%08x) not implemented.\n",
4161 hDesktop,
4162 lpfn,
4163 lParam));
4164
4165 return (FALSE);
4166}
4167
4168
4169/*****************************************************************************
4170 * Name : BOOL WIN32API EnumDesktopsA
4171 * Purpose : The EnumDesktops function enumerates all desktops in the window
4172 * station assigned to the calling process. The function does so by
4173 * passing the name of each desktop, in turn, to an application-
4174 * defined callback function.
4175 * Parameters: HWINSTA hwinsta handle of window station to enumerate
4176 * DESKTOPENUMPROC lpEnumFunc points to application's callback function
4177 * LPARAM lParam 32-bit value to pass to the callback function
4178 * Variables :
4179 * Result : If the function succeeds, the return value is TRUE.
4180 * If the function fails, the return value is FALSE. To get extended
4181 * error information, call GetLastError.
4182 * Remark :
4183 * Status : UNTESTED STUB
4184 *
4185 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4186 *****************************************************************************/
4187
4188BOOL WIN32API EnumDesktopsA(HWINSTA hWinSta,
4189 DESKTOPENUMPROCA lpEnumFunc,
4190 LPARAM lParam)
4191{
4192 dprintf(("USER32:EnumDesktopsA (%08xh,%08xh,%08x) not implemented.\n",
4193 hWinSta,
4194 lpEnumFunc,
4195 lParam));
4196
4197 return (FALSE);
4198}
4199
4200
4201/*****************************************************************************
4202 * Name : BOOL WIN32API EnumDesktopsW
4203 * Purpose : The EnumDesktops function enumerates all desktops in the window
4204 * station assigned to the calling process. The function does so by
4205 * passing the name of each desktop, in turn, to an application-
4206 * defined callback function.
4207 * Parameters: HWINSTA hwinsta handle of window station to enumerate
4208 * DESKTOPENUMPROC lpEnumFunc points to application's callback function
4209 * LPARAM lParam 32-bit value to pass to the callback function
4210 * Variables :
4211 * Result : If the function succeeds, the return value is TRUE.
4212 * If the function fails, the return value is FALSE. To get extended
4213 * error information, call GetLastError.
4214 * Remark :
4215 * Status : UNTESTED STUB
4216 *
4217 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4218 *****************************************************************************/
4219
4220BOOL WIN32API EnumDesktopsW(HWINSTA hWinSta,
4221 DESKTOPENUMPROCW lpEnumFunc,
4222 LPARAM lParam)
4223{
4224 dprintf(("USER32:EnumDesktopsW (%08xh,%08xh,%08x) not implemented.\n",
4225 hWinSta,
4226 lpEnumFunc,
4227 lParam));
4228
4229 return (FALSE);
4230}
4231
4232
4233
4234/*****************************************************************************
4235 * Name : BOOL WIN32API EnumDisplaySettingsW
4236 * Purpose : The EnumDisplaySettings function obtains information about one
4237 * of a display device's graphics modes. You can obtain information
4238 * for all of a display device's graphics modes by making a series
4239 * of calls to this function.
4240 * Parameters: LPCTSTR lpszDeviceName specifies the display device
4241 * DWORD iModeNum specifies the graphics mode
4242 * LPDEVMODE lpDevMode points to structure to receive settings
4243 * Variables :
4244 * Result : If the function succeeds, the return value is TRUE.
4245 * If the function fails, the return value is FALSE.
4246 * Remark :
4247 * Status : UNTESTED STUB
4248 *
4249 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4250 *****************************************************************************/
4251
4252BOOL WIN32API EnumDisplaySettingsW(LPCSTR lpszDeviceName,
4253 DWORD iModeNum,
4254 LPDEVMODEW lpDevMode)
4255{
4256 dprintf(("USER32:EnumDisplaySettingsW (%s,%08xh,%08x) not implemented.\n",
4257 lpszDeviceName,
4258 iModeNum,
4259 lpDevMode));
4260
4261 return (EnumDisplaySettingsA(lpszDeviceName,
4262 iModeNum,
4263 (LPDEVMODEA)lpDevMode));
4264}
4265
4266
4267/*****************************************************************************
4268 * Name : BOOL WIN32API EnumWindowStationsA
4269 * Purpose : The EnumWindowStations function enumerates all windowstations
4270 * in the system by passing the name of each window station, in
4271 * turn, to an application-defined callback function.
4272 * Parameters:
4273 * Variables : WINSTAENUMPROC lpEnumFunc points to application's callback function
4274 * LPARAM lParam 32-bit value to pass to the callback function
4275 * Result : If the function succeeds, the return value is TRUE.
4276 * If the function fails the return value is FALSE. To get extended
4277 * error information, call GetLastError.
4278 * Remark :
4279 * Status : UNTESTED STUB
4280 *
4281 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4282 *****************************************************************************/
4283
4284BOOL WIN32API EnumWindowStationsA(WINSTAENUMPROCA lpEnumFunc,
4285 LPARAM lParam)
4286{
4287 dprintf(("USER32:EnumWindowStationsA (%08xh,%08x) not implemented.\n",
4288 lpEnumFunc,
4289 lParam));
4290
4291 return (FALSE);
4292}
4293
4294
4295/*****************************************************************************
4296 * Name : BOOL WIN32API EnumWindowStationsW
4297 * Purpose : The EnumWindowStations function enumerates all windowstations
4298 * in the system by passing the name of each window station, in
4299 * turn, to an application-defined callback function.
4300 * Parameters:
4301 * Variables : WINSTAENUMPROC lpEnumFunc points to application's callback function
4302 * LPARAM lParam 32-bit value to pass to the callback function
4303 * Result : If the function succeeds, the return value is TRUE.
4304 * If the function fails the return value is FALSE. To get extended
4305 * error information, call GetLastError.
4306 * Remark :
4307 * Status : UNTESTED STUB
4308 *
4309 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4310 *****************************************************************************/
4311
4312BOOL WIN32API EnumWindowStationsW(WINSTAENUMPROCW lpEnumFunc,
4313 LPARAM lParam)
4314{
4315 dprintf(("USER32:EnumWindowStationsW (%08xh,%08x) not implemented.\n",
4316 lpEnumFunc,
4317 lParam));
4318
4319 return (FALSE);
4320}
4321
4322
4323/*****************************************************************************
4324 * Name : HWND WIN32API FindWindowExW
4325 * Purpose : The FindWindowEx function retrieves the handle of a window whose
4326 * class name and window name match the specified strings. The
4327 * function searches child windows, beginning with the one following
4328 * the given child window.
4329 * Parameters: HWND hwndParent handle of parent window
4330 * HWND hwndChildAfter handle of a child window
4331 * LPCTSTR lpszClass address of class name
4332 * LPCTSTR lpszWindow address of window name
4333 * Variables :
4334 * Result : If the function succeeds, the return value is the handle of the
4335 * window that has the specified class and window names.
4336 * If the function fails, the return value is NULL. To get extended
4337 * error information, call GetLastError.
4338 * Remark :
4339 * Status : UNTESTED STUB
4340 *
4341 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4342 *****************************************************************************/
4343
4344HWND WIN32API FindWindowExW(HWND hwndParent,
4345 HWND hwndChildAfter,
4346 LPCWSTR lpszClass,
4347 LPCWSTR lpszWindow)
4348{
4349 dprintf(("USER32:FindWindowExW (%08xh,%08xh,%s,%s) not implemented.\n",
4350 hwndParent,
4351 hwndChildAfter,
4352 lpszClass,
4353 lpszWindow));
4354
4355 return (NULL);
4356}
4357
4358/*****************************************************************************
4359 * Name : BOOL WIN32API GetInputState
4360 * Purpose : The GetInputState function determines whether there are
4361 * mouse-button or keyboard messages in the calling thread's message queue.
4362 * Parameters:
4363 * Variables :
4364 * Result : If the queue contains one or more new mouse-button or keyboard
4365 * messages, the return value is TRUE.
4366 * If the function fails, the return value is FALSE.
4367 * Remark :
4368 * Status : UNTESTED STUB
4369 *
4370 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4371 *****************************************************************************/
4372
4373BOOL WIN32API GetInputState(VOID)
4374{
4375 dprintf(("USER32:GetInputState () not implemented.\n"));
4376
4377 return (FALSE);
4378}
4379
4380
4381/*****************************************************************************
4382 * Name : UINT WIN32API GetKBCodePage
4383 * Purpose : The GetKBCodePage function is provided for compatibility with
4384 * earlier versions of Windows. In the Win32 application programming
4385 * interface (API) it just calls the GetOEMCP function.
4386 * Parameters:
4387 * Variables :
4388 * Result : If the function succeeds, the return value is an OEM code-page
4389 * identifier, or it is the default identifier if the registry
4390 * value is not readable. For a list of OEM code-page identifiers,
4391 * see GetOEMCP.
4392 * Remark :
4393 * Status : UNTESTED
4394 *
4395 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4396 *****************************************************************************/
4397
4398UINT WIN32API GetKBCodePage(VOID)
4399{
4400 return (GetOEMCP());
4401}
4402
4403
4404/*****************************************************************************
4405 * Name : BOOL WIN32API GetKeyboardLayoutNameA
4406 * Purpose : The GetKeyboardLayoutName function retrieves the name of the
4407 * active keyboard layout.
4408 * Parameters: LPTSTR pwszKLID address of buffer for layout name
4409 * Variables :
4410 * Result : If the function succeeds, the return value is TRUE.
4411 * If the function fails, the return value is FALSE. To get extended
4412 * error information, call GetLastError.
4413 * Remark :
4414 * Status : UNTESTED STUB
4415 *
4416 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4417 *****************************************************************************/
4418
4419BOOL WIN32API GetKeyboardLayoutNameA(LPTSTR pwszKLID)
4420{
4421 dprintf(("USER32:GetKeyboardLayoutNameA (%08x) not implemented.",
4422 pwszKLID));
4423
4424 return(FALSE);
4425}
4426
4427
4428/*****************************************************************************
4429 * Name : BOOL WIN32API GetKeyboardLayoutNameW
4430 * Purpose : The GetKeyboardLayoutName function retrieves the name of the
4431 * active keyboard layout.
4432 * Parameters: LPTSTR pwszKLID address of buffer for layout name
4433 * Variables :
4434 * Result : If the function succeeds, the return value is TRUE.
4435 * If the function fails, the return value is FALSE. To get extended
4436 * error information, call GetLastError.
4437 * Remark :
4438 * Status : UNTESTED STUB
4439 *
4440 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4441 *****************************************************************************/
4442
4443BOOL WIN32API GetKeyboardLayoutNameW(LPWSTR pwszKLID)
4444{
4445 dprintf(("USER32:GetKeyboardLayoutNameW (%08x) not implemented.",
4446 pwszKLID));
4447
4448 return(FALSE);
4449}
4450
4451
4452
4453
4454/*****************************************************************************
4455 * Name : HWINSTA WIN32API GetProcessWindowStation
4456 * Purpose : The GetProcessWindowStation function returns a handle of the
4457 * window station associated with the calling process.
4458 * Parameters:
4459 * Variables :
4460 * Result : If the function succeeds, the return value is a handle of the
4461 * window station associated with the calling process.
4462 * If the function fails, the return value is NULL. This can occur
4463 * if the calling process is not an application written for Windows
4464 * NT. To get extended error information, call GetLastError.
4465 * Remark :
4466 * Status : UNTESTED STUB
4467 *
4468 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4469 *****************************************************************************/
4470
4471HWINSTA WIN32API GetProcessWindowStation(VOID)
4472{
4473 dprintf(("USER32:GetProcessWindowStation () not implemented.\n"));
4474
4475 return (NULL);
4476}
4477
4478
4479
4480/*****************************************************************************
4481 * Name : HDESK WIN32API GetThreadDesktop
4482 * Purpose : The GetThreadDesktop function returns a handle to the desktop
4483 * associated with a specified thread.
4484 * Parameters: DWORD dwThreadId thread identifier
4485 * Variables :
4486 * Result : If the function succeeds, the return value is the handle of the
4487 * desktop associated with the specified thread.
4488 * Remark :
4489 * Status : UNTESTED STUB
4490 *
4491 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4492 *****************************************************************************/
4493
4494HDESK WIN32API GetThreadDesktop(DWORD dwThreadId)
4495{
4496 dprintf(("USER32:GetThreadDesktop (%u) not implemented.\n",
4497 dwThreadId));
4498
4499 return (NULL);
4500}
4501
4502
4503/*****************************************************************************
4504 * Name : BOOL WIN32API GetUserObjectInformationA
4505 * Purpose : The GetUserObjectInformation function returns information about
4506 * a window station or desktop object.
4507 * Parameters: HANDLE hObj handle of object to get information for
4508 * int nIndex type of information to get
4509 * PVOID pvInfo points to buffer that receives the information
4510 * DWORD nLength size, in bytes, of pvInfo buffer
4511 * LPDWORD lpnLengthNeeded receives required size, in bytes, of pvInfo buffer
4512 * Variables :
4513 * Result : If the function succeeds, the return value is TRUE.
4514 * If the function fails, the return value is FALSE. To get extended
4515 * error information, call GetLastError.
4516 * Remark :
4517 * Status : UNTESTED STUB
4518 *
4519 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4520 *****************************************************************************/
4521
4522BOOL WIN32API GetUserObjectInformationA(HANDLE hObj,
4523 int nIndex,
4524 PVOID pvInfo,
4525 DWORD nLength,
4526 LPDWORD lpnLengthNeeded)
4527{
4528 dprintf(("USER32:GetUserObjectInformationA (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
4529 hObj,
4530 nIndex,
4531 pvInfo,
4532 nLength,
4533 lpnLengthNeeded));
4534
4535 return (FALSE);
4536}
4537
4538
4539/*****************************************************************************
4540 * Name : BOOL WIN32API GetUserObjectInformationW
4541 * Purpose : The GetUserObjectInformation function returns information about
4542 * a window station or desktop object.
4543 * Parameters: HANDLE hObj handle of object to get information for
4544 * int nIndex type of information to get
4545 * PVOID pvInfo points to buffer that receives the information
4546 * DWORD nLength size, in bytes, of pvInfo buffer
4547 * LPDWORD lpnLengthNeeded receives required size, in bytes, of pvInfo buffer
4548 * Variables :
4549 * Result : If the function succeeds, the return value is TRUE.
4550 * If the function fails, the return value is FALSE. To get extended
4551 * error information, call GetLastError.
4552 * Remark :
4553 * Status : UNTESTED STUB
4554 *
4555 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4556 *****************************************************************************/
4557
4558BOOL WIN32API GetUserObjectInformationW(HANDLE hObj,
4559 int nIndex,
4560 PVOID pvInfo,
4561 DWORD nLength,
4562 LPDWORD lpnLengthNeeded)
4563{
4564 dprintf(("USER32:GetUserObjectInformationW (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
4565 hObj,
4566 nIndex,
4567 pvInfo,
4568 nLength,
4569 lpnLengthNeeded));
4570
4571 return (FALSE);
4572}
4573
4574
4575/*****************************************************************************
4576 * Name : BOOL WIN32API GetUserObjectSecurity
4577 * Purpose : The GetUserObjectSecurity function retrieves security information
4578 * for the specified user object.
4579 * Parameters: HANDLE hObj handle of user object
4580 * SECURITY_INFORMATION * pSIRequested address of requested security information
4581 * LPSECURITY_DESCRIPTOR pSID address of security descriptor
4582 * DWORD nLength size of buffer for security descriptor
4583 * LPDWORD lpnLengthNeeded address of required size of buffer
4584 * Variables :
4585 * Result : If the function succeeds, the return value is TRUE.
4586 * If the function fails, the return value is FALSE. To get extended
4587 * error information, call GetLastError.
4588 * Remark :
4589 * Status : UNTESTED STUB
4590 *
4591 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4592 *****************************************************************************/
4593
4594BOOL WIN32API GetUserObjectSecurity(HANDLE hObj,
4595 SECURITY_INFORMATION * pSIRequested,
4596 LPSECURITY_DESCRIPTOR pSID,
4597 DWORD nLength,
4598 LPDWORD lpnLengthNeeded)
4599{
4600 dprintf(("USER32:GetUserObjectSecurity (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
4601 hObj,
4602 pSIRequested,
4603 pSID,
4604 nLength,
4605 lpnLengthNeeded));
4606
4607 return (FALSE);
4608}
4609
4610
4611
4612/*****************************************************************************
4613 * Name : int WIN32API GetWindowRgn
4614 * Purpose : The GetWindowRgn function obtains a copy of the window region of a window.
4615 * Parameters: HWND hWnd handle to window whose window region is to be obtained
4616 * HRGN hRgn handle to region that receives a copy of the window region
4617 * Variables :
4618 * Result : NULLREGION, SIMPLEREGION, COMPLEXREGION, ERROR
4619 * Remark :
4620 * Status : UNTESTED STUB
4621 *
4622 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4623 *****************************************************************************/
4624
4625int WIN32API GetWindowRgn (HWND hWnd,
4626 HRGN hRgn)
4627{
4628 dprintf(("USER32:GetWindowRgn (%08xh,%08x) not implemented.\n",
4629 hWnd,
4630 hRgn));
4631
4632 return (NULLREGION);
4633}
4634
4635
4636
4637/*****************************************************************************
4638 * Name : HCURSOR WIN32API LoadCursorFromFileA
4639 * Purpose : The LoadCursorFromFile function creates a cursor based on data
4640 * contained in a file. The file is specified by its name or by a
4641 * system cursor identifier. The function returns a handle to the
4642 * newly created cursor. Files containing cursor data may be in
4643 * either cursor (.CUR) or animated cursor (.ANI) format.
4644 * Parameters: LPCTSTR lpFileName pointer to cursor file, or system cursor id
4645 * Variables :
4646 * Result : If the function is successful, the return value is a handle to
4647 * the new cursor.
4648 * If the function fails, the return value is NULL. To get extended
4649 * error information, call GetLastError. GetLastError may return
4650 * the following
4651 * Remark :
4652 * Status : UNTESTED STUB
4653 *
4654 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4655 *****************************************************************************/
4656
4657HCURSOR WIN32API LoadCursorFromFileA(LPCTSTR lpFileName)
4658{
4659 dprintf(("USER32:LoadCursorFromFileA (%s) not implemented.\n",
4660 lpFileName));
4661
4662 return (NULL);
4663}
4664
4665
4666/*****************************************************************************
4667 * Name : HCURSOR WIN32API LoadCursorFromFileW
4668 * Purpose : The LoadCursorFromFile function creates a cursor based on data
4669 * contained in a file. The file is specified by its name or by a
4670 * system cursor identifier. The function returns a handle to the
4671 * newly created cursor. Files containing cursor data may be in
4672 * either cursor (.CUR) or animated cursor (.ANI) format.
4673 * Parameters: LPCTSTR lpFileName pointer to cursor file, or system cursor id
4674 * Variables :
4675 * Result : If the function is successful, the return value is a handle to
4676 * the new cursor.
4677 * If the function fails, the return value is NULL. To get extended
4678 * error information, call GetLastError. GetLastError may return
4679 * the following
4680 * Remark :
4681 * Status : UNTESTED STUB
4682 *
4683 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4684 *****************************************************************************/
4685
4686HCURSOR WIN32API LoadCursorFromFileW(LPCWSTR lpFileName)
4687{
4688 dprintf(("USER32:LoadCursorFromFileW (%s) not implemented.\n",
4689 lpFileName));
4690
4691 return (NULL);
4692}
4693
4694
4695/*****************************************************************************
4696 * Name : HLK WIN32API LoadKeyboardLayoutA
4697 * Purpose : The LoadKeyboardLayout function loads a new keyboard layout into
4698 * the system. Several keyboard layouts can be loaded at a time, but
4699 * only one per process is active at a time. Loading multiple keyboard
4700 * layouts makes it possible to rapidly switch between layouts.
4701 * Parameters:
4702 * Variables :
4703 * Result : If the function succeeds, the return value is the handle of the
4704 * keyboard layout.
4705 * If the function fails, the return value is NULL. To get extended
4706 * error information, call GetLastError.
4707 * Remark :
4708 * Status : UNTESTED STUB
4709 *
4710 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4711 *****************************************************************************/
4712
4713HKL WIN32API LoadKeyboardLayoutA(LPCTSTR pwszKLID,
4714 UINT Flags)
4715{
4716 dprintf(("USER32:LeadKeyboardLayoutA (%s,%u) not implemented.\n",
4717 pwszKLID,
4718 Flags));
4719
4720 return (NULL);
4721}
4722
4723
4724/*****************************************************************************
4725 * Name : HLK WIN32API LoadKeyboardLayoutW
4726 * Purpose : The LoadKeyboardLayout function loads a new keyboard layout into
4727 * the system. Several keyboard layouts can be loaded at a time, but
4728 * only one per process is active at a time. Loading multiple keyboard
4729 * layouts makes it possible to rapidly switch between layouts.
4730 * Parameters:
4731 * Variables :
4732 * Result : If the function succeeds, the return value is the handle of the
4733 * keyboard layout.
4734 * If the function fails, the return value is NULL. To get extended
4735 * error information, call GetLastError.
4736 * Remark :
4737 * Status : UNTESTED STUB
4738 *
4739 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4740 *****************************************************************************/
4741
4742HKL WIN32API LoadKeyboardLayoutW(LPCWSTR pwszKLID,
4743 UINT Flags)
4744{
4745 dprintf(("USER32:LeadKeyboardLayoutW (%s,%u) not implemented.\n",
4746 pwszKLID,
4747 Flags));
4748
4749 return (NULL);
4750}
4751
4752
4753/*****************************************************************************
4754 * Name : UINT WIN32API MapVirtualKeyExA
4755 * Purpose : The MapVirtualKeyEx function translates (maps) a virtual-key
4756 * code into a scan code or character value, or translates a scan
4757 * code into a virtual-key code. The function translates the codes
4758 * using the input language and physical keyboard layout identified
4759 * by the given keyboard layout handle.
4760 * Parameters:
4761 * Variables :
4762 * Result : The return value is either a scan code, a virtual-key code, or
4763 * a character value, depending on the value of uCode and uMapType.
4764 * If there is no translation, the return value is zero.
4765 * Remark :
4766 * Status : UNTESTED STUB
4767 *
4768 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4769 *****************************************************************************/
4770
4771UINT WIN32API MapVirtualKeyExA(UINT uCode,
4772 UINT uMapType,
4773 HKL dwhkl)
4774{
4775 dprintf(("USER32:MapVirtualKeyExA (%u,%u,%08x) not implemented.\n",
4776 uCode,
4777 uMapType,
4778 dwhkl));
4779
4780 return (0);
4781}
4782
4783
4784/*****************************************************************************
4785 * Name : UINT WIN32API MapVirtualKeyExW
4786 * Purpose : The MapVirtualKeyEx function translates (maps) a virtual-key
4787 * code into a scan code or character value, or translates a scan
4788 * code into a virtual-key code. The function translates the codes
4789 * using the input language and physical keyboard layout identified
4790 * by the given keyboard layout handle.
4791 * Parameters:
4792 * Variables :
4793 * Result : The return value is either a scan code, a virtual-key code, or
4794 * a character value, depending on the value of uCode and uMapType.
4795 * If there is no translation, the return value is zero.
4796 * Remark :
4797 * Status : UNTESTED STUB
4798 *
4799 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4800 *****************************************************************************/
4801
4802UINT WIN32API MapVirtualKeyExW(UINT uCode,
4803 UINT uMapType,
4804 HKL dwhkl)
4805{
4806 dprintf(("USER32:MapVirtualKeyExW (%u,%u,%08x) not implemented.\n",
4807 uCode,
4808 uMapType,
4809 dwhkl));
4810
4811 return (0);
4812}
4813
4814
4815/*****************************************************************************
4816 * Name : int WIN32API MessageBoxExA
4817 * Purpose : The MessageBoxEx function creates, displays, and operates a message box.
4818 * Parameters: HWND hWnd handle of owner window
4819 * LPCTSTR lpText address of text in message box
4820 * LPCTSTR lpCaption address of title of message box
4821 * UINT uType style of message box
4822 * WORD wLanguageId language identifier
4823 * Variables :
4824 * Result : If the function succeeds, the return value is a nonzero menu-item
4825 * value returned by the dialog box.
4826 * Remark :
4827 * Status : UNTESTED STUB
4828 *
4829 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4830 *****************************************************************************/
4831
4832int WIN32API MessageBoxExA(HWND hWnd,
4833 LPCTSTR lpText,
4834 LPCTSTR lpCaption,
4835 UINT uType,
4836 WORD wLanguageId)
4837{
4838 dprintf(("USER32:MessageBoxExA (%08xh,%s,%s,%u,%08w) not implemented.\n",
4839 hWnd,
4840 lpText,
4841 lpCaption,
4842 uType,
4843 wLanguageId));
4844
4845 return (MessageBoxA(hWnd,
4846 lpText,
4847 lpCaption,
4848 uType));
4849}
4850
4851
4852/*****************************************************************************
4853 * Name : int WIN32API MessageBoxExW
4854 * Purpose : The MessageBoxEx function creates, displays, and operates a message box.
4855 * Parameters: HWND hWnd handle of owner window
4856 * LPCTSTR lpText address of text in message box
4857 * LPCTSTR lpCaption address of title of message box
4858 * UINT uType style of message box
4859 * WORD wLanguageId language identifier
4860 * Variables :
4861 * Result : If the function succeeds, the return value is a nonzero menu-item
4862 * value returned by the dialog box.
4863 * Remark :
4864 * Status : UNTESTED STUB
4865 *
4866 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4867 *****************************************************************************/
4868
4869int WIN32API MessageBoxExW(HWND hWnd,
4870 LPCWSTR lpText,
4871 LPCWSTR lpCaption,
4872 UINT uType,
4873 WORD wLanguageId)
4874{
4875
4876 dprintf(("USER32:MessageBoxExW (%08xh,%x,%x,%u,%08w) not implemented.\n",
4877 hWnd,
4878 lpText,
4879 lpCaption,
4880 uType,
4881 wLanguageId));
4882
4883 return MessageBoxW(hWnd, lpText, lpCaption, uType);
4884}
4885
4886
4887/*****************************************************************************
4888 * Name : BOOL WIN32API MessageBoxIndirectW
4889 * Purpose : The MessageBoxIndirect function creates, displays, and operates
4890 * a message box. The message box contains application-defined
4891 * message text and title, any icon, and any combination of
4892 * predefined push buttons.
4893 * Parameters:
4894 * Variables :
4895 * Result :
4896 * Remark :
4897 * Status : UNTESTED STUB
4898 *
4899 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4900 *****************************************************************************/
4901
4902BOOL WIN32API MessageBoxIndirectW(LPMSGBOXPARAMSW lpMsgBoxParams)
4903{
4904 dprintf(("USER32:MessageBoxIndirectW (%08x) not implemented.\n",
4905 lpMsgBoxParams));
4906
4907 return (FALSE);
4908}
4909
4910
4911/*****************************************************************************
4912 * Name : BOOL WIN32API MessageBoxIndirectA
4913 * Purpose : The MessageBoxIndirect function creates, displays, and operates
4914 * a message box. The message box contains application-defined
4915 * message text and title, any icon, and any combination of
4916 * predefined push buttons.
4917 * Parameters:
4918 * Variables :
4919 * Result :
4920 * Remark :
4921 * Status : UNTESTED STUB
4922 *
4923 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4924 *****************************************************************************/
4925
4926BOOL WIN32API MessageBoxIndirectA(LPMSGBOXPARAMSA lpMsgBoxParams)
4927{
4928 dprintf(("USER32:MessageBoxIndirectA (%08x) not implemented.\n",
4929 lpMsgBoxParams));
4930
4931 return (FALSE);
4932}
4933
4934
4935/*****************************************************************************
4936 * Name : DWORD WIN32API OemKeyScan
4937 * Purpose : The OemKeyScan function maps OEM ASCII codes 0 through 0x0FF
4938 * into the OEM scan codes and shift states. The function provides
4939 * information that allows a program to send OEM text to another
4940 * program by simulating keyboard input.
4941 * Parameters:
4942 * Variables :
4943 * Result :
4944 * Remark :
4945 * Status : UNTESTED STUB
4946 *
4947 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4948 *****************************************************************************/
4949
4950DWORD WIN32API OemKeyScan(WORD wOemChar)
4951{
4952 dprintf(("USER32:OemKeyScan (%u) not implemented.\n",
4953 wOemChar));
4954
4955 return (wOemChar);
4956}
4957
4958
4959/*****************************************************************************
4960 * Name : HDESK WIN32API OpenDesktopA
4961 * Purpose : The OpenDesktop function returns a handle to an existing desktop.
4962 * A desktop is a secure object contained within a window station
4963 * object. A desktop has a logical display surface and contains
4964 * windows, menus and hooks.
4965 * Parameters: LPCTSTR lpszDesktopName name of the desktop to open
4966 * DWORD dwFlags flags to control interaction with other applications
4967 * BOOL fInherit specifies whether returned handle is inheritable
4968 * DWORD dwDesiredAccess specifies access of returned handle
4969 * Variables :
4970 * Result : If the function succeeds, the return value is the handle to the
4971 * opened desktop.
4972 * If the function fails, the return value is NULL. To get extended
4973 * error information, call GetLastError.
4974 * Remark :
4975 * Status : UNTESTED STUB
4976 *
4977 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4978 *****************************************************************************/
4979
4980HDESK WIN32API OpenDesktopA(LPCTSTR lpszDesktopName,
4981 DWORD dwFlags,
4982 BOOL fInherit,
4983 DWORD dwDesiredAccess)
4984{
4985 dprintf(("USER32:OpenDesktopA (%s,%08xh,%08xh,%08x) not implemented.\n",
4986 lpszDesktopName,
4987 dwFlags,
4988 fInherit,
4989 dwDesiredAccess));
4990
4991 return (NULL);
4992}
4993
4994
4995/*****************************************************************************
4996 * Name : HDESK WIN32API OpenDesktopW
4997 * Purpose : The OpenDesktop function returns a handle to an existing desktop.
4998 * A desktop is a secure object contained within a window station
4999 * object. A desktop has a logical display surface and contains
5000 * windows, menus and hooks.
5001 * Parameters: LPCTSTR lpszDesktopName name of the desktop to open
5002 * DWORD dwFlags flags to control interaction with other applications
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 * opened desktop.
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
5016HDESK WIN32API OpenDesktopW(LPCTSTR lpszDesktopName,
5017 DWORD dwFlags,
5018 BOOL fInherit,
5019 DWORD dwDesiredAccess)
5020{
5021 dprintf(("USER32:OpenDesktopW (%s,%08xh,%08xh,%08x) not implemented.\n",
5022 lpszDesktopName,
5023 dwFlags,
5024 fInherit,
5025 dwDesiredAccess));
5026
5027 return (NULL);
5028}
5029
5030
5031/*****************************************************************************
5032 * Name : HDESK WIN32API OpenInputDesktop
5033 * Purpose : The OpenInputDesktop function returns a handle to the desktop
5034 * that receives user input. The input desktop is a desktop on the
5035 * window station associated with the logged-on user.
5036 * Parameters: DWORD dwFlags flags to control interaction with other applications
5037 * BOOL fInherit specifies whether returned handle is inheritable
5038 * DWORD dwDesiredAccess specifies access of returned handle
5039 * Variables :
5040 * Result : If the function succeeds, the return value is a handle of the
5041 * desktop that receives user input.
5042 * If the function fails, the return value is NULL. To get extended
5043 * error information, call GetLastError.
5044 * Remark :
5045 * Status : UNTESTED STUB
5046 *
5047 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5048 *****************************************************************************/
5049
5050HDESK WIN32API OpenInputDesktop(DWORD dwFlags,
5051 BOOL fInherit,
5052 DWORD dwDesiredAccess)
5053{
5054 dprintf(("USER32:OpenInputDesktop (%08xh,%08xh,%08x) not implemented.\n",
5055 dwFlags,
5056 fInherit,
5057 dwDesiredAccess));
5058
5059 return (NULL);
5060}
5061
5062
5063/*****************************************************************************
5064 * Name : HWINSTA WIN32API OpenWindowStationA
5065 * Purpose : The OpenWindowStation function returns a handle to an existing
5066 * window station.
5067 * Parameters: LPCTSTR lpszWinStaName name of the window station to open
5068 * BOOL fInherit specifies whether returned handle is inheritable
5069 * DWORD dwDesiredAccess specifies access of returned handle
5070 * Variables :
5071 * Result : If the function succeeds, the return value is the handle to the
5072 * specified window station.
5073 * If the function fails, the return value is NULL. To get extended
5074 * error information, call GetLastError.
5075 * Remark :
5076 * Status : UNTESTED STUB
5077 *
5078 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5079 *****************************************************************************/
5080
5081HWINSTA WIN32API OpenWindowStationA(LPCTSTR lpszWinStaName,
5082 BOOL fInherit,
5083 DWORD dwDesiredAccess)
5084{
5085 dprintf(("USER32:OpenWindowStatieonA (%s,%08xh,%08x) not implemented.\n",
5086 lpszWinStaName,
5087 fInherit,
5088 dwDesiredAccess));
5089
5090 return (NULL);
5091}
5092
5093
5094/*****************************************************************************
5095 * Name : HWINSTA WIN32API OpenWindowStationW
5096 * Purpose : The OpenWindowStation function returns a handle to an existing
5097 * window station.
5098 * Parameters: LPCTSTR lpszWinStaName name of the window station to open
5099 * BOOL fInherit specifies whether returned handle is inheritable
5100 * DWORD dwDesiredAccess specifies access of returned handle
5101 * Variables :
5102 * Result : If the function succeeds, the return value is the handle to the
5103 * specified window station.
5104 * If the function fails, the return value is NULL. To get extended
5105 * error information, call GetLastError.
5106
5107 * Remark :
5108 * Status : UNTESTED STUB
5109 *
5110 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5111 *****************************************************************************/
5112
5113HWINSTA WIN32API OpenWindowStationW(LPCTSTR lpszWinStaName,
5114 BOOL fInherit,
5115 DWORD dwDesiredAccess)
5116{
5117 dprintf(("USER32:OpenWindowStatieonW (%s,%08xh,%08x) not implemented.\n",
5118 lpszWinStaName,
5119 fInherit,
5120 dwDesiredAccess));
5121
5122 return (NULL);
5123}
5124
5125
5126/*****************************************************************************
5127 * Name : BOOL WIN32API PaintDesktop
5128 * Purpose : The PaintDesktop function fills the clipping region in the
5129 * specified device context with the desktop pattern or wallpaper.
5130 * The function is provided primarily for shell desktops.
5131 * Parameters:
5132 * Variables :
5133 * Result : If the function succeeds, the return value is TRUE.
5134 * If the function fails, the return value is FALSE.
5135 * Remark :
5136 * Status : UNTESTED STUB
5137 *
5138 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5139 *****************************************************************************/
5140
5141BOOL WIN32API PaintDesktop(HDC hdc)
5142{
5143 dprintf(("USER32:PaintDesktop (%08x) not implemented.\n",
5144 hdc));
5145
5146 return (FALSE);
5147}
5148
5149
5150/*****************************************************************************
5151 * Name : BOOL WIN32API SendMessageCallbackA
5152 * Purpose : The SendMessageCallback function sends the specified message to
5153 * a window or windows. The function calls the window procedure for
5154 * the specified window and returns immediately. After the window
5155 * procedure processes the message, the system calls the specified
5156 * callback function, passing the result of the message processing
5157 * and an application-defined value to the callback function.
5158 * Parameters: HWND hwnd handle of destination window
5159 * UINT uMsg message to send
5160 * WPARAM wParam first message parameter
5161 * LPARAM lParam second message parameter
5162 * SENDASYNCPROC lpResultCallBack function to receive message value
5163 * DWORD dwData value to pass to callback function
5164 * Variables :
5165 * Result : If the function succeeds, the return value is TRUE.
5166 * If the function fails, the return value is FALSE. To get extended
5167 * error information, call GetLastError.
5168 * Remark :
5169 * Status : UNTESTED STUB
5170 *
5171 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5172 *****************************************************************************/
5173
5174BOOL WIN32API SendMessageCallbackA(HWND hWnd,
5175 UINT uMsg,
5176 WPARAM wParam,
5177 LPARAM lParam,
5178 SENDASYNCPROC lpResultCallBack,
5179 DWORD dwData)
5180{
5181 dprintf(("USER32:SendMessageCallBackA (%08xh,%08xh,%08xh,%08xh,%08xh,%08x) not implemented.\n",
5182 hWnd,
5183 uMsg,
5184 wParam,
5185 lParam,
5186 lpResultCallBack,
5187 dwData));
5188
5189 return (FALSE);
5190}
5191
5192
5193/*****************************************************************************
5194 * Name : BOOL WIN32API SendMessageCallbackW
5195 * Purpose : The SendMessageCallback function sends the specified message to
5196 * a window or windows. The function calls the window procedure for
5197 * the specified window and returns immediately. After the window
5198 * procedure processes the message, the system calls the specified
5199 * callback function, passing the result of the message processing
5200 * and an application-defined value to the callback function.
5201 * Parameters: HWND hwnd handle of destination window
5202 * UINT uMsg message to send
5203 * WPARAM wParam first message parameter
5204 * LPARAM lParam second message parameter
5205 * SENDASYNCPROC lpResultCallBack function to receive message value
5206 * DWORD dwData value to pass to callback function
5207 * Variables :
5208 * Result : If the function succeeds, the return value is TRUE.
5209 * If the function fails, the return value is FALSE. To get extended
5210 * error information, call GetLastError.
5211 * Remark :
5212 * Status : UNTESTED STUB
5213 *
5214 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5215 *****************************************************************************/
5216
5217BOOL WIN32API SendMessageCallbackW(HWND hWnd,
5218 UINT uMsg,
5219 WPARAM wParam,
5220 LPARAM lParam,
5221 SENDASYNCPROC lpResultCallBack,
5222 DWORD dwData)
5223{
5224 dprintf(("USER32:SendMessageCallBackW (%08xh,%08xh,%08xh,%08xh,%08xh,%08x) not implemented.\n",
5225 hWnd,
5226 uMsg,
5227 wParam,
5228 lParam,
5229 lpResultCallBack,
5230 dwData));
5231
5232 return (FALSE);
5233}
5234
5235
5236/*****************************************************************************
5237 * Name : VOID WIN32API SetDebugErrorLevel
5238 * Purpose : The SetDebugErrorLevel function sets the minimum error level at
5239 * which Windows will generate debugging events and pass them to a debugger.
5240 * Parameters: DWORD dwLevel debugging error level
5241 * Variables :
5242 * Result :
5243 * Remark :
5244 * Status : UNTESTED STUB
5245 *
5246 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5247 *****************************************************************************/
5248
5249VOID WIN32API SetDebugErrorLevel(DWORD dwLevel)
5250{
5251 dprintf(("USER32:SetDebugErrorLevel (%08x) not implemented.\n",
5252 dwLevel));
5253}
5254
5255
5256/*****************************************************************************
5257 * Name : BOOL WIN32API SetProcessWindowStation
5258 * Purpose : The SetProcessWindowStation function assigns a window station
5259 * to the calling process. This enables the process to access
5260 * objects in the window station such as desktops, the clipboard,
5261 * and global atoms. All subsequent operations on the window station
5262 * use the access rights granted to hWinSta.
5263 * Parameters:
5264 * Variables :
5265 * Result : If the function succeeds, the return value is TRUE.
5266 * If the function fails, the return value is FALSE. To get extended
5267 * error information, call GetLastError.
5268 * Remark :
5269 * Status : UNTESTED STUB
5270 *
5271 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5272 *****************************************************************************/
5273
5274BOOL WIN32API SetProcessWindowStation(HWINSTA hWinSta)
5275{
5276 dprintf(("USER32:SetProcessWindowStation (%08x) not implemented.\n",
5277 hWinSta));
5278
5279 return (FALSE);
5280}
5281
5282
5283/*****************************************************************************
5284 * Name : BOOL WIN32API SetSystemCursor
5285 * Purpose : The SetSystemCursor function replaces the contents of the system
5286 * cursor specified by dwCursorId with the contents of the cursor
5287 * specified by hCursor, and then destroys hCursor. This function
5288 * lets an application customize the system cursors.
5289 * Parameters: HCURSOR hCursor set specified system cursor to this cursor's
5290 * contents, then destroy this
5291 * DWORD dwCursorID system cursor specified by its identifier
5292 * Variables :
5293 * Result : If the function succeeds, the return value is TRUE.
5294 * If the function fails, the return value is FALSE. To get extended
5295 * error information, call GetLastError.
5296 * Remark :
5297 * Status : UNTESTED STUB
5298 *
5299 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5300 *****************************************************************************/
5301
5302BOOL WIN32API SetSystemCursor(HCURSOR hCursor,
5303 DWORD dwCursorId)
5304{
5305 dprintf(("USER32:SetSystemCursor (%08xh,%08x) not implemented.\n",
5306 hCursor,
5307 dwCursorId));
5308
5309 return (FALSE);
5310}
5311
5312
5313/*****************************************************************************
5314 * Name : BOOL WIN32API SetThreadDesktop
5315 * Purpose : The SetThreadDesktop function assigns a desktop to the calling
5316 * thread. All subsequent operations on the desktop use the access
5317 * rights granted to hDesk.
5318 * Parameters: HDESK hDesk handle of the desktop to assign to this thread
5319 * Variables :
5320 * Result : If the function succeeds, the return value is TRUE.
5321 * If the function fails, the return value is FALSE. To get extended
5322 * error information, call GetLastError.
5323 * Remark :
5324 * Status : UNTESTED STUB
5325 *
5326 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5327 *****************************************************************************/
5328
5329BOOL WIN32API SetThreadDesktop(HDESK hDesktop)
5330{
5331 dprintf(("USER32:SetThreadDesktop (%08x) not implemented.\n",
5332 hDesktop));
5333
5334 return (FALSE);
5335}
5336
5337
5338/*****************************************************************************
5339 * Name : BOOL WIN32API SetUserObjectInformationA
5340 * Purpose : The SetUserObjectInformation function sets information about a
5341 * window station or desktop object.
5342 * Parameters: HANDLE hObject handle of the object for which to set information
5343 * int nIndex type of information to set
5344 * PVOID lpvInfo points to a buffer that contains the information
5345 * DWORD cbInfo size, in bytes, of lpvInfo buffer
5346 * Variables :
5347 * Result : If the function succeeds, the return value is TRUE.
5348 * If the function fails the return value is FALSE. To get extended
5349 * error information, call GetLastError.
5350 * Remark :
5351 * Status : UNTESTED STUB
5352 *
5353 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5354 *****************************************************************************/
5355
5356BOOL WIN32API SetUserObjectInformationA(HANDLE hObject,
5357 int nIndex,
5358 PVOID lpvInfo,
5359 DWORD cbInfo)
5360{
5361 dprintf(("USER32:SetUserObjectInformationA (%08xh,%u,%08xh,%08x) not implemented.\n",
5362 hObject,
5363 nIndex,
5364 lpvInfo,
5365 cbInfo));
5366
5367 return (FALSE);
5368}
5369
5370
5371/*****************************************************************************
5372 * Name : BOOL WIN32API SetUserObjectInformationW
5373 * Purpose : The SetUserObjectInformation function sets information about a
5374 * window station or desktop object.
5375 * Parameters: HANDLE hObject handle of the object for which to set information
5376 * int nIndex type of information to set
5377 * PVOID lpvInfo points to a buffer that contains the information
5378 * DWORD cbInfo size, in bytes, of lpvInfo buffer
5379 * Variables :
5380 * Result : If the function succeeds, the return value is TRUE.
5381 * If the function fails the return value is FALSE. To get extended
5382 * error information, call GetLastError.
5383 * Remark :
5384 * Status : UNTESTED STUB
5385 *
5386 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5387 *****************************************************************************/
5388
5389BOOL WIN32API SetUserObjectInformationW(HANDLE hObject,
5390 int nIndex,
5391 PVOID lpvInfo,
5392 DWORD cbInfo)
5393{
5394 dprintf(("USER32:SetUserObjectInformationW (%08xh,%u,%08xh,%08x) not implemented.\n",
5395 hObject,
5396 nIndex,
5397 lpvInfo,
5398 cbInfo));
5399
5400 return (FALSE);
5401}
5402
5403
5404/*****************************************************************************
5405 * Name : BOOL WIN32API SetUserObjectSecurity
5406 * Purpose : The SetUserObjectSecurity function sets the security of a user
5407 * object. This can be, for example, a window or a DDE conversation
5408 * Parameters: HANDLE hObject handle of user object
5409 * SECURITY_INFORMATION * psi address of security information
5410 * LPSECURITY_DESCRIPTOR psd address of security descriptor
5411 * Variables :
5412 * Result : If the function succeeds, the return value is TRUE.
5413 * If the function fails, the return value is FALSE. To get extended
5414 * error information, call GetLastError.
5415 * Remark :
5416 * Status : UNTESTED STUB
5417 *
5418 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5419 *****************************************************************************/
5420
5421BOOL WIN32API SetUserObjectSecurity(HANDLE hObject,
5422 SECURITY_INFORMATION * psi,
5423 LPSECURITY_DESCRIPTOR psd)
5424{
5425 dprintf(("USER32:SetUserObjectSecuroty (%08xh,%08xh,%08x) not implemented.\n",
5426 hObject,
5427 psi,
5428 psd));
5429
5430 return (FALSE);
5431}
5432
5433
5434/*****************************************************************************
5435 * Name : int WIN32API SetWindowRgn
5436 * Purpose : The SetWindowRgn function sets the window region of a window. The
5437 * window region determines the area within the window where the
5438 * operating system permits drawing. The operating system does not
5439 * display any portion of a window that lies outside of the window region
5440 * Parameters: HWND hWnd handle to window whose window region is to be set
5441 * HRGN hRgn handle to region
5442 * BOOL bRedraw window redraw flag
5443 * Variables :
5444 * Result : If the function succeeds, the return value is non-zero.
5445 * If the function fails, the return value is zero.
5446 * Remark :
5447 * Status : UNTESTED STUB
5448 *
5449 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5450 *****************************************************************************/
5451
5452int WIN32API SetWindowRgn(HWND hWnd,
5453 HRGN hRgn,
5454 BOOL bRedraw)
5455{
5456 dprintf(("USER32:SetWindowRgn (%08xh,%08xh,%u) not implemented.\n",
5457 hWnd,
5458 hRgn,
5459 bRedraw));
5460
5461 return (0);
5462}
5463
5464
5465/*****************************************************************************
5466 * Name : BOOL WIN32API SetWindowsHookW
5467 * Purpose : The SetWindowsHook function is not implemented in the Win32 API.
5468 * Win32-based applications should use the SetWindowsHookEx function.
5469 * Parameters:
5470 * Variables :
5471 * Result :
5472 * Remark : ARGH ! MICROSOFT !
5473 * Status : UNTESTED STUB
5474 *
5475 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5476 *****************************************************************************/
5477
5478HHOOK WIN32API SetWindowsHookW(int nFilterType, HOOKPROC pfnFilterProc)
5479
5480{
5481 return (FALSE);
5482}
5483
5484
5485/*****************************************************************************
5486 * Name : BOOL WIN32API ShowWindowAsync
5487 * Purpose : The ShowWindowAsync function sets the show state of a window
5488 * created by a different thread.
5489 * Parameters: HWND hwnd handle of window
5490 * int nCmdShow show state of window
5491 * Variables :
5492 * Result : If the window was previously visible, the return value is TRUE.
5493 * If the window was previously hidden, the return value is FALSE.
5494 * Remark :
5495 * Status : UNTESTED STUB
5496 *
5497 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5498 *****************************************************************************/
5499
5500BOOL WIN32API ShowWindowAsync (HWND hWnd,
5501 int nCmdShow)
5502{
5503 dprintf(("USER32:ShowWindowAsync (%08xh,%08x) not implemented.\n",
5504 hWnd,
5505 nCmdShow));
5506
5507 return (FALSE);
5508}
5509
5510
5511/*****************************************************************************
5512 * Name : BOOL WIN32API SwitchDesktop
5513 * Purpose : The SwitchDesktop function makes a desktop visible and activates
5514 * it. This enables the desktop to receive input from the user. The
5515 * calling process must have DESKTOP_SWITCHDESKTOP access to the
5516 * desktop for the SwitchDesktop function to succeed.
5517 * Parameters:
5518 * Variables :
5519 * Result : If the function succeeds, the return value is TRUE.
5520 * If the function fails, the return value is FALSE. To get extended
5521 * error information, call GetLastError.
5522 * Remark :
5523 * Status : UNTESTED STUB
5524 *
5525 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5526 *****************************************************************************/
5527
5528BOOL WIN32API SwitchDesktop(HDESK hDesktop)
5529{
5530 dprintf(("USER32:SwitchDesktop (%08x) not implemented.\n",
5531 hDesktop));
5532
5533 return (FALSE);
5534}
5535
5536
5537/*****************************************************************************
5538 * Name : WORD WIN32API TileWindows
5539 * Purpose : The TileWindows function tiles the specified windows, or the child
5540 * windows of the specified parent window.
5541 * Parameters: HWND hwndParent handle of parent window
5542 * WORD wFlags types of windows not to arrange
5543 * LPCRECT lpRect rectangle to arrange windows in
5544 * WORD cChildrenb number of windows to arrange
5545 * const HWND *ahwndChildren array of window handles
5546 * Variables :
5547 * Result : If the function succeeds, the return value is the number of
5548 * windows arranged.
5549 * If the function fails, the return value is zero.
5550 * Remark :
5551 * Status : UNTESTED STUB
5552 *
5553 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5554 *****************************************************************************/
5555
5556WORD WIN32API TileWindows(HWND hwndParent,
5557 UINT wFlags,
5558 const LPRECT lpRect,
5559 UINT cChildrenb,
5560 const HWND *ahwndChildren)
5561{
5562 dprintf(("USER32:TileWindows (%08xh,%08xh,%08xh,%08xh,%08x) not implemented.\n",
5563 hwndParent,
5564 wFlags,
5565 lpRect,
5566 cChildrenb,
5567 ahwndChildren));
5568
5569 return (0);
5570}
5571
5572
5573/*****************************************************************************
5574 * Name : int WIN32API ToAscii
5575 * Purpose : The ToAscii function translates the specified virtual-key code
5576 * and keyboard state to the corresponding Windows character or characters.
5577 * Parameters: UINT uVirtKey virtual-key code
5578 * UINT uScanCode scan code
5579 * PBYTE lpbKeyState address of key-state array
5580 * LPWORD lpwTransKey buffer for translated key
5581 * UINT fuState active-menu flag
5582 * Variables :
5583 * Result : 0 The specified virtual key has no translation for the current
5584 * state of the keyboard.
5585 * 1 One Windows character was copied to the buffer.
5586 * 2 Two characters were copied to the buffer. This usually happens
5587 * when a dead-key character (accent or diacritic) stored in the
5588 * keyboard layout cannot be composed with the specified virtual
5589 * key to form a single character.
5590 * Remark :
5591 * Status : UNTESTED STUB
5592 *
5593 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5594 *****************************************************************************/
5595
5596int WIN32API ToAscii(UINT uVirtKey,
5597 UINT uScanCode,
5598 PBYTE lpbKeyState,
5599 LPWORD lpwTransKey,
5600 UINT fuState)
5601{
5602 dprintf(("USER32:ToAscii (%u,%u,%08xh,%08xh,%u) not implemented.\n",
5603 uVirtKey,
5604 uScanCode,
5605 lpbKeyState,
5606 lpwTransKey,
5607 fuState));
5608
5609 return (0);
5610}
5611
5612
5613/*****************************************************************************
5614 * Name : int WIN32API ToAsciiEx
5615 * Purpose : The ToAscii function translates the specified virtual-key code
5616 * and keyboard state to the corresponding Windows character or characters.
5617 * Parameters: UINT uVirtKey virtual-key code
5618 * UINT uScanCode scan code
5619 * PBYTE lpbKeyState address of key-state array
5620 * LPWORD lpwTransKey buffer for translated key
5621 * UINT fuState active-menu flag
5622 * HLK hlk keyboard layout handle
5623 * Variables :
5624 * Result : 0 The specified virtual key has no translation for the current
5625 * state of the keyboard.
5626 * 1 One Windows character was copied to the buffer.
5627 * 2 Two characters were copied to the buffer. This usually happens
5628 * when a dead-key character (accent or diacritic) stored in the
5629 * keyboard layout cannot be composed with the specified virtual
5630 * key to form a single character.
5631 * Remark :
5632 * Status : UNTESTED STUB
5633 *
5634 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5635 *****************************************************************************/
5636
5637int WIN32API ToAsciiEx(UINT uVirtKey,
5638 UINT uScanCode,
5639 PBYTE lpbKeyState,
5640 LPWORD lpwTransKey,
5641 UINT fuState,
5642 HKL hkl)
5643{
5644 dprintf(("USER32:ToAsciiEx (%u,%u,%08xh,%08xh,%u,%08x) not implemented.\n",
5645 uVirtKey,
5646 uScanCode,
5647 lpbKeyState,
5648 lpwTransKey,
5649 fuState,
5650 hkl));
5651
5652 return (0);
5653}
5654
5655
5656/*****************************************************************************
5657 * Name : int WIN32API ToUnicode
5658 * Purpose : The ToUnicode function translates the specified virtual-key code
5659 * and keyboard state to the corresponding Unicode character or characters.
5660 * Parameters: UINT wVirtKey virtual-key code
5661 * UINT wScanCode scan code
5662 * PBYTE lpKeyState address of key-state array
5663 * LPWSTR pwszBuff buffer for translated key
5664 * int cchBuff size of translated key buffer
5665 * UINT wFlags set of function-conditioning flags
5666 * Variables :
5667 * Result : - 1 The specified virtual key is a dead-key character (accent or
5668 * diacritic). This value is returned regardless of the keyboard
5669 * layout, even if several characters have been typed and are
5670 * stored in the keyboard state. If possible, even with Unicode
5671 * keyboard layouts, the function has written a spacing version of
5672 * the dead-key character to the buffer specified by pwszBuffer.
5673 * For example, the function writes the character SPACING ACUTE
5674 * (0x00B4), rather than the character NON_SPACING ACUTE (0x0301).
5675 * 0 The specified virtual key has no translation for the current
5676 * state of the keyboard. Nothing was written to the buffer
5677 * specified by pwszBuffer.
5678 * 1 One character was written to the buffer specified by pwszBuffer.
5679 * 2 or more Two or more characters were written to the buffer specified by
5680 * pwszBuff. The most common cause for this is that a dead-key
5681 * character (accent or diacritic) stored in the keyboard layout
5682 * could not be combined with the specified virtual key to form a
5683 * single character.
5684 * Remark :
5685 * Status : UNTESTED STUB
5686 *
5687 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5688 *****************************************************************************/
5689
5690int WIN32API ToUnicode(UINT uVirtKey,
5691 UINT uScanCode,
5692 PBYTE lpKeyState,
5693 LPWSTR pwszBuff,
5694 int cchBuff,
5695 UINT wFlags)
5696{
5697 dprintf(("USER32:ToUnicode (%u,%u,%08xh,%08xh,%u,%08x) not implemented.\n",
5698 uVirtKey,
5699 uScanCode,
5700 lpKeyState,
5701 pwszBuff,
5702 cchBuff,
5703 wFlags));
5704
5705 return (0);
5706}
5707
5708
5709/*****************************************************************************
5710 * Name : BOOL WIN32API UnloadKeyboardLayout
5711 * Purpose : The UnloadKeyboardLayout function removes a keyboard layout.
5712 * Parameters: HKL hkl handle of keyboard layout
5713 * Variables :
5714 * Result : If the function succeeds, the return value is the handle of the
5715 * keyboard layout; otherwise, it is NULL. To get extended error
5716 * information, use the GetLastError function.
5717 * Remark :
5718 * Status : UNTESTED STUB
5719 *
5720 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5721 *****************************************************************************/
5722
5723BOOL WIN32API UnloadKeyboardLayout (HKL hkl)
5724{
5725 dprintf(("USER32:UnloadKeyboardLayout (%08x) not implemented.\n",
5726 hkl));
5727
5728 return (0);
5729}
5730
5731
5732/*****************************************************************************
5733 * Name : SHORT WIN32API VkKeyScanExW
5734 * Purpose : The VkKeyScanEx function translates a character to the
5735 * corresponding virtual-key code and shift state. The function
5736 * translates the character using the input language and physical
5737 * keyboard layout identified by the given keyboard layout handle.
5738 * Parameters: UINT uChar character to translate
5739 * HKL hkl keyboard layout handle
5740 * Variables :
5741 * Result : see docs
5742 * Remark :
5743 * Status : UNTESTED STUB
5744 *
5745 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5746 *****************************************************************************/
5747
5748WORD WIN32API VkKeyScanExW(WCHAR uChar,
5749 HKL hkl)
5750{
5751 dprintf(("USER32:VkKeyScanExW (%u,%08x) not implemented.\n",
5752 uChar,
5753 hkl));
5754
5755 return (uChar);
5756}
5757
5758
5759/*****************************************************************************
5760 * Name : SHORT WIN32API VkKeyScanExA
5761 * Purpose : The VkKeyScanEx function translates a character to the
5762 * corresponding virtual-key code and shift state. The function
5763 * translates the character using the input language and physical
5764 * keyboard layout identified by the given keyboard layout handle.
5765 * Parameters: UINT uChar character to translate
5766 * HKL hkl keyboard layout handle
5767 * Variables :
5768 * Result : see docs
5769 * Remark :
5770 * Status : UNTESTED STUB
5771 *
5772 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5773 *****************************************************************************/
5774
5775WORD WIN32API VkKeyScanExA(CHAR uChar,
5776 HKL hkl)
5777{
5778 dprintf(("USER32:VkKeyScanExA (%u,%08x) not implemented.\n",
5779 uChar,
5780 hkl));
5781
5782 return (uChar);
5783}
5784
5785
5786/*****************************************************************************
5787 * Name : VOID WIN32API keybd_event
5788 * Purpose : The keybd_event function synthesizes a keystroke. The system
5789 * can use such a synthesized keystroke to generate a WM_KEYUP or
5790 * WM_KEYDOWN message. The keyboard driver's interrupt handler calls
5791 * the keybd_event function.
5792 * Parameters: BYTE bVk virtual-key code
5793
5794 * BYTE bScan hardware scan code
5795 * DWORD dwFlags flags specifying various function options
5796 * DWORD dwExtraInfo additional data associated with keystroke
5797 * Variables :
5798 * Result :
5799 * Remark :
5800 * Status : UNTESTED STUB
5801 *
5802 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5803 *****************************************************************************/
5804
5805VOID WIN32API keybd_event (BYTE bVk,
5806 BYTE bScan,
5807 DWORD dwFlags,
5808 DWORD dwExtraInfo)
5809{
5810 dprintf(("USER32:keybd_event (%u,%u,%08xh,%08x) not implemented.\n",
5811 bVk,
5812 bScan,
5813 dwFlags,
5814 dwExtraInfo));
5815}
5816
5817
5818/*****************************************************************************
5819 * Name : VOID WIN32API mouse_event
5820 * Purpose : The mouse_event function synthesizes mouse motion and button clicks.
5821 * Parameters: DWORD dwFlags flags specifying various motion/click variants
5822 * DWORD dx horizontal mouse position or position change
5823 * DWORD dy vertical mouse position or position change
5824 * DWORD cButtons unused, reserved for future use, set to zero
5825 * DWORD dwExtraInfo 32 bits of application-defined information
5826 * Variables :
5827 * Result :
5828 * Remark :
5829 * Status : UNTESTED STUB
5830 *
5831 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5832 *****************************************************************************/
5833
5834VOID WIN32API mouse_event(DWORD dwFlags,
5835 DWORD dx,
5836 DWORD dy,
5837 DWORD cButtons,
5838 DWORD dwExtraInfo)
5839{
5840 dprintf(("USER32:mouse_event (%08xh,%u,%u,%u,%08x) not implemented.\n",
5841 dwFlags,
5842 dx,
5843 dy,
5844 cButtons,
5845 dwExtraInfo));
5846}
5847
5848
5849/*****************************************************************************
5850 * Name : BOOL WIN32API SetShellWindow
5851 * Purpose : Unknown
5852 * Parameters: Unknown
5853 * Variables :
5854 * Result :
5855 * Remark :
5856 * Status : UNTESTED UNKNOWN STUB
5857 *
5858 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
5859 *****************************************************************************/
5860
5861BOOL WIN32API SetShellWindow(DWORD x1)
5862{
5863 dprintf(("USER32: SetShellWindow(%08x) not implemented.\n",
5864 x1));
5865
5866 return (FALSE); /* default */
5867}
5868
5869
5870/*****************************************************************************
5871 * Name : BOOL WIN32API PlaySoundEvent
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 PlaySoundEvent(DWORD x1)
5883{
5884 dprintf(("USER32: PlaySoundEvent(%08x) not implemented.\n",
5885 x1));
5886
5887 return (FALSE); /* default */
5888}
5889
5890
5891/*****************************************************************************
5892 * Name : BOOL WIN32API TileChildWindows
5893 * Purpose : Unknown
5894 * Parameters: Unknown
5895 * Variables :
5896 * Result :
5897 * Remark :
5898 * Status : UNTESTED UNKNOWN STUB
5899 *
5900 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
5901 *****************************************************************************/
5902
5903BOOL WIN32API TileChildWindows(DWORD x1,
5904 DWORD x2)
5905{
5906 dprintf(("USER32: TileChildWindows(%08xh,%08xh) not implemented.\n",
5907 x1,
5908 x2));
5909
5910 return (FALSE); /* default */
5911}
5912
5913
5914/*****************************************************************************
5915 * Name : BOOL WIN32API SetSysColorsTemp
5916 * Purpose : Unknown
5917 * Parameters: Unknown
5918 * Variables :
5919 * Result :
5920 * Remark :
5921 * Status : UNTESTED UNKNOWN STUB
5922 *
5923 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
5924 *****************************************************************************/
5925
5926BOOL WIN32API SetSysColorsTemp(void)
5927{
5928 dprintf(("USER32: SetSysColorsTemp() not implemented.\n"));
5929
5930 return (FALSE); /* default */
5931}
5932
5933
5934/*****************************************************************************
5935 * Name : BOOL WIN32API RegisterNetworkCapabilities
5936 * Purpose : Unknown
5937 * Parameters: Unknown
5938 * Variables :
5939 * Result :
5940 * Remark :
5941 * Status : UNTESTED UNKNOWN STUB
5942 *
5943 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
5944 *****************************************************************************/
5945
5946BOOL WIN32API RegisterNetworkCapabilities(DWORD x1,
5947 DWORD x2)
5948{
5949 dprintf(("USER32: RegisterNetworkCapabilities(%08xh,%08xh) not implemented.\n",
5950 x1,
5951 x2));
5952
5953 return (FALSE); /* default */
5954}
5955
5956
5957/*****************************************************************************
5958 * Name : BOOL WIN32API EndTask
5959 * Purpose : Unknown
5960 * Parameters: Unknown
5961 * Variables :
5962 * Result :
5963 * Remark :
5964 * Status : UNTESTED UNKNOWN STUB
5965 *
5966 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
5967 *****************************************************************************/
5968
5969BOOL WIN32API EndTask(DWORD x1,
5970 DWORD x2,
5971 DWORD x3)
5972{
5973 dprintf(("USER32: EndTask(%08xh,%08xh,%08xh) not implemented.\n",
5974 x1,
5975 x2,
5976 x3));
5977
5978 return (FALSE); /* default */
5979}
5980
5981
5982/*****************************************************************************
5983 * Name : BOOL WIN32API SwitchToThisWindow
5984 * Purpose : Unknown
5985 * Parameters: Unknown
5986 * Variables :
5987 * Result :
5988 * Remark :
5989 * Status : UNTESTED UNKNOWN STUB
5990 *
5991 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
5992 *****************************************************************************/
5993
5994BOOL WIN32API SwitchToThisWindow(HWND hwnd,
5995 BOOL x2)
5996{
5997 dprintf(("USER32: SwitchToThisWindow(%08xh,%08xh) not implemented.\n",
5998 hwnd,
5999 x2));
6000
6001 return (FALSE); /* default */
6002}
6003
6004
6005/*****************************************************************************
6006 * Name : BOOL WIN32API GetNextQueueWindow
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
6017BOOL WIN32API GetNextQueueWindow(DWORD x1,
6018 DWORD x2)
6019{
6020 dprintf(("USER32: GetNextQueueWindow(%08xh,%08xh) not implemented.\n",
6021 x1,
6022 x2));
6023
6024 return (FALSE); /* default */
6025}
6026
6027
6028/*****************************************************************************
6029 * Name : BOOL WIN32API YieldTask
6030 * Purpose : Unknown
6031 * Parameters: Unknown
6032 * Variables :
6033 * Result :
6034 * Remark :
6035 * Status : UNTESTED UNKNOWN STUB
6036 *
6037 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6038 *****************************************************************************/
6039
6040BOOL WIN32API YieldTask(void)
6041{
6042 dprintf(("USER32: YieldTask() not implemented.\n"));
6043
6044 return (FALSE); /* default */
6045}
6046
6047
6048/*****************************************************************************
6049 * Name : BOOL WIN32API WinOldAppHackoMatic
6050 * Purpose : Unknown
6051 * Parameters: Unknown
6052 * Variables :
6053 * Result :
6054 * Remark :
6055 * Status : UNTESTED UNKNOWN STUB
6056 *
6057 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6058 *****************************************************************************/
6059
6060BOOL WIN32API WinOldAppHackoMatic(DWORD x1)
6061{
6062 dprintf(("USER32: WinOldAppHackoMatic(%08x) not implemented.\n",
6063 x1));
6064
6065 return (FALSE); /* default */
6066}
6067
6068
6069/*****************************************************************************
6070 * Name : BOOL WIN32API DragObject
6071 * Purpose : Unknown
6072 * Parameters: Unknown
6073 * Variables :
6074 * Result :
6075 * Remark :
6076 * Status : UNTESTED UNKNOWN STUB
6077 *
6078 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6079 *****************************************************************************/
6080
6081DWORD WIN32API DragObject(HWND x1,HWND x2,UINT x3,DWORD x4,HCURSOR x5)
6082{
6083 dprintf(("USER32: DragObject(%08x,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
6084 x1,
6085 x2,
6086 x3,
6087 x4,
6088 x5));
6089
6090 return (FALSE); /* default */
6091}
6092
6093
6094/*****************************************************************************
6095 * Name : BOOL WIN32API CascadeChildWindows
6096 * Purpose : Unknown
6097 * Parameters: Unknown
6098 * Variables :
6099 * Result :
6100 * Remark :
6101 * Status : UNTESTED UNKNOWN STUB
6102 *
6103 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6104 *****************************************************************************/
6105
6106BOOL WIN32API CascadeChildWindows(DWORD x1,
6107 DWORD x2)
6108{
6109 dprintf(("USER32: CascadeChildWindows(%08xh,%08xh) not implemented.\n",
6110 x1,
6111 x2));
6112
6113 return (FALSE); /* default */
6114}
6115
6116
6117/*****************************************************************************
6118 * Name : BOOL WIN32API RegisterSystemThread
6119 * Purpose : Unknown
6120 * Parameters: Unknown
6121 * Variables :
6122 * Result :
6123 * Remark :
6124 * Status : UNTESTED UNKNOWN STUB
6125 *
6126 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6127 *****************************************************************************/
6128
6129BOOL WIN32API RegisterSystemThread(DWORD x1,
6130 DWORD x2)
6131{
6132 dprintf(("USER32: RegisterSystemThread(%08xh,%08xh) not implemented.\n",
6133 x1,
6134 x2));
6135
6136 return (FALSE); /* default */
6137}
6138
6139
6140/*****************************************************************************
6141 * Name : BOOL WIN32API IsHungThread
6142 * Purpose : Unknown
6143 * Parameters: Unknown
6144 * Variables :
6145 * Result :
6146 * Remark :
6147 * Status : UNTESTED UNKNOWN STUB
6148 *
6149 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6150 *****************************************************************************/
6151
6152BOOL WIN32API IsHungThread(DWORD x1)
6153{
6154 dprintf(("USER32: IsHungThread(%08xh) not implemented.\n",
6155 x1));
6156
6157 return (FALSE); /* default */
6158}
6159
6160
6161/*****************************************************************************
6162 * Name : BOOL WIN32API SysErrorBox
6163 * Purpose : Unknown
6164 * Parameters: Unknown
6165 * Variables :
6166 * Result :
6167 * Remark : HARDERR like ?
6168 * Status : UNTESTED UNKNOWN STUB
6169 *
6170 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6171 *****************************************************************************/
6172
6173BOOL WIN32API SysErrorBox(DWORD x1,
6174 DWORD x2,
6175 DWORD x3)
6176{
6177 dprintf(("USER32: SysErrorBox(%08xh,%08xh,%08xh) not implemented.\n",
6178 x1,
6179 x2,
6180 x3));
6181
6182 return (FALSE); /* default */
6183}
6184
6185
6186/*****************************************************************************
6187 * Name : BOOL WIN32API UserSignalProc
6188 * Purpose : Unknown
6189 * Parameters: Unknown
6190 * Variables :
6191 * Result :
6192 * Remark :
6193 * Status : UNTESTED UNKNOWN STUB
6194 *
6195 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6196 *****************************************************************************/
6197
6198BOOL WIN32API UserSignalProc(DWORD x1,
6199 DWORD x2,
6200 DWORD x3,
6201 DWORD x4)
6202{
6203 dprintf(("USER32: SysErrorBox(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
6204 x1,
6205 x2,
6206 x3,
6207 x4));
6208
6209 return (FALSE); /* default */
6210}
6211
6212
6213/*****************************************************************************
6214 * Name : BOOL WIN32API GetShellWindow
6215 * Purpose : Unknown
6216 * Parameters: Unknown
6217 * Variables :
6218 * Result :
6219 * Remark :
6220 * Status : UNTESTED UNKNOWN STUB
6221 *
6222 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6223 *****************************************************************************/
6224
6225HWND WIN32API GetShellWindow(void)
6226{
6227 dprintf(("USER32: GetShellWindow() not implemented.\n"));
6228
6229 return (0); /* default */
6230}
6231
6232
6233/***********************************************************************
6234 * RegisterTasklist32 [USER32.436]
6235 */
6236DWORD WIN32API RegisterTasklist (DWORD x)
6237{
6238 dprintf(("USER32: RegisterTasklist(%08xh) not implemented.\n",
6239 x));
6240
6241 return TRUE;
6242}
6243
6244
6245/***********************************************************************
6246 * DrawCaptionTemp32A [USER32.599]
6247 *
6248 * PARAMS
6249 *
6250 * RETURNS
6251 * Success:
6252 * Failure:
6253 */
6254
6255BOOL WIN32API DrawCaptionTempA(HWND hwnd,
6256 HDC hdc,
6257 const RECT *rect,
6258 HFONT hFont,
6259 HICON hIcon,
6260 LPCSTR str,
6261 UINT uFlags)
6262{
6263 RECT rc = *rect;
6264
6265 dprintf(("USER32: DrawCaptionTempA(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh)\n",
6266 hwnd,
6267 hdc,
6268 rect,
6269 hFont,
6270 hIcon,
6271 str,
6272 uFlags));
6273
6274 /* drawing background */
6275 if (uFlags & DC_INBUTTON)
6276 {
6277 O32_FillRect (hdc,
6278 &rc,
6279 GetSysColorBrush (COLOR_3DFACE));
6280
6281 if (uFlags & DC_ACTIVE)
6282 {
6283 HBRUSH hbr = O32_SelectObject (hdc,
6284 GetSysColorBrush (COLOR_ACTIVECAPTION));
6285 O32_PatBlt (hdc,
6286 rc.left,
6287 rc.top,
6288 rc.right - rc.left,
6289 rc.bottom - rc.top,
6290 0xFA0089);
6291
6292 O32_SelectObject (hdc,
6293 hbr);
6294 }
6295 }
6296 else
6297 {
6298 O32_FillRect (hdc,
6299 &rc,
6300 GetSysColorBrush ((uFlags & DC_ACTIVE) ?
6301 COLOR_ACTIVECAPTION : COLOR_INACTIVECAPTION));
6302 }
6303
6304
6305 /* drawing icon */
6306 if ((uFlags & DC_ICON) && !(uFlags & DC_SMALLCAP))
6307 {
6308 POINT pt;
6309
6310 pt.x = rc.left + 2;
6311 pt.y = (rc.bottom + rc.top - O32_GetSystemMetrics(SM_CYSMICON)) / 2;
6312
6313 if (hIcon)
6314 {
6315 DrawIconEx (hdc,
6316 pt.x,
6317 pt.y,
6318 hIcon,
6319 O32_GetSystemMetrics(SM_CXSMICON),
6320 O32_GetSystemMetrics(SM_CYSMICON),
6321 0,
6322 0,
6323 DI_NORMAL);
6324 }
6325 else
6326 {
6327 /* @@@PH 1999/06/08 not ported yet, just don't draw any icon
6328 WND *wndPtr = WIN_FindWndPtr(hwnd);
6329 HICON hAppIcon = 0;
6330
6331 if (wndPtr->class->hIconSm)
6332 hAppIcon = wndPtr->class->hIconSm;
6333 else
6334 if (wndPtr->class->hIcon)
6335 hAppIcon = wndPtr->class->hIcon;
6336
6337 DrawIconEx (hdc,
6338 pt.x,
6339 pt.y,
6340 hAppIcon,
6341 GetSystemMetrics(SM_CXSMICON),
6342 GetSystemMetrics(SM_CYSMICON),
6343 0,
6344 0,
6345 DI_NORMAL);
6346
6347 WIN_ReleaseWndPtr(wndPtr);
6348 */
6349 }
6350
6351 rc.left += (rc.bottom - rc.top);
6352 }
6353
6354 /* drawing text */
6355 if (uFlags & DC_TEXT)
6356 {
6357 HFONT hOldFont;
6358
6359 if (uFlags & DC_INBUTTON)
6360 O32_SetTextColor (hdc,
6361 O32_GetSysColor (COLOR_BTNTEXT));
6362 else
6363 if (uFlags & DC_ACTIVE)
6364 O32_SetTextColor (hdc,
6365 O32_GetSysColor (COLOR_CAPTIONTEXT));
6366 else
6367 O32_SetTextColor (hdc,
6368 O32_GetSysColor (COLOR_INACTIVECAPTIONTEXT));
6369
6370 O32_SetBkMode (hdc,
6371 TRANSPARENT);
6372
6373 if (hFont)
6374 hOldFont = O32_SelectObject (hdc,
6375 hFont);
6376 else
6377 {
6378 NONCLIENTMETRICSA nclm;
6379 HFONT hNewFont;
6380
6381 nclm.cbSize = sizeof(NONCLIENTMETRICSA);
6382 O32_SystemParametersInfo (SPI_GETNONCLIENTMETRICS,
6383 0,
6384 &nclm,
6385 0);
6386 hNewFont = O32_CreateFontIndirect ((uFlags & DC_SMALLCAP) ?
6387 &nclm.lfSmCaptionFont : &nclm.lfCaptionFont);
6388 hOldFont = O32_SelectObject (hdc,
6389 hNewFont);
6390 }
6391
6392 if (str)
6393 O32_DrawText (hdc,
6394 str,
6395 -1,
6396 &rc,
6397 DT_SINGLELINE | DT_VCENTER | DT_NOPREFIX | DT_LEFT);
6398 else
6399 {
6400 CHAR szText[128];
6401 INT nLen;
6402
6403 nLen = O32_GetWindowText (hwnd,
6404 szText,
6405 128);
6406
6407 O32_DrawText (hdc,
6408 szText,
6409 nLen,
6410 &rc,
6411 DT_SINGLELINE | DT_VCENTER | DT_NOPREFIX | DT_LEFT);
6412 }
6413
6414 if (hFont)
6415 O32_SelectObject (hdc,
6416 hOldFont);
6417 else
6418 O32_DeleteObject (O32_SelectObject (hdc,
6419 hOldFont));
6420 }
6421
6422 /* drawing focus ??? */
6423 if (uFlags & 0x2000)
6424 {
6425 dprintf(("USER32: DrawCaptionTempA undocumented flag (0x2000)!\n"));
6426 }
6427
6428 return 0;
6429}
6430
6431
6432/***********************************************************************
6433 * DrawCaptionTemp32W [USER32.602]
6434 *
6435 * PARAMS
6436 *
6437 * RETURNS
6438 * Success:
6439 * Failure:
6440 */
6441
6442BOOL WIN32API DrawCaptionTempW (HWND hwnd,
6443 HDC hdc,
6444 const RECT *rect,
6445 HFONT hFont,
6446 HICON hIcon,
6447 LPCWSTR str,
6448 UINT uFlags)
6449{
6450 LPSTR strAscii = UnicodeToAsciiString((LPWSTR)str);
6451
6452 BOOL res = DrawCaptionTempA (hwnd,
6453 hdc,
6454 rect,
6455 hFont,
6456 hIcon,
6457 strAscii,
6458 uFlags);
6459
6460 FreeAsciiString(strAscii);
6461
6462 return res;
6463}
Note: See TracBrowser for help on using the repository browser.