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

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

DrawState & DrawTextEx ported by Rene Pronk

File size: 229.4 KB
Line 
1/* $Id: user32.cpp,v 1.20 1999-08-03 21:22:33 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 hwnd, PRECT pRect)
483{
484 BOOL rc;
485
486 rc = O32_GetClientRect(hwnd, pRect);
487 dprintf(("USER32: GetClientRect of %X returned (%d,%d) (%d,%d)\n", hwnd, pRect->left, pRect->top, pRect->right, pRect->bottom));
488 return rc;
489}
490//******************************************************************************
491//******************************************************************************
492HWND WIN32API FindWindowA(LPCSTR arg1, LPCSTR arg2)
493{
494#ifdef DEBUG
495 WriteLog("USER32: FindWindow\n");
496#endif
497 return O32_FindWindow(arg1, arg2);
498}
499//******************************************************************************
500//******************************************************************************
501HWND WIN32API FindWindowExA(HWND arg1, HWND arg2, LPCSTR arg3, LPCSTR arg4)
502{
503#ifdef DEBUG
504 WriteLog("USER32: FindWindowExA, not completely implemented\n");
505#endif
506 return O32_FindWindow(arg3, arg4);
507}
508//******************************************************************************
509//******************************************************************************
510BOOL WIN32API FlashWindow( HWND arg1, BOOL arg2)
511{
512#ifdef DEBUG
513 WriteLog("USER32: FlashWindow\n");
514#endif
515 return O32_FlashWindow(arg1, arg2);
516}
517//******************************************************************************
518//******************************************************************************
519BOOL WIN32API EndPaint( HWND arg1, const PAINTSTRUCT * arg2)
520{
521#ifdef DEBUG
522 WriteLog("USER32: EndPaint\n");
523#endif
524 return O32_EndPaint(arg1, arg2);
525}
526//******************************************************************************
527//******************************************************************************
528BOOL WIN32API MoveWindow(HWND arg1, int arg2, int arg3, int arg4, int arg5, BOOL arg6)
529{
530 BOOL rc;
531
532 rc = O32_MoveWindow(arg1, arg2, arg3, arg4, arg5, arg6);
533 dprintf(("USER32: MoveWindow %X to (%d,%d) size (%d,%d), repaint = %d returned %d\n", arg1, arg2, arg3, arg4, arg5, arg6, rc));
534 return(rc);
535}
536//******************************************************************************
537//******************************************************************************
538HWND WIN32API CreateWindowExA(DWORD dwExStyle,
539 LPCSTR arg2,
540 LPCSTR arg3,
541 DWORD dwStyle,
542 int x,
543 int y,
544 int nWidth,
545 int nHeight,
546 HWND parent,
547 HMENU arg10,
548 HINSTANCE arg11,
549 PVOID arg12)
550{
551 HWND hwnd;
552 Win32WindowProc *window = NULL;
553
554 /* @@@PH 98/06/12 CreateWindow crashes somewhere in Open32 */
555 if(arg3 == NULL)
556 arg3 = (LPCSTR)"CRASH, CRASH";
557
558 // 6-12-99 CB: WS_CLIPCHILDREN not set -> controls not redrawn
559 // Problems with group boxes
560 //SvL: Not necessary anymore (EB's fixes)
561// dwStyle |= WS_CLIPCHILDREN;
562
563 //SvL: Correct window style (like Wine does)
564 if(dwStyle & WS_CHILD) {
565 dwStyle |= WS_CLIPSIBLINGS;
566 if(!(dwStyle & WS_POPUP)) {
567 dwStyle |= WS_CAPTION;
568 }
569 }
570 if(dwExStyle & WS_EX_DLGMODALFRAME)
571 {
572 dwStyle &= ~WS_THICKFRAME;
573 }
574
575#ifdef DEBUG
576 WriteLog("USER32: CreateWindow: dwExStyle = %X\n", dwExStyle);
577 if((int)arg2 >> 16 != 0)
578 WriteLog("USER32: CreateWindow: classname = %s\n", arg2);
579 else WriteLog("USER32: CreateWindow: classname = %X\n", arg2);
580 WriteLog("USER32: CreateWindow: windowname= %s\n", arg3);
581 WriteLog("USER32: CreateWindow: dwStyle = %X\n", dwStyle);
582 WriteLog("USER32: CreateWindow: x = %d\n", x);
583 WriteLog("USER32: CreateWindow: y = %d\n", y);
584 WriteLog("USER32: CreateWindow: nWidth = %d\n", nWidth);
585 WriteLog("USER32: CreateWindow: nHeight = %d\n", nHeight);
586 WriteLog("USER32: CreateWindow: parent = %X\n", parent);
587 WriteLog("USER32: CreateWindow: hwmenu = %X\n", arg10);
588 WriteLog("USER32: CreateWindow: hinstance = %X\n", arg11);
589 WriteLog("USER32: CreateWindow: param = %X\n", arg12);
590 #endif
591
592 if((int) arg2 >> 16 != 0 && strcmp(arg2, "COMBOBOX") == 0)
593 {
594 dprintf(("COMBOBOX creation"));
595 //TODO: #%@#%$ Open32 doesn't support this
596 dwStyle &= ~(CBS_OWNERDRAWFIXED | CBS_OWNERDRAWVARIABLE);
597
598 /* @@@PH 98/06/12 drop down combos are problematic too */
599 /* so we translate the styles to OS/2 style */
600 dwStyle |= CBS_DROPDOWN | CBS_DROPDOWNLIST;
601 }
602
603 //Classname might be name of system class, in which case we don't
604 //need to use our own callback
605// if(Win32WindowClass::FindClass((LPSTR)arg2) != NULL) {
606 window = new Win32WindowProc(arg11, arg2);
607// }
608
609 hwnd = O32_CreateWindowEx(dwExStyle,
610 arg2,
611 arg3,
612 dwStyle,
613 x,
614 y,
615 nWidth,
616 nHeight,
617 parent,
618 arg10,
619 arg11,
620 arg12);
621
622 //SvL: 16-11-'97: window can be already destroyed if hwnd == 0
623 if(hwnd == 0 && window != 0 && Win32WindowProc::FindWindowProc(window)) {
624 delete(window);
625 window = 0;
626 }
627 if(window) {
628 window->SetWindowHandle(hwnd);
629 }
630
631 dprintf(("USER32: ************CreateWindowExA %s (%d,%d,%d,%d), hwnd = %X\n", arg2, x, y, nWidth, nHeight, hwnd));
632 return(hwnd);
633}
634//******************************************************************************
635//******************************************************************************
636LRESULT WIN32API SendMessageA(HWND arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
637{
638 LRESULT rc;
639
640#ifdef DEBUG1
641 WriteLog("USER32: SendMessage....\n");
642#endif
643 rc = O32_SendMessage(arg1, arg2, arg3, arg4);
644#ifdef DEBUG1
645 WriteLog("USER32: *****SendMessage %X %X %X %X returned %d\n", arg1, arg2, arg3, arg4, rc);
646#endif
647 return(rc);
648}
649//******************************************************************************
650//******************************************************************************
651HWND WIN32API SetActiveWindow( HWND arg1)
652{
653#ifdef DEBUG
654 WriteLog("USER32: SetActiveWindow\n");
655#endif
656 return O32_SetActiveWindow(arg1);
657}
658//******************************************************************************
659//******************************************************************************
660HDC WIN32API BeginPaint(HWND arg1, PPAINTSTRUCT arg2)
661{
662 dprintf(("USER32: BeginPaint %X\n", arg2));
663 return O32_BeginPaint(arg1, arg2);
664}
665//******************************************************************************
666//******************************************************************************
667BOOL WIN32API IsDialogMessageA( HWND arg1, LPMSG arg2)
668{
669#ifdef DEBUG
670//// WriteLog("USER32: IsDialogMessage\n");
671#endif
672 return O32_IsDialogMessage(arg1, arg2);
673}
674//******************************************************************************
675//******************************************************************************
676int WIN32API DrawTextA(HDC arg1, LPCSTR arg2, int arg3, PRECT arg4, UINT arg5)
677{
678#ifdef DEBUG
679 WriteLog("USER32: DrawTextA %s", arg2);
680#endif
681 return O32_DrawText(arg1, arg2, arg3, arg4, arg5);
682}
683//******************************************************************************
684//******************************************************************************
685int WIN32API GetSystemMetrics(int arg1)
686{
687 int rc;
688
689 switch(arg1) {
690 case SM_CXICONSPACING: //TODO: size of grid cell for large icons
691 rc = O32_GetSystemMetrics(SM_CXICON);
692 break;
693 case SM_CYICONSPACING:
694 rc = O32_GetSystemMetrics(SM_CYICON);
695 break;
696 case SM_PENWINDOWS:
697 rc = FALSE;
698 break;
699 case SM_DBCSENABLED:
700 rc = FALSE;
701 break;
702 case SM_CXEDGE: //size of 3D window edge (not supported)
703 rc = 1;
704 break;
705 case SM_CYEDGE:
706 rc = 1;
707 break;
708 case SM_CXMINSPACING: //can be SM_CXMINIMIZED or larger
709 rc = O32_GetSystemMetrics(SM_CXMINIMIZED);
710 break;
711 case SM_CYMINSPACING:
712 rc = GetSystemMetrics(SM_CYMINIMIZED);
713 break;
714 case SM_CXSMICON: //recommended size of small icons (TODO: adjust to screen res.)
715 rc = 16;
716 break;
717 case SM_CYSMICON:
718 rc = 16;
719 break;
720 case SM_CYSMCAPTION: //size in pixels of a small caption (TODO: ????)
721 rc = 8;
722 break;
723 case SM_CXSMSIZE: //size of small caption buttons (pixels) (TODO: implement properly)
724 rc = 16;
725 break;
726 case SM_CYSMSIZE:
727 rc = 16;
728 break;
729 case SM_CXMENUSIZE: //TODO: size of menu bar buttons (such as MDI window close)
730 rc = 16;
731 break;
732 case SM_CYMENUSIZE:
733 rc = 16;
734 break;
735 case SM_ARRANGE:
736 rc = ARW_BOTTOMLEFT | ARW_LEFT;
737 break;
738 case SM_CXMINIMIZED:
739 break;
740 case SM_CYMINIMIZED:
741 break;
742 case SM_CXMAXTRACK: //max window size
743 case SM_CXMAXIMIZED: //max toplevel window size
744 rc = O32_GetSystemMetrics(SM_CXSCREEN);
745 break;
746 case SM_CYMAXTRACK:
747 case SM_CYMAXIMIZED:
748 rc = O32_GetSystemMetrics(SM_CYSCREEN);
749 break;
750 case SM_NETWORK:
751 rc = 0x01; //TODO: default = yes
752 break;
753 case SM_CLEANBOOT:
754 rc = 0; //normal boot
755 break;
756 case SM_CXDRAG: //nr of pixels before drag becomes a real one
757 rc = 2;
758 break;
759 case SM_CYDRAG:
760 rc = 2;
761 break;
762 case SM_SHOWSOUNDS: //show instead of play sound
763 rc = FALSE;
764 break;
765 case SM_CXMENUCHECK:
766 rc = 4; //TODO
767 break;
768 case SM_CYMENUCHECK:
769 rc = O32_GetSystemMetrics(SM_CYMENU);
770 break;
771 case SM_SLOWMACHINE:
772 rc = FALSE; //even a slow machine is fast with OS/2 :)
773 break;
774 case SM_MIDEASTENABLED:
775 rc = FALSE;
776 break;
777 case SM_CMETRICS:
778 rc = O32_GetSystemMetrics(44); //Open32 changed this one
779 break;
780 default:
781 rc = O32_GetSystemMetrics(arg1);
782 break;
783 }
784 dprintf(("USER32: GetSystemMetrics %d returned %d\n", arg1, rc));
785 return(rc);
786}
787//******************************************************************************
788//******************************************************************************
789UINT WIN32API SetTimer( HWND arg1, UINT arg2, UINT arg3, TIMERPROC arg4)
790{
791#ifdef DEBUG
792 WriteLog("USER32: SetTimer INCORRECT CALLING CONVENTION FOR HANDLER!!!!!\n");
793#endif
794 //SvL: Write callback handler class for this one
795 return O32_SetTimer(arg1, arg2, arg3, (TIMERPROC_O32)arg4);
796}
797//******************************************************************************
798//******************************************************************************
799BOOL WIN32API KillTimer(HWND arg1, UINT arg2)
800{
801#ifdef DEBUG
802 WriteLog("USER32: KillTimer\n");
803#endif
804 return O32_KillTimer(arg1, arg2);
805}
806//******************************************************************************
807//******************************************************************************
808BOOL WIN32API DestroyWindow(HWND arg1)
809{
810#ifdef DEBUG
811 WriteLog("USER32: DestroyWindow\n");
812#endif
813 return O32_DestroyWindow(arg1);
814}
815//******************************************************************************
816//******************************************************************************
817BOOL WIN32API PostMessageA( HWND arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
818{
819#ifdef DEBUG
820 WriteLog("USER32: PostMessageA %X %X %X %X\n", arg1, arg2, arg3, arg4);
821#endif
822 return O32_PostMessage(arg1, arg2, arg3, arg4);
823}
824//******************************************************************************
825//******************************************************************************
826BOOL WIN32API InflateRect( PRECT arg1, int arg2, int arg3)
827{
828#ifdef DEBUG
829 WriteLog("USER32: InflateRect\n");
830#endif
831 return O32_InflateRect(arg1, arg2, arg3);
832}
833//******************************************************************************
834//TODO:How can we emulate this one in OS/2???
835//******************************************************************************
836DWORD WIN32API WaitForInputIdle(HANDLE hProcess, DWORD dwTimeOut)
837{
838#ifdef DEBUG
839 WriteLog("USER32: WaitForInputIdle (Not Implemented) %d\n", dwTimeOut);
840#endif
841
842 if(dwTimeOut == INFINITE) return(0);
843
844// DosSleep(dwTimeOut/16);
845 return(0);
846}
847//******************************************************************************
848//******************************************************************************
849UINT WIN32API GetDlgItemTextA(HWND arg1, int arg2, LPSTR arg3, UINT arg4)
850{
851 UINT rc;
852
853 rc = O32_GetDlgItemText(arg1, arg2, arg3, arg4);
854#ifdef DEBUG
855 if(rc)
856 WriteLog("USER32: GetDlgItemTextA returned %s\n", arg3);
857 else WriteLog("USER32: GetDlgItemTextA returned 0 (%d)\n", GetLastError());
858#endif
859 return(rc);
860}
861//******************************************************************************
862//******************************************************************************
863BOOL WIN32API PeekMessageA(LPMSG arg1, HWND arg2, UINT arg3, UINT arg4, UINT arg5)
864{
865#ifdef DEBUG
866// WriteLog("USER32: PeekMessage\n");
867#endif
868 return O32_PeekMessage(arg1, arg2, arg3, arg4, arg5);
869}
870//******************************************************************************
871//******************************************************************************
872int WIN32API ShowCursor( BOOL arg1)
873{
874#ifdef DEBUG
875 WriteLog("USER32: ShowCursor\n");
876#endif
877 return O32_ShowCursor(arg1);
878}
879//******************************************************************************
880//BUGBUG: UpdateWindow sends a WM_ERASEBKGRND when it shouldn't!
881// So we just do it manually
882//******************************************************************************
883BOOL WIN32API UpdateWindow(HWND hwnd)
884{
885 RECT rect;
886
887#ifdef DEBUG
888 WriteLog("USER32: UpdateWindow\n");
889#endif
890
891#if 0 // EB: ->>> doesn't work. No correct update of Winhlp32 scrolling area.
892 if(O32_GetUpdateRect(hwnd, &rect, FALSE) != FALSE) {//update region empty?
893 WndCallback(hwnd, WM_PAINT, 0, 0);
894// O32_PostMessage(hwnd, WM_PAINT, 0, 0);
895 }
896#ifdef DEBUG
897 else WriteLog("USER32: Update region empty!\n");
898#endif
899 return(TRUE);
900#endif
901
902 return O32_UpdateWindow(hwnd);
903}
904//******************************************************************************
905//******************************************************************************
906BOOL WIN32API AdjustWindowRect( PRECT arg1, DWORD arg2, BOOL arg3)
907{
908#ifdef DEBUG
909 WriteLog("USER32: AdjustWindowRect\n");
910#endif
911 return O32_AdjustWindowRect(arg1, arg2, arg3);
912}
913//******************************************************************************
914//******************************************************************************
915BOOL WIN32API AdjustWindowRectEx( PRECT arg1, DWORD arg2, BOOL arg3, DWORD arg4)
916{
917#ifdef DEBUG
918 WriteLog("USER32: AdjustWindowRectEx\n");
919#endif
920 return O32_AdjustWindowRectEx(arg1, arg2, arg3, arg4);
921}
922//******************************************************************************
923//******************************************************************************
924BOOL WIN32API ClientToScreen( HWND arg1, PPOINT arg2)
925{
926#ifdef DEBUG
927//// WriteLog("USER32: ClientToScreen\n");
928#endif
929 return O32_ClientToScreen(arg1, arg2);
930}
931//******************************************************************************
932//******************************************************************************
933BOOL WIN32API SetRect( PRECT arg1, int arg2, int arg3, int arg4, int arg5)
934{
935#ifdef DEBUG
936 WriteLog("USER32: SetRect\n");
937#endif
938 return O32_SetRect(arg1, arg2, arg3, arg4, arg5);
939}
940//******************************************************************************
941//******************************************************************************
942BOOL WIN32API SetDlgItemInt( HWND arg1, int arg2, UINT arg3, BOOL arg4)
943{
944#ifdef DEBUG
945 WriteLog("USER32: SetDlgItemInt\n");
946#endif
947 return O32_SetDlgItemInt(arg1, arg2, arg3, arg4);
948}
949//******************************************************************************
950//******************************************************************************
951BOOL WIN32API SetDlgItemTextA( HWND arg1, int arg2, LPCSTR arg3)
952{
953#ifdef DEBUG
954 WriteLog("USER32: SetDlgItemText to %s\n", arg3);
955#endif
956 return O32_SetDlgItemText(arg1, arg2, arg3);
957}
958//******************************************************************************
959//******************************************************************************
960BOOL WIN32API WinHelpA( HWND arg1, LPCSTR arg2, UINT arg3, DWORD arg4)
961{
962#ifdef DEBUG
963 WriteLog("USER32: WinHelp not implemented %s\n", arg2);
964#endif
965// return O32_WinHelp(arg1, arg2, arg3, arg4);
966 return(TRUE);
967}
968//******************************************************************************
969//******************************************************************************
970BOOL WIN32API IsIconic( HWND arg1)
971{
972#ifdef DEBUG
973 WriteLog("USER32: IsIconic\n");
974#endif
975 return O32_IsIconic(arg1);
976}
977//******************************************************************************
978//******************************************************************************
979int WIN32API TranslateAcceleratorA(HWND arg1, HACCEL arg2, LPMSG arg3)
980{
981#ifdef DEBUG
982//// WriteLog("USER32: TranslateAccelerator\n");
983#endif
984 return O32_TranslateAccelerator(arg1, arg2, arg3);
985}
986//******************************************************************************
987//******************************************************************************
988HWND WIN32API GetWindow(HWND arg1, UINT arg2)
989{
990 HWND rc;
991
992 rc = O32_GetWindow(arg1, arg2);
993#ifdef DEBUG
994 WriteLog("USER32: GetWindow %X %d returned %d\n", arg1, arg2, rc);
995#endif
996 return(rc);
997}
998//******************************************************************************
999//******************************************************************************
1000HDC WIN32API GetWindowDC(HWND arg1)
1001{
1002#ifdef DEBUG
1003 WriteLog("USER32: GetWindowDC\n");
1004#endif
1005 return O32_GetWindowDC(arg1);
1006}
1007//******************************************************************************
1008//******************************************************************************
1009BOOL WIN32API SubtractRect( PRECT arg1, const RECT * arg2, const RECT * arg3)
1010{
1011#ifdef DEBUG
1012 WriteLog("USER32: SubtractRect");
1013#endif
1014 return O32_SubtractRect(arg1, arg2, arg3);
1015}
1016//******************************************************************************
1017//SvL: 24-6-'97 - Added
1018//******************************************************************************
1019BOOL WIN32API ClipCursor(const RECT * arg1)
1020{
1021#ifdef DEBUG
1022 WriteLog("USER32: ClipCursor\n");
1023#endif
1024 return O32_ClipCursor(arg1);
1025}
1026//******************************************************************************
1027//SvL: 24-6-'97 - Added
1028//TODO: Not implemented
1029//******************************************************************************
1030WORD WIN32API GetAsyncKeyState(INT nVirtKey)
1031{
1032#ifdef DEBUG
1033//// WriteLog("USER32: GetAsyncKeyState Not implemented\n");
1034#endif
1035 return 0;
1036}
1037//******************************************************************************
1038//SvL: 24-6-'97 - Added
1039//******************************************************************************
1040HCURSOR WIN32API GetCursor(void)
1041{
1042#ifdef DEBUG
1043//// WriteLog("USER32: GetCursor\n");
1044#endif
1045 return O32_GetCursor();
1046}
1047//******************************************************************************
1048//SvL: 24-6-'97 - Added
1049//******************************************************************************
1050BOOL WIN32API GetCursorPos( PPOINT arg1)
1051{
1052#ifdef DEBUG
1053//// WriteLog("USER32: GetCursorPos\n");
1054#endif
1055 return O32_GetCursorPos(arg1);
1056}
1057//******************************************************************************
1058//SvL: 24-6-'97 - Added
1059//******************************************************************************
1060UINT WIN32API RegisterWindowMessageA(LPCSTR arg1)
1061{
1062 UINT rc;
1063
1064 rc = O32_RegisterWindowMessage(arg1);
1065#ifdef DEBUG
1066 WriteLog("USER32: RegisterWindowMessageA %s returned %X\n", arg1, rc);
1067#endif
1068 return(rc);
1069}
1070//******************************************************************************
1071//SvL: 24-6-'97 - Added
1072//******************************************************************************
1073WORD WIN32API VkKeyScanA( char arg1)
1074{
1075#ifdef DEBUG
1076 WriteLog("USER32: VkKeyScanA\n");
1077#endif
1078 return O32_VkKeyScan(arg1);
1079}
1080//******************************************************************************
1081//SvL: 24-6-'97 - Added
1082//******************************************************************************
1083SHORT WIN32API GetKeyState( int arg1)
1084{
1085#ifdef DEBUG
1086 WriteLog("USER32: GetKeyState %d\n", arg1);
1087#endif
1088 return O32_GetKeyState(arg1);
1089}
1090//******************************************************************************
1091//******************************************************************************
1092HCURSOR WIN32API SetCursor( HCURSOR arg1)
1093{
1094#ifdef DEBUG
1095 WriteLog("USER32: SetCursor\n");
1096#endif
1097 return O32_SetCursor(arg1);
1098}
1099//******************************************************************************
1100//******************************************************************************
1101BOOL WIN32API SetCursorPos( int arg1, int arg2)
1102{
1103#ifdef DEBUG
1104 WriteLog("USER32: SetCursorPos\n");
1105#endif
1106 return O32_SetCursorPos(arg1, arg2);
1107}
1108//******************************************************************************
1109//******************************************************************************
1110BOOL WIN32API EnableScrollBar( HWND arg1, INT arg2, UINT arg3)
1111{
1112#ifdef DEBUG
1113 WriteLog("USER32: EnableScrollBar\n");
1114#endif
1115 return O32_EnableScrollBar(arg1, arg2, arg3);
1116}
1117//******************************************************************************
1118//******************************************************************************
1119BOOL WIN32API EnableWindow( HWND arg1, BOOL arg2)
1120{
1121#ifdef DEBUG
1122 WriteLog("USER32: EnableWindow\n");
1123#endif
1124 return O32_EnableWindow(arg1, arg2);
1125}
1126//******************************************************************************
1127//******************************************************************************
1128HWND WIN32API SetCapture( HWND arg1)
1129{
1130#ifdef DEBUG
1131 WriteLog("USER32: SetCapture\n");
1132#endif
1133 return O32_SetCapture(arg1);
1134}
1135//******************************************************************************
1136//******************************************************************************
1137BOOL WIN32API ReleaseCapture(void)
1138{
1139#ifdef DEBUG
1140 WriteLog("USER32: ReleaseCapture\n");
1141#endif
1142 return O32_ReleaseCapture();
1143}
1144//******************************************************************************
1145//******************************************************************************
1146DWORD WIN32API MsgWaitForMultipleObjects( DWORD arg1, LPHANDLE arg2, BOOL arg3, DWORD arg4, DWORD arg5)
1147{
1148#ifdef DEBUG
1149 WriteLog("USER32: MsgWaitForMultipleObjects\n");
1150#endif
1151 return O32_MsgWaitForMultipleObjects(arg1, arg2, arg3, arg4, arg5);
1152}
1153//******************************************************************************
1154//******************************************************************************
1155HDWP WIN32API BeginDeferWindowPos( int arg1)
1156{
1157#ifdef DEBUG
1158 WriteLog("USER32: BeginDeferWindowPos\n");
1159#endif
1160 return O32_BeginDeferWindowPos(arg1);
1161}
1162//******************************************************************************
1163//******************************************************************************
1164BOOL WIN32API BringWindowToTop( HWND arg1)
1165{
1166#ifdef DEBUG
1167 WriteLog("USER32: BringWindowToTop\n");
1168#endif
1169 return O32_BringWindowToTop(arg1);
1170}
1171//******************************************************************************
1172//******************************************************************************
1173BOOL WIN32API CallMsgFilterA( LPMSG arg1, int arg2)
1174{
1175#ifdef DEBUG
1176 WriteLog("USER32: CallMsgFilterA\n");
1177#endif
1178 return O32_CallMsgFilter(arg1, arg2);
1179}
1180//******************************************************************************
1181//******************************************************************************
1182BOOL WIN32API CallMsgFilterW( LPMSG arg1, int arg2)
1183{
1184#ifdef DEBUG
1185 WriteLog("USER32: CallMsgFilterW\n");
1186#endif
1187 // NOTE: This will not work as is (needs UNICODE support)
1188 return O32_CallMsgFilter(arg1, arg2);
1189}
1190//******************************************************************************
1191//******************************************************************************
1192LRESULT WIN32API CallWindowProcA(WNDPROC wndprcPrev,
1193 HWND arg2,
1194 UINT arg3,
1195 WPARAM arg4,
1196 LPARAM arg5)
1197{
1198#ifdef DEBUG
1199//// WriteLog("USER32: CallWindowProcA %X hwnd=%X, msg = %X\n", wndprcPrev, arg2, arg3);
1200#endif
1201
1202 return wndprcPrev(arg2, arg3, arg4, arg5); //win32 callback (__stdcall)
1203}
1204//******************************************************************************
1205//******************************************************************************
1206LRESULT WIN32API CallWindowProcW(WNDPROC arg1,
1207 HWND arg2,
1208 UINT arg3,
1209 WPARAM arg4,
1210 LPARAM arg5)
1211{
1212 dprintf(("USER32: CallWindowProcW(%08xh,%08xh,%08xh,%08xh,%08xh) not properly implemented.\n",
1213 arg1,
1214 arg2,
1215 arg3,
1216 arg4,
1217 arg5));
1218
1219 return CallWindowProcA(arg1,
1220 arg2,
1221 arg3,
1222 arg4,
1223 arg5);
1224}
1225//******************************************************************************
1226//******************************************************************************
1227BOOL WIN32API ChangeClipboardChain( HWND arg1, HWND arg2)
1228{
1229#ifdef DEBUG
1230 WriteLog("USER32: ChangeClipboardChain\n");
1231#endif
1232 return O32_ChangeClipboardChain(arg1, arg2);
1233}
1234//******************************************************************************
1235//******************************************************************************
1236UINT WIN32API ArrangeIconicWindows( HWND arg1)
1237{
1238#ifdef DEBUG
1239 WriteLog("USER32: ArrangeIconicWindows\n");
1240#endif
1241 return O32_ArrangeIconicWindows(arg1);
1242}
1243//******************************************************************************
1244// Not implemented by Open32 (5-31-99 Christoph Bratschi)
1245//******************************************************************************
1246BOOL WIN32API CheckRadioButton( HWND arg1, UINT arg2, UINT arg3, UINT arg4)
1247{
1248#ifdef DEBUG
1249 WriteLog("USER32: CheckRadioButton\n");
1250#endif
1251// return O32_CheckRadioButton(arg1, arg2, arg3, arg4);
1252 if (arg2 > arg3) return (FALSE);
1253 for (UINT x=arg2;x <= arg3;x++)
1254 {
1255 SendDlgItemMessageA(arg1,x,BM_SETCHECK,(x == arg4) ? BST_CHECKED : BST_UNCHECKED,0);
1256 }
1257 return (TRUE);
1258}
1259//******************************************************************************
1260//******************************************************************************
1261HWND WIN32API ChildWindowFromPoint( HWND arg1, POINT arg2)
1262{
1263#ifdef DEBUG
1264 WriteLog("USER32: ChildWindowFromPoint\n");
1265#endif
1266 return O32_ChildWindowFromPoint(arg1, arg2);
1267}
1268//******************************************************************************
1269//******************************************************************************
1270HWND WIN32API ChildWindowFromPointEx(HWND arg1, POINT arg2, UINT uFlags)
1271{
1272#ifdef DEBUG
1273 WriteLog("USER32: ChildWindowFromPointEx, not completely supported!\n");
1274#endif
1275 return O32_ChildWindowFromPoint(arg1, arg2);
1276}
1277//******************************************************************************
1278//******************************************************************************
1279BOOL WIN32API CloseClipboard(void)
1280{
1281#ifdef DEBUG
1282 WriteLog("USER32: CloseClipboard\n");
1283#endif
1284 return O32_CloseClipboard();
1285}
1286//******************************************************************************
1287//******************************************************************************
1288BOOL WIN32API CloseWindow( HWND arg1)
1289{
1290#ifdef DEBUG
1291 WriteLog("USER32: CloseWindow\n");
1292#endif
1293 return O32_CloseWindow(arg1);
1294}
1295//******************************************************************************
1296//******************************************************************************
1297HICON WIN32API CopyIcon( HICON arg1)
1298{
1299#ifdef DEBUG
1300 WriteLog("USER32: CopyIcon\n");
1301#endif
1302 return O32_CopyIcon(arg1);
1303}
1304//******************************************************************************
1305//******************************************************************************
1306int WIN32API CountClipboardFormats(void)
1307{
1308#ifdef DEBUG
1309 WriteLog("USER32: CountClipboardFormats\n");
1310#endif
1311 return O32_CountClipboardFormats();
1312}
1313//******************************************************************************
1314//******************************************************************************
1315HACCEL WIN32API CreateAcceleratorTableA( LPACCEL arg1, int arg2)
1316{
1317#ifdef DEBUG
1318 WriteLog("USER32: CreateAcceleratorTableA\n");
1319#endif
1320 return O32_CreateAcceleratorTable(arg1, arg2);
1321}
1322//******************************************************************************
1323//******************************************************************************
1324HACCEL WIN32API CreateAcceleratorTableW( LPACCEL arg1, int arg2)
1325{
1326#ifdef DEBUG
1327 WriteLog("USER32: CreateAcceleratorTableW\n");
1328#endif
1329 // NOTE: This will not work as is (needs UNICODE support)
1330 return O32_CreateAcceleratorTable(arg1, arg2);
1331}
1332//******************************************************************************
1333//******************************************************************************
1334BOOL WIN32API CreateCaret( HWND arg1, HBITMAP arg2, int arg3, int arg4)
1335{
1336#ifdef DEBUG
1337 WriteLog("USER32: CreateCaret\n");
1338#endif
1339 return O32_CreateCaret(arg1, arg2, arg3, arg4);
1340}
1341//******************************************************************************
1342//******************************************************************************
1343HCURSOR WIN32API CreateCursor( HINSTANCE arg1, int arg2, int arg3, int arg4, int arg5, const VOID * arg6, const VOID * arg7)
1344{
1345#ifdef DEBUG
1346 WriteLog("USER32: CreateCursor\n");
1347#endif
1348 return O32_CreateCursor(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
1349}
1350//******************************************************************************
1351//******************************************************************************
1352HICON WIN32API CreateIcon( HINSTANCE arg1, INT arg2, INT arg3, BYTE arg4, BYTE arg5, LPCVOID arg6, LPCVOID arg7)
1353{
1354#ifdef DEBUG
1355 WriteLog("USER32: CreateIcon\n");
1356#endif
1357 return O32_CreateIcon(arg1, arg2, arg3, arg4, arg5, (const BYTE *)arg6, (const BYTE *)arg7);
1358}
1359//******************************************************************************
1360//ASSERT dwVer == win31 (ok according to SDK docs)
1361//******************************************************************************
1362HICON WIN32API CreateIconFromResource(PBYTE presbits, UINT dwResSize,
1363 BOOL fIcon, DWORD dwVer)
1364{
1365 HICON hicon;
1366 DWORD OS2ResSize = 0;
1367 PBYTE OS2Icon = ConvertWin32Icon(presbits, dwResSize, &OS2ResSize);
1368
1369 hicon = O32_CreateIconFromResource(OS2Icon, OS2ResSize, fIcon, dwVer);
1370#ifdef DEBUG
1371 WriteLog("USER32: CreateIconFromResource returned %X (%X)\n", hicon, GetLastError());
1372#endif
1373 if(OS2Icon)
1374 FreeIcon(OS2Icon);
1375
1376 return(hicon);
1377}
1378//******************************************************************************
1379//******************************************************************************
1380HICON WIN32API CreateIconFromResourceEx(PBYTE presbits, UINT dwResSize,
1381 BOOL fIcon, DWORD dwVer,
1382 int cxDesired, int cyDesired,
1383 UINT Flags)
1384{
1385#ifdef DEBUG
1386 WriteLog("USER32: CreateIconFromResourceEx %X %d %d %X %d %d %X, not completely supported!\n", presbits, dwResSize, fIcon, dwVer, cxDesired, cyDesired, Flags);
1387#endif
1388 return CreateIconFromResource(presbits, dwResSize, fIcon, dwVer);
1389}
1390//******************************************************************************
1391//******************************************************************************
1392HICON WIN32API CreateIconIndirect(LPICONINFO arg1)
1393{
1394#ifdef DEBUG
1395 WriteLog("USER32: CreateIconIndirect\n");
1396#endif
1397 return O32_CreateIconIndirect(arg1);
1398}
1399//******************************************************************************
1400//******************************************************************************
1401HWND WIN32API CreateMDIWindowA(LPCSTR arg1, LPCSTR arg2, DWORD arg3,
1402 int arg4, int arg5, int arg6, int arg7,
1403 HWND arg8, HINSTANCE arg9, LPARAM arg10)
1404{
1405 HWND hwnd;
1406
1407#ifdef DEBUG
1408 WriteLog("USER32: CreateMDIWindowA\n");
1409#endif
1410 Win32WindowProc *window = new Win32WindowProc(arg9, arg1);
1411 hwnd = O32_CreateMDIWindow((LPSTR)arg1, (LPSTR)arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
1412 //SvL: 16-11-'97: window can be already destroyed if hwnd == 0
1413 if(hwnd == 0 && window != 0 && Win32WindowProc::FindWindowProc(window)) {
1414 delete(window);
1415 window = 0;
1416 }
1417
1418#ifdef DEBUG
1419 WriteLog("USER32: CreateMDIWindowA returned %X\n", hwnd);
1420#endif
1421 return hwnd;
1422}
1423//******************************************************************************
1424//******************************************************************************
1425HWND WIN32API CreateMDIWindowW(LPCWSTR arg1, LPCWSTR arg2, DWORD arg3, int arg4,
1426 int arg5, int arg6, int arg7, HWND arg8, HINSTANCE arg9,
1427 LPARAM arg10)
1428{
1429 HWND hwnd;
1430 char *astring1 = NULL, *astring2 = NULL;
1431 Win32WindowProc *window = NULL;
1432
1433 if((int)arg1 >> 16 != 0) {
1434 astring1 = UnicodeToAsciiString((LPWSTR)arg1);
1435 }
1436 else astring1 = (char *)arg2;
1437
1438 astring2 = UnicodeToAsciiString((LPWSTR)arg2);
1439
1440 //Classname might be name of system class, in which case we don't
1441 //need to use our own callback
1442// if(Win32WindowClass::FindClass((LPSTR)astring1) != NULL) {
1443 window = new Win32WindowProc(arg9, astring1);
1444// }
1445 hwnd = O32_CreateMDIWindow(astring1, astring2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
1446 //SvL: 16-11-'97: window can be already destroyed if hwnd == 0
1447 if(hwnd == 0 && window != 0 && Win32WindowProc::FindWindowProc(window)) {
1448 delete(window);
1449 window = 0;
1450 }
1451 if(window) {
1452 window->SetWindowHandle(hwnd);
1453 }
1454
1455 if(astring1) FreeAsciiString(astring1);
1456 FreeAsciiString(astring2);
1457#ifdef DEBUG
1458 WriteLog("USER32: CreateMDIWindowW hwnd = %X\n", hwnd);
1459#endif
1460 return(hwnd);
1461}
1462//******************************************************************************
1463//******************************************************************************
1464HWND WIN32API CreateWindowExW(DWORD arg1,
1465 LPCWSTR arg2,
1466 LPCWSTR arg3,
1467 DWORD dwStyle,
1468 int arg5,
1469 int arg6,
1470 int arg7,
1471 int arg8,
1472 HWND arg9,
1473 HMENU arg10,
1474 HINSTANCE arg11,
1475 PVOID arg12)
1476{
1477 HWND hwnd;
1478 char *astring1 = NULL,
1479 *astring2 = NULL;
1480 Win32WindowProc *window = NULL;
1481
1482 /* @@@PH 98/06/21 changed to call OS2CreateWindowExA */
1483 if(HIWORD(arg2) != 0)
1484 astring1 = UnicodeToAsciiString((LPWSTR)arg2);
1485 else
1486 astring1 = (char *)arg2;
1487
1488 astring2 = UnicodeToAsciiString((LPWSTR)arg3);
1489
1490#ifdef DEBUG
1491 WriteLog("USER32: CreateWindowExW: dwExStyle = %X\n", arg1);
1492 if((int)arg2 >> 16 != 0)
1493 WriteLog("USER32: CreateWindow: classname = %s\n", astring1);
1494 else WriteLog("USER32: CreateWindow: classname = %X\n", arg2);
1495 WriteLog("USER32: CreateWindow: windowname= %s\n", astring2);
1496 WriteLog("USER32: CreateWindow: dwStyle = %X\n", dwStyle);
1497 WriteLog("USER32: CreateWindow: x = %d\n", arg5);
1498 WriteLog("USER32: CreateWindow: y = %d\n", arg6);
1499 WriteLog("USER32: CreateWindow: nWidth = %d\n", arg7);
1500 WriteLog("USER32: CreateWindow: nHeight = %d\n", arg8);
1501 WriteLog("USER32: CreateWindow: parent = %X\n", arg9);
1502 WriteLog("USER32: CreateWindow: hwmenu = %X\n", arg10);
1503 WriteLog("USER32: CreateWindow: hinstance = %X\n", arg11);
1504 WriteLog("USER32: CreateWindow: param = %X\n", arg12);
1505 #endif
1506
1507 hwnd = CreateWindowExA(arg1,
1508 astring1,
1509 astring2,
1510 dwStyle,
1511 arg5,
1512 arg6,
1513 arg7,
1514 arg8,
1515 arg9,
1516 arg10,
1517 arg11,
1518 arg12);
1519
1520 if(HIWORD(arg1) != 0)
1521 FreeAsciiString(astring1);
1522
1523 FreeAsciiString(astring2);
1524
1525#ifdef DEBUG
1526 WriteLog("USER32: ************CreateWindowExW hwnd = %X (%X)\n", hwnd, GetLastError());
1527#endif
1528 return(hwnd);
1529}
1530//******************************************************************************
1531//******************************************************************************
1532HDWP WIN32API DeferWindowPos( HDWP arg1, HWND arg2, HWND arg3, int arg4, int arg5, int arg6, int arg7, UINT arg8)
1533{
1534#ifdef DEBUG
1535 WriteLog("USER32: DeferWindowPos\n");
1536#endif
1537 return O32_DeferWindowPos(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
1538}
1539//******************************************************************************
1540//******************************************************************************
1541BOOL WIN32API DestroyAcceleratorTable( HACCEL arg1)
1542{
1543#ifdef DEBUG
1544 WriteLog("USER32: DestroyAcceleratorTable\n");
1545#endif
1546 return O32_DestroyAcceleratorTable(arg1);
1547}
1548//******************************************************************************
1549//******************************************************************************
1550BOOL WIN32API DestroyCaret(void)
1551{
1552#ifdef DEBUG
1553 WriteLog("USER32: DestroyCaret\n");
1554#endif
1555 return O32_DestroyCaret();
1556}
1557//******************************************************************************
1558//******************************************************************************
1559BOOL WIN32API DestroyCursor( HCURSOR arg1)
1560{
1561#ifdef DEBUG
1562 WriteLog("USER32: DestroyCursor\n");
1563#endif
1564 return O32_DestroyCursor(arg1);
1565}
1566//******************************************************************************
1567//******************************************************************************
1568BOOL WIN32API DestroyIcon( HICON arg1)
1569{
1570#ifdef DEBUG
1571 WriteLog("USER32: DestroyIcon\n");
1572#endif
1573 return O32_DestroyIcon(arg1);
1574}
1575//******************************************************************************
1576//******************************************************************************
1577LONG WIN32API DispatchMessageW( const MSG * arg1)
1578{
1579#ifdef DEBUG
1580 WriteLog("USER32: DispatchMessageW\n");
1581#endif
1582 // NOTE: This will not work as is (needs UNICODE support)
1583 return O32_DispatchMessage(arg1);
1584}
1585//******************************************************************************
1586//******************************************************************************
1587int WIN32API DlgDirListA( HWND arg1, LPSTR arg2, int arg3, int arg4, UINT arg5)
1588{
1589#ifdef DEBUG
1590 WriteLog("USER32: DlgDirListA\n");
1591#endif
1592 return O32_DlgDirList(arg1, arg2, arg3, arg4, arg5);
1593}
1594//******************************************************************************
1595//******************************************************************************
1596int WIN32API DlgDirListComboBoxA( HWND arg1, LPSTR arg2, int arg3, int arg4, UINT arg5)
1597{
1598#ifdef DEBUG
1599 WriteLog("USER32: DlgDirListComboBoxA\n");
1600#endif
1601 return O32_DlgDirListComboBox(arg1, arg2, arg3, arg4, arg5);
1602}
1603//******************************************************************************
1604//******************************************************************************
1605int WIN32API DlgDirListComboBoxW( HWND arg1, LPWSTR arg2, int arg3, int arg4, UINT arg5)
1606{
1607#ifdef DEBUG
1608 WriteLog("USER32: DlgDirListComboBoxW NOT WORKING\n");
1609#endif
1610 // NOTE: This will not work as is (needs UNICODE support)
1611 return 0;
1612// return O32_DlgDirListComboBox(arg1, arg2, arg3, arg4, arg5);
1613}
1614//******************************************************************************
1615//******************************************************************************
1616int WIN32API DlgDirListW( HWND arg1, LPWSTR arg2, int arg3, int arg4, UINT arg5)
1617{
1618#ifdef DEBUG
1619 WriteLog("USER32: DlgDirListW NOT WORKING\n");
1620#endif
1621 // NOTE: This will not work as is (needs UNICODE support)
1622 return 0;
1623// return O32_DlgDirList(arg1, arg2, arg3, arg4, arg5);
1624}
1625//******************************************************************************
1626//******************************************************************************
1627BOOL WIN32API DlgDirSelectComboBoxExA( HWND arg1, LPSTR arg2, int arg3, int arg4)
1628{
1629#ifdef DEBUG
1630 WriteLog("USER32: DlgDirSelectComboBoxExA\n");
1631#endif
1632 return O32_DlgDirSelectComboBoxEx(arg1, arg2, arg3, arg4);
1633}
1634//******************************************************************************
1635//******************************************************************************
1636BOOL WIN32API DlgDirSelectComboBoxExW( HWND arg1, LPWSTR arg2, int arg3, int arg4)
1637{
1638#ifdef DEBUG
1639 WriteLog("USER32: DlgDirSelectComboBoxExW NOT WORKING\n");
1640#endif
1641 // NOTE: This will not work as is (needs UNICODE support)
1642 return 0;
1643// return O32_DlgDirSelectComboBoxEx(arg1, arg2, arg3, arg4);
1644}
1645//******************************************************************************
1646//******************************************************************************
1647BOOL WIN32API DlgDirSelectExA( HWND arg1, LPSTR arg2, int arg3, int arg4)
1648{
1649#ifdef DEBUG
1650 WriteLog("USER32: DlgDirSelectExA\n");
1651#endif
1652 return O32_DlgDirSelectEx(arg1, arg2, arg3, arg4);
1653}
1654//******************************************************************************
1655//******************************************************************************
1656BOOL WIN32API DlgDirSelectExW( HWND arg1, LPWSTR arg2, int arg3, int arg4)
1657{
1658#ifdef DEBUG
1659 WriteLog("USER32: DlgDirSelectExW NOT WORKING\n");
1660#endif
1661 // NOTE: This will not work as is (needs UNICODE support)
1662 return 0;
1663// return O32_DlgDirSelectEx(arg1, arg2, arg3, arg4);
1664}
1665//******************************************************************************
1666//******************************************************************************
1667BOOL WIN32API DrawFocusRect( HDC arg1, const RECT * arg2)
1668{
1669#ifdef DEBUG
1670 WriteLog("USER32: DrawFocusRect\n");
1671#endif
1672 return O32_DrawFocusRect(arg1, arg2);
1673}
1674//******************************************************************************
1675//******************************************************************************
1676BOOL WIN32API DrawIcon( HDC arg1, int arg2, int arg3, HICON arg4)
1677{
1678#ifdef DEBUG
1679 WriteLog("USER32: DrawIcon\n");
1680#endif
1681 return O32_DrawIcon(arg1, arg2, arg3, arg4);
1682}
1683//******************************************************************************
1684//******************************************************************************
1685BOOL WIN32API DrawIconEx(HDC hdc, int xLeft, int xRight, HICON hIcon,
1686 int cxWidth, int cyWidth, UINT istepIfAniCur,
1687 HBRUSH hbrFlickerFreeDraw, UINT diFlags)
1688{
1689#ifdef DEBUG
1690 WriteLog("USER32: DrawIcon, partially implemented\n");
1691#endif
1692 return O32_DrawIcon(hdc, xLeft, xRight, hIcon);
1693}
1694//******************************************************************************
1695//******************************************************************************
1696BOOL WIN32API DrawMenuBar( HWND arg1)
1697{
1698#ifdef DEBUG
1699 WriteLog("USER32: DrawMenuBar\n");
1700#endif
1701 return O32_DrawMenuBar(arg1);
1702}
1703//******************************************************************************
1704//******************************************************************************
1705int WIN32API DrawTextW( HDC arg1, LPCWSTR arg2, int arg3, PRECT arg4, UINT arg5)
1706{
1707 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
1708 int rc;
1709
1710#ifdef DEBUG
1711 WriteLog("USER32: DrawTextW %s\n", astring);
1712#endif
1713 rc = O32_DrawText(arg1, astring, arg3, arg4, arg5);
1714 FreeAsciiString(astring);
1715 return(rc);
1716}
1717//******************************************************************************
1718//******************************************************************************
1719BOOL WIN32API EmptyClipboard(void)
1720{
1721#ifdef DEBUG
1722 WriteLog("USER32: EmptyClipboard\n");
1723#endif
1724 return O32_EmptyClipboard();
1725}
1726//******************************************************************************
1727//******************************************************************************
1728BOOL WIN32API EndDeferWindowPos( HDWP arg1)
1729{
1730#ifdef DEBUG
1731 WriteLog("USER32: EndDeferWindowPos\n");
1732#endif
1733 return O32_EndDeferWindowPos(arg1);
1734}
1735//******************************************************************************
1736//******************************************************************************
1737BOOL WIN32API EnumChildWindows(HWND hwnd, WNDENUMPROC lpfn, LPARAM lParam)
1738{
1739 BOOL rc;
1740 EnumWindowCallback *callback = new EnumWindowCallback(lpfn, lParam);
1741
1742#ifdef DEBUG
1743 WriteLog("USER32: EnumChildWindows\n");
1744#endif
1745 rc = O32_EnumChildWindows(hwnd, callback->GetOS2Callback(), (LPARAM)callback);
1746 if(callback)
1747 delete callback;
1748 return(rc);
1749}
1750//******************************************************************************
1751//******************************************************************************
1752UINT WIN32API EnumClipboardFormats(UINT arg1)
1753{
1754#ifdef DEBUG
1755 WriteLog("USER32: EnumClipboardFormats\n");
1756#endif
1757 return O32_EnumClipboardFormats(arg1);
1758}
1759//******************************************************************************
1760//******************************************************************************
1761int WIN32API EnumPropsA(HWND arg1, PROPENUMPROCA arg2)
1762{
1763#ifdef DEBUG
1764 WriteLog("USER32: EnumPropsA DOES NOT WORK\n");
1765#endif
1766 //calling convention problems
1767 return 0;
1768// return O32_EnumProps(arg1, (PROPENUMPROC_O32)arg2);
1769}
1770//******************************************************************************
1771//******************************************************************************
1772int WIN32API EnumPropsExA( HWND arg1, PROPENUMPROCEXA arg2, LPARAM arg3)
1773{
1774#ifdef DEBUG
1775 WriteLog("USER32: EnumPropsExA DOES NOT WORK\n");
1776#endif
1777 //calling convention problems
1778 return 0;
1779// return O32_EnumPropsEx(arg1, arg2, (PROPENUMPROCEX_O32)arg3);
1780}
1781//******************************************************************************
1782//******************************************************************************
1783int WIN32API EnumPropsExW( HWND arg1, PROPENUMPROCEXW arg2, LPARAM arg3)
1784{
1785#ifdef DEBUG
1786 WriteLog("USER32: EnumPropsExW\n");
1787#endif
1788 // NOTE: This will not work as is (needs UNICODE support)
1789 //calling convention problems
1790 return 0;
1791// return O32_EnumPropsEx(arg1, arg2, arg3);
1792}
1793//******************************************************************************
1794//******************************************************************************
1795int WIN32API EnumPropsW( HWND arg1, PROPENUMPROCW arg2)
1796{
1797#ifdef DEBUG
1798 WriteLog("USER32: EnumPropsW\n");
1799#endif
1800 // NOTE: This will not work as is (needs UNICODE support)
1801 //calling convention problems
1802 return 0;
1803// return O32_EnumProps(arg1, arg2);
1804}
1805//******************************************************************************
1806//******************************************************************************
1807BOOL WIN32API EnumWindows(WNDENUMPROC lpfn, LPARAM lParam)
1808{
1809 BOOL rc;
1810 EnumWindowCallback *callback = new EnumWindowCallback(lpfn, lParam);
1811
1812#ifdef DEBUG
1813 WriteLog("USER32: EnumWindows\n");
1814#endif
1815 rc = O32_EnumWindows(callback->GetOS2Callback(), (LPARAM)callback);
1816 if(callback)
1817 delete callback;
1818 return(rc);
1819}
1820//******************************************************************************
1821//******************************************************************************
1822BOOL WIN32API EqualRect( const RECT * arg1, const RECT * arg2)
1823{
1824#ifdef DEBUG
1825 WriteLog("USER32: EqualRect\n");
1826#endif
1827 return O32_EqualRect(arg1, arg2);
1828}
1829//******************************************************************************
1830//******************************************************************************
1831BOOL WIN32API ExcludeUpdateRgn( HDC arg1, HWND arg2)
1832{
1833#ifdef DEBUG
1834 WriteLog("USER32: ExcludeUpdateRgn\n");
1835#endif
1836 return O32_ExcludeUpdateRgn(arg1, arg2);
1837}
1838//******************************************************************************
1839//******************************************************************************
1840BOOL WIN32API ExitWindowsEx( UINT arg1, DWORD arg2)
1841{
1842#ifdef DEBUG
1843 WriteLog("USER32: ExitWindowsEx\n");
1844#endif
1845 return O32_ExitWindowsEx(arg1, arg2);
1846}
1847//******************************************************************************
1848//******************************************************************************
1849int WIN32API FillRect(HDC arg1, const RECT * arg2, HBRUSH arg3)
1850{
1851#ifdef DEBUG
1852 WriteLog("USER32: FillRect (%d,%d)(%d,%d) brush %X\n", arg2->left, arg2->top, arg2->right, arg2->bottom, arg3);
1853#endif
1854 return O32_FillRect(arg1, arg2, arg3);
1855}
1856//******************************************************************************
1857//******************************************************************************
1858HWND WIN32API FindWindowW( LPCWSTR arg1, LPCWSTR arg2)
1859{
1860 char *astring1 = UnicodeToAsciiString((LPWSTR)arg1);
1861 char *astring2 = UnicodeToAsciiString((LPWSTR)arg2);
1862 HWND rc;
1863
1864#ifdef DEBUG
1865 WriteLog("USER32: FindWindowW\n");
1866#endif
1867 rc = O32_FindWindow(astring1, astring2);
1868 FreeAsciiString(astring1);
1869 FreeAsciiString(astring2);
1870 return rc;
1871}
1872//******************************************************************************
1873//******************************************************************************
1874int WIN32API FrameRect( HDC arg1, const RECT * arg2, HBRUSH arg3)
1875{
1876#ifdef DEBUG
1877 WriteLog("USER32: FrameRect\n");
1878#endif
1879 return O32_FrameRect(arg1, arg2, arg3);
1880}
1881//******************************************************************************
1882//******************************************************************************
1883HWND WIN32API GetCapture(void)
1884{
1885#ifdef DEBUG
1886 WriteLog("USER32: GetCapture\n");
1887#endif
1888 return O32_GetCapture();
1889}
1890//******************************************************************************
1891//******************************************************************************
1892UINT WIN32API GetCaretBlinkTime(void)
1893{
1894#ifdef DEBUG
1895 WriteLog("USER32: GetCaretBlinkTime\n");
1896#endif
1897 return O32_GetCaretBlinkTime();
1898}
1899//******************************************************************************
1900//******************************************************************************
1901BOOL WIN32API GetCaretPos( PPOINT arg1)
1902{
1903#ifdef DEBUG
1904 WriteLog("USER32: GetCaretPos\n");
1905#endif
1906 return O32_GetCaretPos(arg1);
1907}
1908//******************************************************************************
1909//******************************************************************************
1910BOOL WIN32API GetClipCursor( PRECT arg1)
1911{
1912#ifdef DEBUG
1913 WriteLog("USER32: GetClipCursor\n");
1914#endif
1915 return O32_GetClipCursor(arg1);
1916}
1917//******************************************************************************
1918//******************************************************************************
1919HANDLE WIN32API GetClipboardData( UINT arg1)
1920{
1921#ifdef DEBUG
1922 WriteLog("USER32: GetClipboardData\n");
1923#endif
1924 return O32_GetClipboardData(arg1);
1925}
1926//******************************************************************************
1927//******************************************************************************
1928int WIN32API GetClipboardFormatNameA( UINT arg1, LPSTR arg2, int arg3)
1929{
1930#ifdef DEBUG
1931 WriteLog("USER32: GetClipboardFormatNameA %s\n", arg2);
1932#endif
1933 return O32_GetClipboardFormatName(arg1, arg2, arg3);
1934}
1935//******************************************************************************
1936//******************************************************************************
1937int WIN32API GetClipboardFormatNameW(UINT arg1, LPWSTR arg2, int arg3)
1938{
1939 int rc;
1940 char *astring = UnicodeToAsciiString(arg2);
1941
1942#ifdef DEBUG
1943 WriteLog("USER32: GetClipboardFormatNameW %s\n", astring);
1944#endif
1945 rc = O32_GetClipboardFormatName(arg1, astring, arg3);
1946 FreeAsciiString(astring);
1947 return(rc);
1948}
1949//******************************************************************************
1950//******************************************************************************
1951HWND WIN32API GetClipboardOwner(void)
1952{
1953#ifdef DEBUG
1954 WriteLog("USER32: GetClipboardOwner\n");
1955#endif
1956 return O32_GetClipboardOwner();
1957}
1958//******************************************************************************
1959//******************************************************************************
1960HWND WIN32API GetClipboardViewer(void)
1961{
1962#ifdef DEBUG
1963 WriteLog("USER32: GetClipboardViewer\n");
1964#endif
1965 return O32_GetClipboardViewer();
1966}
1967//******************************************************************************
1968//******************************************************************************
1969DWORD WIN32API GetDialogBaseUnits(void)
1970{
1971#ifdef DEBUG
1972 WriteLog("USER32: GetDialogBaseUnits\n");
1973#endif
1974 return O32_GetDialogBaseUnits();
1975}
1976//******************************************************************************
1977//******************************************************************************
1978UINT WIN32API GetDlgItemInt( HWND arg1, int arg2, PBOOL arg3, BOOL arg4)
1979{
1980#ifdef DEBUG
1981 WriteLog("USER32: GetDlgItemInt\n");
1982#endif
1983 return O32_GetDlgItemInt(arg1, arg2, arg3, arg4);
1984}
1985
1986
1987/*****************************************************************************
1988 * Name : UINT WIN32API GetDlgItemTextW
1989 * Purpose : Determine the text of a window control
1990 * Parameters: HWND arg1
1991 * int arg2
1992 * LPWSTR arg3
1993 * UINT arg4
1994 * Variables :
1995 * Result :
1996 * Remark :
1997 * Status : UNTESTED UNKNOWN STUB
1998 *
1999 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2000 *****************************************************************************/
2001
2002UINT WIN32API GetDlgItemTextW(HWND arg1,
2003 int arg2,
2004 LPWSTR arg3,
2005 UINT arg4)
2006{
2007 LPSTR lpBuffer; /* temporary buffer for the ascii result */
2008 UINT uiResult; /* return value of the ascii variant */
2009
2010 dprintf(("USER32: GetDlgItemTextW(%08xh,%08xh,%08xh,%08xh)\n",
2011 arg1,
2012 arg2,
2013 arg3,
2014 arg4));
2015
2016
2017 lpBuffer = (LPSTR)malloc(arg4); /* allocate temporary buffer */
2018 uiResult = GetDlgItemTextA(arg1, /* call ascii variant */
2019 arg2,
2020 lpBuffer,
2021 arg4);
2022
2023 AsciiToUnicodeN(lpBuffer, /* now convert result to unicode */
2024 arg3,
2025 arg4);
2026
2027 free(lpBuffer); /* free the temporary buffer */
2028
2029 return (uiResult); /* OK, that's it */
2030}
2031
2032
2033//******************************************************************************
2034//******************************************************************************
2035UINT WIN32API GetDoubleClickTime(void)
2036{
2037#ifdef DEBUG
2038 WriteLog("USER32: GetDoubleClickTime\n");
2039#endif
2040 return O32_GetDoubleClickTime();
2041}
2042//******************************************************************************
2043//******************************************************************************
2044HWND WIN32API GetForegroundWindow(void)
2045{
2046#ifdef DEBUG
2047 WriteLog("USER32: GetForegroundWindow\n");
2048#endif
2049 return O32_GetForegroundWindow();
2050}
2051//******************************************************************************
2052//******************************************************************************
2053BOOL WIN32API GetIconInfo( HICON arg1, LPICONINFO arg2)
2054{
2055#ifdef DEBUG
2056 WriteLog("USER32: GetIconInfo\n");
2057#endif
2058 return O32_GetIconInfo(arg1, arg2);
2059}
2060//******************************************************************************
2061//******************************************************************************
2062int WIN32API GetKeyNameTextA( LPARAM arg1, LPSTR arg2, int arg3)
2063{
2064#ifdef DEBUG
2065 WriteLog("USER32: GetKeyNameTextA\n");
2066#endif
2067 return O32_GetKeyNameText(arg1, arg2, arg3);
2068}
2069//******************************************************************************
2070//******************************************************************************
2071int WIN32API GetKeyNameTextW( LPARAM arg1, LPWSTR arg2, int arg3)
2072{
2073#ifdef DEBUG
2074 WriteLog("USER32: GetKeyNameTextW DOES NOT WORK\n");
2075#endif
2076 // NOTE: This will not work as is (needs UNICODE support)
2077 return 0;
2078// return O32_GetKeyNameText(arg1, arg2, arg3);
2079}
2080//******************************************************************************
2081//******************************************************************************
2082int WIN32API GetKeyboardType( int arg1)
2083{
2084#ifdef DEBUG
2085 WriteLog("USER32: GetKeyboardType\n");
2086#endif
2087 return O32_GetKeyboardType(arg1);
2088}
2089//******************************************************************************
2090//******************************************************************************
2091HWND WIN32API GetLastActivePopup( HWND arg1)
2092{
2093#ifdef DEBUG
2094 WriteLog("USER32: GetLastActivePopup\n");
2095#endif
2096 return O32_GetLastActivePopup(arg1);
2097}
2098//******************************************************************************
2099//******************************************************************************
2100LONG WIN32API GetMessageExtraInfo(void)
2101{
2102 dprintf(("USER32: GetMessageExtraInfo\n"));
2103 return O32_GetMessageExtraInfo();
2104}
2105//******************************************************************************
2106//******************************************************************************
2107DWORD WIN32API GetMessagePos(void)
2108{
2109 dprintf(("USER32: GetMessagePos\n"));
2110 return O32_GetMessagePos();
2111}
2112//******************************************************************************
2113//******************************************************************************
2114LONG WIN32API GetMessageTime(void)
2115{
2116 dprintf(("USER32: GetMessageTime\n"));
2117 return O32_GetMessageTime();
2118}
2119//******************************************************************************
2120//******************************************************************************
2121BOOL WIN32API GetMessageW(LPMSG arg1, HWND arg2, UINT arg3, UINT arg4)
2122{
2123 BOOL rc;
2124
2125 // NOTE: This will not work as is (needs UNICODE support)
2126 rc = O32_GetMessage(arg1, arg2, arg3, arg4);
2127 dprintf(("USER32: GetMessageW %X returned %d\n", arg2, rc));
2128 return(rc);
2129}
2130//******************************************************************************
2131//******************************************************************************
2132HWND WIN32API GetNextDlgGroupItem( HWND arg1, HWND arg2, BOOL arg3)
2133{
2134#ifdef DEBUG
2135 WriteLog("USER32: GetNextDlgGroupItem\n");
2136#endif
2137 return O32_GetNextDlgGroupItem(arg1, arg2, arg3);
2138}
2139//******************************************************************************
2140//******************************************************************************
2141HWND WIN32API GetOpenClipboardWindow(void)
2142{
2143#ifdef DEBUG
2144 WriteLog("USER32: GetOpenClipboardWindow\n");
2145#endif
2146 return O32_GetOpenClipboardWindow();
2147}
2148//******************************************************************************
2149//******************************************************************************
2150HWND WIN32API GetParent( HWND arg1)
2151{
2152#ifdef DEBUG
2153//// WriteLog("USER32: GetParent\n");
2154#endif
2155 return O32_GetParent(arg1);
2156}
2157//******************************************************************************
2158//******************************************************************************
2159int WIN32API GetPriorityClipboardFormat( PUINT arg1, int arg2)
2160{
2161#ifdef DEBUG
2162 WriteLog("USER32: GetPriorityClipboardFormat\n");
2163#endif
2164 return O32_GetPriorityClipboardFormat(arg1, arg2);
2165}
2166//******************************************************************************
2167//******************************************************************************
2168HANDLE WIN32API GetPropA( HWND arg1, LPCSTR arg2)
2169{
2170#ifdef DEBUG
2171 if((int)arg2 >> 16 != 0)
2172 WriteLog("USER32: GetPropA %s\n", arg2);
2173 else WriteLog("USER32: GetPropA %X\n", arg2);
2174#endif
2175 return O32_GetProp(arg1, arg2);
2176}
2177//******************************************************************************
2178//******************************************************************************
2179HANDLE WIN32API GetPropW(HWND arg1, LPCWSTR arg2)
2180{
2181 BOOL handle;
2182 char *astring;
2183
2184 if((int)arg2 >> 16 != 0)
2185 astring = UnicodeToAsciiString((LPWSTR)arg2);
2186 else astring = (char *)arg2;
2187#ifdef DEBUG
2188 if((int)arg2 >> 16 != 0)
2189 WriteLog("USER32: GetPropW %s\n", astring);
2190 else WriteLog("USER32: GetPropW %X\n", astring);
2191#endif
2192 handle = GetPropA(arg1, (LPCSTR)astring);
2193 if((int)arg2 >> 16 != 0)
2194 FreeAsciiString(astring);
2195
2196 return(handle);
2197}
2198//******************************************************************************
2199//******************************************************************************
2200DWORD WIN32API GetQueueStatus( UINT arg1)
2201{
2202#ifdef DEBUG
2203 WriteLog("USER32: GetQueueStatus\n");
2204#endif
2205 return O32_GetQueueStatus(arg1);
2206}
2207//******************************************************************************
2208//******************************************************************************
2209int WIN32API GetScrollPos(HWND hwnd, int fnBar)
2210{
2211 int pos;
2212
2213 pos = O32_GetScrollPos(hwnd, fnBar);
2214#ifdef DEBUG
2215 WriteLog("USER32: GetScrollPos of %X type %d returned %d\n", hwnd, fnBar, pos);
2216#endif
2217 return(pos);
2218}
2219//******************************************************************************
2220//******************************************************************************
2221BOOL WIN32API GetScrollRange( HWND arg1, int arg2, int * arg3, int * arg4)
2222{
2223#ifdef DEBUG
2224 WriteLog("USER32: GetScrollRange\n");
2225#endif
2226 return O32_GetScrollRange(arg1, arg2, arg3, arg4);
2227}
2228//******************************************************************************
2229//******************************************************************************
2230DWORD WIN32API GetTabbedTextExtentA( HDC arg1, LPCSTR arg2, int arg3, int arg4, int * arg5)
2231{
2232#ifdef DEBUG
2233 WriteLog("USER32: GetTabbedTextExtentA\n");
2234#endif
2235 return O32_GetTabbedTextExtent(arg1, arg2, arg3, arg4, arg5);
2236}
2237//******************************************************************************
2238//******************************************************************************
2239DWORD WIN32API GetTabbedTextExtentW( HDC arg1, LPCWSTR arg2, int arg3, int arg4, int * arg5)
2240{
2241 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
2242 DWORD rc;
2243
2244#ifdef DEBUG
2245 WriteLog("USER32: GetTabbedTextExtentW\n");
2246#endif
2247 rc = O32_GetTabbedTextExtent(arg1, astring, arg3, arg4, arg5);
2248 FreeAsciiString(astring);
2249 return rc;
2250}
2251//******************************************************************************
2252//******************************************************************************
2253HWND WIN32API GetTopWindow( HWND arg1)
2254{
2255#ifdef DEBUG
2256//// WriteLog("USER32: GetTopWindow\n");
2257#endif
2258 return O32_GetTopWindow(arg1);
2259}
2260//******************************************************************************
2261//******************************************************************************
2262int WIN32API GetUpdateRgn( HWND arg1, HRGN arg2, BOOL arg3)
2263{
2264#ifdef DEBUG
2265 WriteLog("USER32: GetUpdateRgn\n");
2266#endif
2267 return O32_GetUpdateRgn(arg1, arg2, arg3);
2268}
2269//******************************************************************************
2270//******************************************************************************
2271BOOL WIN32API GetWindowPlacement( HWND arg1, LPWINDOWPLACEMENT arg2)
2272{
2273#ifdef DEBUG
2274 WriteLog("USER32: GetWindowPlacement\n");
2275#endif
2276 return O32_GetWindowPlacement(arg1, arg2);
2277}
2278//******************************************************************************
2279
2280/***********************************************************************
2281 * GetInternalWindowPos (USER32.245)
2282 */
2283UINT WIN32API GetInternalWindowPos(HWND hwnd,
2284 LPRECT rectWnd,
2285 LPPOINT ptIcon )
2286{
2287 WINDOWPLACEMENT wndpl;
2288
2289 dprintf(("USER32: GetInternalWindowPos(%08xh,%08xh,%08xh)\n",
2290 hwnd,
2291 rectWnd,
2292 ptIcon));
2293
2294 if (O32_GetWindowPlacement( hwnd, &wndpl ))
2295 {
2296 if (rectWnd) *rectWnd = wndpl.rcNormalPosition;
2297 if (ptIcon) *ptIcon = wndpl.ptMinPosition;
2298 return wndpl.showCmd;
2299 }
2300 return 0;
2301}
2302
2303
2304//******************************************************************************
2305int WIN32API GetWindowTextLengthW( HWND arg1)
2306{
2307#ifdef DEBUG
2308 WriteLog("USER32: GetWindowTextLengthW\n");
2309#endif
2310 return O32_GetWindowTextLength(arg1);
2311}
2312//******************************************************************************
2313//******************************************************************************
2314int WIN32API GetWindowTextW(HWND hwnd, LPWSTR lpsz, int cch)
2315{
2316 char title[128];
2317 int rc;
2318
2319 rc = O32_GetWindowText(hwnd, title, sizeof(title));
2320#ifdef DEBUG
2321 WriteLog("USER32: GetWindowTextW returned %s\n", title);
2322#endif
2323 if(rc > cch) {
2324 title[cch-1] = 0;
2325 rc = cch;
2326 }
2327 AsciiToUnicode(title, lpsz);
2328 return(rc);
2329}
2330//******************************************************************************
2331//******************************************************************************
2332DWORD WIN32API GetWindowThreadProcessId(HWND arg1, PDWORD arg2)
2333{
2334#ifdef DEBUG
2335 WriteLog("USER32: GetWindowThreadProcessId\n");
2336#endif
2337 return O32_GetWindowThreadProcessId(arg1, arg2);
2338}
2339//******************************************************************************
2340//******************************************************************************
2341BOOL WIN32API HideCaret( HWND arg1)
2342{
2343#ifdef DEBUG
2344 WriteLog("USER32: HideCaret\n");
2345#endif
2346 return O32_HideCaret(arg1);
2347}
2348//******************************************************************************
2349//******************************************************************************
2350BOOL WIN32API InSendMessage(void)
2351{
2352#ifdef DEBUG
2353 WriteLog("USER32: InSendMessage\n");
2354#endif
2355 return O32_InSendMessage();
2356}
2357//******************************************************************************
2358//******************************************************************************
2359BOOL WIN32API IntersectRect( PRECT arg1, const RECT * arg2, const RECT * arg3)
2360{
2361#ifdef DEBUG
2362//// WriteLog("USER32: IntersectRect\n");
2363#endif
2364 return O32_IntersectRect(arg1, arg2, arg3);
2365}
2366//******************************************************************************
2367//******************************************************************************
2368BOOL WIN32API InvalidateRgn( HWND arg1, HRGN arg2, BOOL arg3)
2369{
2370#ifdef DEBUG
2371 WriteLog("USER32: InvalidateRgn\n");
2372#endif
2373 return O32_InvalidateRgn(arg1, arg2, arg3);
2374}
2375//******************************************************************************
2376//******************************************************************************
2377BOOL WIN32API InvertRect( HDC arg1, const RECT * arg2)
2378{
2379#ifdef DEBUG
2380 WriteLog("USER32: InvertRect\n");
2381#endif
2382 return O32_InvertRect(arg1, arg2);
2383}
2384//******************************************************************************
2385//******************************************************************************
2386BOOL WIN32API IsChild( HWND arg1, HWND arg2)
2387{
2388#ifdef DEBUG
2389 WriteLog("USER32: IsChild\n");
2390#endif
2391 return O32_IsChild(arg1, arg2);
2392}
2393//******************************************************************************
2394//******************************************************************************
2395BOOL WIN32API IsClipboardFormatAvailable( UINT arg1)
2396{
2397#ifdef DEBUG
2398 WriteLog("USER32: IsClipboardFormatAvailable\n");
2399#endif
2400 return O32_IsClipboardFormatAvailable(arg1);
2401}
2402//******************************************************************************
2403//******************************************************************************
2404BOOL WIN32API IsDialogMessageW( HWND arg1, LPMSG arg2)
2405{
2406#ifdef DEBUG
2407 WriteLog("USER32: IsDialogMessageW\n");
2408#endif
2409 // NOTE: This will not work as is (needs UNICODE support)
2410 return O32_IsDialogMessage(arg1, arg2);
2411}
2412
2413//******************************************************************************
2414//******************************************************************************
2415BOOL WIN32API IsRectEmpty( const RECT * arg1)
2416{
2417#ifdef DEBUG
2418 WriteLog("USER32: IsRectEmpty\n");
2419#endif
2420 return O32_IsRectEmpty(arg1);
2421}
2422//******************************************************************************
2423//******************************************************************************
2424BOOL WIN32API IsWindow( HWND arg1)
2425{
2426#ifdef DEBUG
2427 WriteLog("USER32: IsWindow\n");
2428#endif
2429 return O32_IsWindow(arg1);
2430}
2431//******************************************************************************
2432//******************************************************************************
2433BOOL WIN32API IsWindowEnabled( HWND arg1)
2434{
2435#ifdef DEBUG
2436 WriteLog("USER32: IsWindowEnabled\n");
2437#endif
2438 return O32_IsWindowEnabled(arg1);
2439}
2440//******************************************************************************
2441//******************************************************************************
2442BOOL WIN32API IsWindowVisible( HWND arg1)
2443{
2444#ifdef DEBUG
2445 WriteLog("USER32: IsWindowVisible\n");
2446#endif
2447 return O32_IsWindowVisible(arg1);
2448}
2449//******************************************************************************
2450//******************************************************************************
2451BOOL WIN32API IsZoomed( HWND arg1)
2452{
2453#ifdef DEBUG
2454 WriteLog("USER32: IsZoomed\n");
2455#endif
2456 return O32_IsZoomed(arg1);
2457}
2458//******************************************************************************
2459//******************************************************************************
2460BOOL WIN32API LockWindowUpdate( HWND arg1)
2461{
2462#ifdef DEBUG
2463 WriteLog("USER32: LockWindowUpdate\n");
2464#endif
2465 return O32_LockWindowUpdate(arg1);
2466}
2467//******************************************************************************
2468//******************************************************************************
2469BOOL WIN32API MapDialogRect( HWND arg1, PRECT arg2)
2470{
2471#ifdef DEBUG
2472 WriteLog("USER32: MapDialogRect\n");
2473#endif
2474 return O32_MapDialogRect(arg1, arg2);
2475}
2476//******************************************************************************
2477//******************************************************************************
2478UINT WIN32API MapVirtualKeyA( UINT arg1, UINT arg2)
2479{
2480#ifdef DEBUG
2481 WriteLog("USER32: MapVirtualKeyA\n");
2482#endif
2483 return O32_MapVirtualKey(arg1, arg2);
2484}
2485//******************************************************************************
2486//******************************************************************************
2487UINT WIN32API MapVirtualKeyW( UINT arg1, UINT arg2)
2488{
2489#ifdef DEBUG
2490 WriteLog("USER32: MapVirtualKeyW\n");
2491#endif
2492 // NOTE: This will not work as is (needs UNICODE support)
2493 return O32_MapVirtualKey(arg1, arg2);
2494}
2495//******************************************************************************
2496//******************************************************************************
2497int WIN32API MapWindowPoints( HWND arg1, HWND arg2, LPPOINT arg3, UINT arg4)
2498{
2499#ifdef DEBUG
2500 WriteLog("USER32: MapWindowPoints\n");
2501#endif
2502 return O32_MapWindowPoints(arg1, arg2, arg3, arg4);
2503}
2504//******************************************************************************
2505//******************************************************************************
2506int WIN32API MessageBoxW(HWND arg1, LPCWSTR arg2, LPCWSTR arg3, UINT arg4)
2507{
2508 char *astring1, *astring2;
2509 int rc;
2510
2511 astring1 = UnicodeToAsciiString((LPWSTR)arg2);
2512 astring2 = UnicodeToAsciiString((LPWSTR)arg3);
2513#ifdef DEBUG
2514 WriteLog("USER32: MessageBoxW %s %s\n", astring1, astring2);
2515#endif
2516 rc = O32_MessageBox(arg1, astring1, astring2, arg4);
2517 FreeAsciiString(astring1);
2518 FreeAsciiString(astring2);
2519 return(rc);
2520}
2521//******************************************************************************
2522//******************************************************************************
2523BOOL WIN32API OpenClipboard( HWND arg1)
2524{
2525#ifdef DEBUG
2526 WriteLog("USER32: OpenClipboard\n");
2527#endif
2528 return O32_OpenClipboard(arg1);
2529}
2530//******************************************************************************
2531//******************************************************************************
2532BOOL WIN32API PeekMessageW( LPMSG arg1, HWND arg2, UINT arg3, UINT arg4, UINT arg5)
2533{
2534#ifdef DEBUG
2535 WriteLog("USER32: PeekMessageW\n");
2536#endif
2537 // NOTE: This will not work as is (needs UNICODE support)
2538 return O32_PeekMessage(arg1, arg2, arg3, arg4, arg5);
2539}
2540//******************************************************************************
2541//******************************************************************************
2542// NOTE: Open32 function doesn't have the 'W'.
2543BOOL WIN32API PostMessageW( HWND arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
2544{
2545#ifdef DEBUG
2546 WriteLog("USER32: PostMessageW\n");
2547#endif
2548 // NOTE: This will not work as is (needs UNICODE support)
2549 return O32_PostMessage(arg1, arg2, arg3, arg4);
2550}
2551//******************************************************************************
2552//******************************************************************************
2553BOOL WIN32API PostThreadMessageA( DWORD arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
2554{
2555#ifdef DEBUG
2556 WriteLog("USER32: PostThreadMessageA\n");
2557#endif
2558 return O32_PostThreadMessage(arg1, arg2, arg3, arg4);
2559}
2560//******************************************************************************
2561//******************************************************************************
2562BOOL WIN32API PostThreadMessageW( DWORD arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
2563{
2564#ifdef DEBUG
2565 WriteLog("USER32: PostThreadMessageW\n");
2566#endif
2567 // NOTE: This will not work as is (needs UNICODE support)
2568 return O32_PostThreadMessage(arg1, arg2, arg3, arg4);
2569}
2570//******************************************************************************
2571//******************************************************************************
2572BOOL WIN32API PtInRect( const RECT * arg1, POINT arg2)
2573{
2574#ifdef DEBUG1
2575 WriteLog("USER32: PtInRect\n");
2576#endif
2577 return O32_PtInRect(arg1, arg2);
2578}
2579//******************************************************************************
2580//******************************************************************************
2581BOOL WIN32API RedrawWindow( HWND arg1, const RECT * arg2, HRGN arg3, UINT arg4)
2582{
2583 BOOL rc;
2584
2585 rc = O32_RedrawWindow(arg1, arg2, arg3, arg4);
2586#ifdef DEBUG
2587 WriteLog("USER32: RedrawWindow %X , %X, %X, %X returned %d\n", arg1, arg2, arg3, arg4, rc);
2588#endif
2589 InvalidateRect(arg1, arg2, TRUE);
2590 UpdateWindow(arg1);
2591 SendMessageA(arg1, WM_PAINT, 0, 0);
2592 return(rc);
2593}
2594//******************************************************************************
2595//******************************************************************************
2596UINT WIN32API RegisterClipboardFormatA( LPCSTR arg1)
2597{
2598#ifdef DEBUG
2599 WriteLog("USER32: RegisterClipboardFormatA\n");
2600#endif
2601 return O32_RegisterClipboardFormat(arg1);
2602}
2603//******************************************************************************
2604//******************************************************************************
2605UINT WIN32API RegisterClipboardFormatW(LPCWSTR arg1)
2606{
2607 UINT rc;
2608 char *astring = UnicodeToAsciiString((LPWSTR)arg1);
2609
2610#ifdef DEBUG
2611 WriteLog("USER32: RegisterClipboardFormatW %s\n", astring);
2612#endif
2613 rc = O32_RegisterClipboardFormat(astring);
2614 FreeAsciiString(astring);
2615#ifdef DEBUG
2616 WriteLog("USER32: RegisterClipboardFormatW returned %d\n", rc);
2617#endif
2618 return(rc);
2619}
2620//******************************************************************************
2621//******************************************************************************
2622UINT WIN32API RegisterWindowMessageW( LPCWSTR arg1)
2623{
2624 char *astring = UnicodeToAsciiString((LPWSTR)arg1);
2625 UINT rc;
2626
2627#ifdef DEBUG
2628 WriteLog("USER32: RegisterWindowMessageW\n");
2629#endif
2630 rc = O32_RegisterWindowMessage(astring);
2631 FreeAsciiString(astring);
2632 return rc;
2633}
2634//******************************************************************************
2635//******************************************************************************
2636HANDLE WIN32API RemovePropA( HWND arg1, LPCSTR arg2)
2637{
2638#ifdef DEBUG
2639 WriteLog("USER32: RemovePropA\n");
2640#endif
2641 return O32_RemoveProp(arg1, arg2);
2642}
2643//******************************************************************************
2644//******************************************************************************
2645HANDLE WIN32API RemovePropW( HWND arg1, LPCWSTR arg2)
2646{
2647 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
2648 HANDLE rc;
2649
2650#ifdef DEBUG
2651 WriteLog("USER32: RemovePropW\n");
2652#endif
2653 rc = O32_RemoveProp(arg1, astring);
2654 FreeAsciiString(astring);
2655 return rc;
2656}
2657//******************************************************************************
2658//******************************************************************************
2659BOOL WIN32API ReplyMessage( LRESULT arg1)
2660{
2661#ifdef DEBUG
2662 WriteLog("USER32: ReplyMessage\n");
2663#endif
2664 return O32_ReplyMessage(arg1);
2665}
2666//******************************************************************************
2667//******************************************************************************
2668BOOL WIN32API ScreenToClient( HWND arg1, LPPOINT arg2)
2669{
2670#ifdef DEBUG
2671 WriteLog("USER32: ScreenToClient\n");
2672#endif
2673 return O32_ScreenToClient(arg1, arg2);
2674}
2675//******************************************************************************
2676//******************************************************************************
2677BOOL WIN32API ScrollDC( HDC arg1, int arg2, int arg3, const RECT * arg4, const RECT * arg5, HRGN arg6, PRECT arg7)
2678{
2679#ifdef DEBUG
2680 WriteLog("USER32: ScrollDC\n");
2681#endif
2682 return O32_ScrollDC(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
2683}
2684//******************************************************************************
2685//******************************************************************************
2686BOOL WIN32API ScrollWindow( HWND arg1, int arg2, int arg3, const RECT * arg4, const RECT * arg5)
2687{
2688#ifdef DEBUG
2689 WriteLog("USER32: ScrollWindow\n");
2690#endif
2691 return O32_ScrollWindow(arg1, arg2, arg3, arg4, arg5);
2692}
2693//******************************************************************************
2694//******************************************************************************
2695BOOL WIN32API ScrollWindowEx( HWND arg1, int arg2, int arg3, const RECT * arg4, const RECT * arg5, HRGN arg6, PRECT arg7, UINT arg8)
2696{
2697#ifdef DEBUG
2698 WriteLog("USER32: ScrollWindowEx\n");
2699#endif
2700 return O32_ScrollWindowEx(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
2701}
2702//******************************************************************************
2703//******************************************************************************
2704LONG WIN32API SendDlgItemMessageW( HWND arg1, int arg2, UINT arg3, WPARAM arg4, LPARAM arg5)
2705{
2706#ifdef DEBUG
2707 WriteLog("USER32: SendDlgItemMessageW\n");
2708#endif
2709 return O32_SendDlgItemMessage(arg1, arg2, arg3, arg4, arg5);
2710}
2711//******************************************************************************
2712//******************************************************************************
2713LRESULT WIN32API SendMessageW( HWND arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
2714{
2715LRESULT rc;
2716
2717#ifdef DEBUG
2718 WriteLog("USER32: SendMessageW....\n");
2719#endif
2720 rc = O32_SendMessage(arg1, arg2, arg3, arg4);
2721#ifdef DEBUG
2722 WriteLog("USER32: SendMessageW %X %X %X %X returned %d\n", arg1, arg2, arg3, arg4, rc);
2723#endif
2724 return(rc);
2725}
2726//******************************************************************************
2727//******************************************************************************
2728BOOL WIN32API SetCaretBlinkTime( UINT arg1)
2729{
2730#ifdef DEBUG
2731 WriteLog("USER32: SetCaretBlinkTime\n");
2732#endif
2733 return O32_SetCaretBlinkTime(arg1);
2734}
2735//******************************************************************************
2736//******************************************************************************
2737BOOL WIN32API SetCaretPos( int arg1, int arg2)
2738{
2739 dprintf(("USER32: SetCaretPos\n"));
2740 return O32_SetCaretPos(arg1, arg2);
2741}
2742//******************************************************************************
2743//******************************************************************************
2744HANDLE WIN32API SetClipboardData( UINT arg1, HANDLE arg2)
2745{
2746 dprintf(("USER32: SetClipboardData\n"));
2747 return O32_SetClipboardData(arg1, arg2);
2748}
2749//******************************************************************************
2750//******************************************************************************
2751HWND WIN32API SetClipboardViewer( HWND arg1)
2752{
2753 dprintf(("USER32: SetClipboardViewer\n"));
2754 return O32_SetClipboardViewer(arg1);
2755}
2756//******************************************************************************
2757//******************************************************************************
2758BOOL WIN32API SetDlgItemTextW( HWND arg1, int arg2, LPCWSTR arg3)
2759{
2760char *astring = UnicodeToAsciiString((LPWSTR)arg3);
2761BOOL rc;
2762
2763#ifdef DEBUG
2764 WriteLog("USER32: SetDlgItemTextW\n");
2765#endif
2766 // NOTE: This will not work as is (needs UNICODE support)
2767 rc = O32_SetDlgItemText(arg1, arg2, astring);
2768 FreeAsciiString(astring);
2769 return rc;
2770}
2771//******************************************************************************
2772//******************************************************************************
2773BOOL WIN32API SetDoubleClickTime( UINT arg1)
2774{
2775#ifdef DEBUG
2776 WriteLog("USER32: SetDoubleClickTime\n");
2777#endif
2778 return O32_SetDoubleClickTime(arg1);
2779}
2780//******************************************************************************
2781//******************************************************************************
2782HWND WIN32API SetParent( HWND arg1, HWND arg2)
2783{
2784#ifdef DEBUG
2785 WriteLog("USER32: SetParent\n");
2786#endif
2787 return O32_SetParent(arg1, arg2);
2788}
2789//******************************************************************************
2790//******************************************************************************
2791BOOL WIN32API SetPropA( HWND arg1, LPCSTR arg2, HANDLE arg3)
2792{
2793#ifdef DEBUG
2794 if((int)arg2 >> 16 != 0)
2795 WriteLog("USER32: SetPropA %S\n", arg2);
2796 else WriteLog("USER32: SetPropA %X\n", arg2);
2797#endif
2798 return O32_SetProp(arg1, arg2, arg3);
2799}
2800//******************************************************************************
2801//******************************************************************************
2802BOOL WIN32API SetPropW(HWND arg1, LPCWSTR arg2, HANDLE arg3)
2803{
2804 BOOL rc;
2805 char *astring;
2806
2807 if((int)arg2 >> 16 != 0)
2808 astring = UnicodeToAsciiString((LPWSTR)arg2);
2809 else astring = (char *)arg2;
2810
2811#ifdef DEBUG
2812 if((int)arg2 >> 16 != 0)
2813 WriteLog("USER32: SetPropW %S\n", astring);
2814 else WriteLog("USER32: SetPropW %X\n", astring);
2815#endif
2816 rc = O32_SetProp(arg1, astring, arg3);
2817 if((int)astring >> 16 != 0)
2818 FreeAsciiString(astring);
2819 return(rc);
2820}
2821//******************************************************************************
2822//******************************************************************************
2823BOOL WIN32API SetRectEmpty( PRECT arg1)
2824{
2825#ifdef DEBUG
2826 WriteLog("USER32: SetRectEmpty\n");
2827#endif
2828 return O32_SetRectEmpty(arg1);
2829}
2830//******************************************************************************
2831//******************************************************************************
2832int WIN32API SetScrollPos( HWND arg1, int arg2, int arg3, BOOL arg4)
2833{
2834#ifdef DEBUG
2835 WriteLog("USER32: SetScrollPos\n");
2836#endif
2837 return O32_SetScrollPos(arg1, arg2, arg3, arg4);
2838}
2839//******************************************************************************
2840//******************************************************************************
2841BOOL WIN32API SetScrollRange( HWND arg1, int arg2, int arg3, int arg4, BOOL arg5)
2842{
2843#ifdef DEBUG
2844 WriteLog("USER32: SetScrollRange\n");
2845#endif
2846 return O32_SetScrollRange(arg1, arg2, arg3, arg4, arg5);
2847}
2848//******************************************************************************
2849//******************************************************************************
2850BOOL WIN32API SetWindowPlacement( HWND arg1, const WINDOWPLACEMENT * arg2)
2851{
2852 dprintf(("USER32: SetWindowPlacement\n"));
2853 return O32_SetWindowPlacement(arg1, arg2);
2854}
2855//******************************************************************************
2856//******************************************************************************
2857BOOL WIN32API SetWindowTextW( HWND arg1, LPCWSTR arg2)
2858{
2859 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
2860 BOOL rc;
2861
2862 rc = SetWindowTextA(arg1, (LPCSTR)astring);
2863 dprintf(("USER32: SetWindowTextW %X %s returned %d\n", arg1, astring, rc));
2864 FreeAsciiString(astring);
2865 return(rc);
2866}
2867//******************************************************************************
2868//******************************************************************************
2869BOOL WIN32API ShowCaret( HWND arg1)
2870{
2871 dprintf(("USER32: ShowCaret\n"));
2872 return O32_ShowCaret(arg1);
2873}
2874//******************************************************************************
2875//******************************************************************************
2876BOOL WIN32API ShowOwnedPopups( HWND arg1, BOOL arg2)
2877{
2878 dprintf(("USER32: ShowOwnedPopups\n"));
2879 return O32_ShowOwnedPopups(arg1, arg2);
2880}
2881//******************************************************************************
2882//******************************************************************************
2883BOOL WIN32API ShowScrollBar( HWND arg1, int arg2, BOOL arg3)
2884{
2885#ifdef DEBUG
2886 WriteLog("USER32: ShowScrollBar\n");
2887#endif
2888 return O32_ShowScrollBar(arg1, arg2, arg3);
2889}
2890//******************************************************************************
2891//******************************************************************************
2892BOOL WIN32API SwapMouseButton( BOOL arg1)
2893{
2894#ifdef DEBUG
2895 WriteLog("USER32: SwapMouseButton\n");
2896#endif
2897 return O32_SwapMouseButton(arg1);
2898}
2899//******************************************************************************
2900//******************************************************************************
2901BOOL WIN32API SystemParametersInfoA(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni)
2902{
2903 BOOL rc;
2904 NONCLIENTMETRICSA *cmetric = (NONCLIENTMETRICSA *)pvParam;
2905
2906 switch(uiAction) {
2907 case SPI_SCREENSAVERRUNNING:
2908 *(BOOL *)pvParam = FALSE;
2909 rc = TRUE;
2910 break;
2911 case SPI_GETDRAGFULLWINDOWS:
2912 *(BOOL *)pvParam = FALSE;
2913 rc = TRUE;
2914 break;
2915 case SPI_GETNONCLIENTMETRICS:
2916 memset(cmetric, 0, sizeof(NONCLIENTMETRICSA));
2917 cmetric->cbSize = sizeof(NONCLIENTMETRICSA);
2918 //CB: font info not valid, needs improvements
2919 O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfCaptionFont),0);
2920 O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfMenuFont),0);
2921 //CB: experimental change for statusbar (and tooltips)
2922
2923 //O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfStatusFont),0);
2924 lstrcpyA(cmetric->lfStatusFont.lfFaceName,"WarpSans");
2925 cmetric->lfStatusFont.lfHeight = 9;
2926
2927 O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfMessageFont),0);
2928 cmetric->iBorderWidth = GetSystemMetrics(SM_CXBORDER);
2929 cmetric->iScrollWidth = GetSystemMetrics(SM_CXHSCROLL);
2930 cmetric->iScrollHeight = GetSystemMetrics(SM_CYHSCROLL);
2931 cmetric->iCaptionWidth = 32; //TODO
2932 cmetric->iCaptionHeight = 16; //TODO
2933 cmetric->iSmCaptionWidth = GetSystemMetrics(SM_CXSMSIZE);
2934 cmetric->iSmCaptionHeight = GetSystemMetrics(SM_CYSMSIZE);
2935 cmetric->iMenuWidth = 32; //TODO
2936 cmetric->iMenuHeight = GetSystemMetrics(SM_CYMENU);
2937 rc = TRUE;
2938 break;
2939 case 104: //TODO: Undocumented
2940 rc = 16;
2941 break;
2942 default:
2943 rc = O32_SystemParametersInfo(uiAction, uiParam, pvParam, fWinIni);
2944 break;
2945 }
2946#ifdef DEBUG
2947 WriteLog("USER32: SystemParametersInfoA %d, returned %d\n", uiAction, rc);
2948#endif
2949 return(rc);
2950}
2951//******************************************************************************
2952//TODO: Check for more options that have different structs for Unicode!!!!
2953//******************************************************************************
2954BOOL WIN32API SystemParametersInfoW(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni)
2955{
2956 BOOL rc;
2957 NONCLIENTMETRICSW *clientMetricsW = (NONCLIENTMETRICSW *)pvParam;
2958 NONCLIENTMETRICSA clientMetricsA = {0};
2959 PVOID pvParamA;
2960 UINT uiParamA;
2961
2962 switch(uiAction) {
2963 case SPI_SETNONCLIENTMETRICS:
2964 clientMetricsA.cbSize = sizeof(NONCLIENTMETRICSA);
2965 clientMetricsA.iBorderWidth = clientMetricsW->iBorderWidth;
2966 clientMetricsA.iScrollWidth = clientMetricsW->iScrollWidth;
2967 clientMetricsA.iScrollHeight = clientMetricsW->iScrollHeight;
2968 clientMetricsA.iCaptionWidth = clientMetricsW->iCaptionWidth;
2969 clientMetricsA.iCaptionHeight = clientMetricsW->iCaptionHeight;
2970 ConvertFontWA(&clientMetricsW->lfCaptionFont, &clientMetricsA.lfCaptionFont);
2971 clientMetricsA.iSmCaptionWidth = clientMetricsW->iSmCaptionWidth;
2972 clientMetricsA.iSmCaptionHeight = clientMetricsW->iSmCaptionHeight;
2973 ConvertFontWA(&clientMetricsW->lfSmCaptionFont, &clientMetricsA.lfSmCaptionFont);
2974 clientMetricsA.iMenuWidth = clientMetricsW->iMenuWidth;
2975 clientMetricsA.iMenuHeight = clientMetricsW->iMenuHeight;
2976 ConvertFontWA(&clientMetricsW->lfMenuFont, &clientMetricsA.lfMenuFont);
2977 ConvertFontWA(&clientMetricsW->lfStatusFont, &clientMetricsA.lfStatusFont);
2978 ConvertFontWA(&clientMetricsW->lfMessageFont, &clientMetricsA.lfMessageFont);
2979 //no break
2980 case SPI_GETNONCLIENTMETRICS:
2981 uiParamA = sizeof(NONCLIENTMETRICSA);
2982 pvParamA = &clientMetricsA;
2983 break;
2984 default:
2985 pvParamA = pvParam;
2986 uiParamA = uiParam;
2987 break;
2988 }
2989 rc = SystemParametersInfoA(uiAction, uiParamA, pvParamA, fWinIni);
2990
2991 switch(uiAction) {
2992 case SPI_GETNONCLIENTMETRICS:
2993 clientMetricsW->cbSize = sizeof(*clientMetricsW);
2994 clientMetricsW->iBorderWidth = clientMetricsA.iBorderWidth;
2995 clientMetricsW->iScrollWidth = clientMetricsA.iScrollWidth;
2996 clientMetricsW->iScrollHeight = clientMetricsA.iScrollHeight;
2997 clientMetricsW->iCaptionWidth = clientMetricsA.iCaptionWidth;
2998 clientMetricsW->iCaptionHeight = clientMetricsA.iCaptionHeight;
2999 ConvertFontAW(&clientMetricsA.lfCaptionFont, &clientMetricsW->lfCaptionFont);
3000
3001 clientMetricsW->iSmCaptionWidth = clientMetricsA.iSmCaptionWidth;
3002 clientMetricsW->iSmCaptionHeight = clientMetricsA.iSmCaptionHeight;
3003 ConvertFontAW(&clientMetricsA.lfSmCaptionFont, &clientMetricsW->lfSmCaptionFont);
3004
3005 clientMetricsW->iMenuWidth = clientMetricsA.iMenuWidth;
3006 clientMetricsW->iMenuHeight = clientMetricsA.iMenuHeight;
3007 ConvertFontAW(&clientMetricsA.lfMenuFont, &clientMetricsW->lfMenuFont);
3008 ConvertFontAW(&clientMetricsA.lfStatusFont, &clientMetricsW->lfStatusFont);
3009 ConvertFontAW(&clientMetricsA.lfMessageFont, &clientMetricsW->lfMessageFont);
3010 break;
3011 }
3012#ifdef DEBUG
3013 WriteLog("USER32: SystemParametersInfoW %d, returned %d\n", uiAction, rc);
3014#endif
3015 return(rc);
3016}
3017//******************************************************************************
3018//******************************************************************************
3019LONG WIN32API TabbedTextOutA( HDC arg1, int arg2, int arg3, LPCSTR arg4, int arg5, int arg6, int * arg7, int arg8)
3020{
3021#ifdef DEBUG
3022 WriteLog("USER32: TabbedTextOutA\n");
3023#endif
3024 return O32_TabbedTextOut(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
3025}
3026//******************************************************************************
3027//******************************************************************************
3028LONG WIN32API TabbedTextOutW( HDC arg1, int arg2, int arg3, LPCWSTR arg4, int arg5, int arg6, int * arg7, int arg8)
3029{
3030 char *astring = UnicodeToAsciiString((LPWSTR)arg4);
3031 LONG rc;
3032
3033#ifdef DEBUG
3034 WriteLog("USER32: TabbedTextOutW\n");
3035#endif
3036 rc = O32_TabbedTextOut(arg1, arg2, arg3, astring, arg5, arg6, arg7, arg8);
3037 FreeAsciiString(astring);
3038 return rc;
3039}
3040//******************************************************************************
3041//******************************************************************************
3042int WIN32API TranslateAccelerator( HWND arg1, HACCEL arg2, LPMSG arg3)
3043{
3044#ifdef DEBUG
3045 WriteLog("USER32: TranslateAccelerator\n");
3046#endif
3047 return O32_TranslateAccelerator(arg1, arg2, arg3);
3048}
3049//******************************************************************************
3050//******************************************************************************
3051int WIN32API TranslateAcceleratorW( HWND arg1, HACCEL arg2, LPMSG arg3)
3052{
3053#ifdef DEBUG
3054 WriteLog("USER32: TranslateAcceleratorW\n");
3055#endif
3056 // NOTE: This will not work as is (needs UNICODE support)
3057 return O32_TranslateAccelerator(arg1, arg2, arg3);
3058}
3059//******************************************************************************
3060//******************************************************************************
3061BOOL WIN32API TranslateMDISysAccel( HWND arg1, LPMSG arg2)
3062{
3063#ifdef DEBUG
3064//// WriteLog("USER32: TranslateMDISysAccel\n");
3065#endif
3066 return O32_TranslateMDISysAccel(arg1, arg2);
3067}
3068//******************************************************************************
3069//******************************************************************************
3070BOOL WIN32API UnionRect( PRECT arg1, const RECT * arg2, const RECT * arg3)
3071{
3072#ifdef DEBUG
3073 WriteLog("USER32: UnionRect\n");
3074#endif
3075 return O32_UnionRect(arg1, arg2, arg3);
3076}
3077//******************************************************************************
3078//******************************************************************************
3079BOOL WIN32API ValidateRect( HWND arg1, const RECT * arg2)
3080{
3081#ifdef DEBUG
3082 WriteLog("USER32: ValidateRect\n");
3083#endif
3084 return O32_ValidateRect(arg1, arg2);
3085}
3086//******************************************************************************
3087//******************************************************************************
3088BOOL WIN32API ValidateRgn( HWND arg1, HRGN arg2)
3089{
3090#ifdef DEBUG
3091 WriteLog("USER32: ValidateRgn\n");
3092#endif
3093 return O32_ValidateRgn(arg1, arg2);
3094}
3095//******************************************************************************
3096//******************************************************************************
3097WORD WIN32API VkKeyScanW( WCHAR arg1)
3098{
3099#ifdef DEBUG
3100 WriteLog("USER32: VkKeyScanW\n");
3101#endif
3102 // NOTE: This will not work as is (needs UNICODE support)
3103 return O32_VkKeyScan((char)arg1);
3104}
3105//******************************************************************************
3106//******************************************************************************
3107BOOL WIN32API WaitMessage(void)
3108{
3109#ifdef DEBUG
3110 WriteLog("USER32: WaitMessage\n");
3111#endif
3112 return O32_WaitMessage();
3113}
3114//******************************************************************************
3115//******************************************************************************
3116BOOL WIN32API WinHelpW( HWND arg1, LPCWSTR arg2, UINT arg3, DWORD arg4)
3117{
3118 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
3119 BOOL rc;
3120
3121#ifdef DEBUG
3122 WriteLog("USER32: WinHelpW\n");
3123#endif
3124 rc = WinHelpA(arg1, astring, arg3, arg4);
3125 FreeAsciiString(astring);
3126 return rc;
3127}
3128//******************************************************************************
3129//******************************************************************************
3130HWND WIN32API WindowFromDC( HDC arg1)
3131{
3132#ifdef DEBUG
3133 WriteLog("USER32: WindowFromDC\n");
3134#endif
3135 return O32_WindowFromDC(arg1);
3136}
3137//******************************************************************************
3138//******************************************************************************
3139HWND WIN32API WindowFromPoint( POINT arg1)
3140{
3141#ifdef DEBUG
3142 WriteLog("USER32: WindowFromPoint\n");
3143#endif
3144 return O32_WindowFromPoint(arg1);
3145}
3146//******************************************************************************
3147//******************************************************************************
3148int WIN32API wvsprintfA( LPSTR arg1, LPCSTR arg2, va_list arg3)
3149{
3150#ifdef DEBUG
3151 WriteLog("USER32: wvsprintfA\n");
3152#endif
3153 return O32_wvsprintf(arg1, arg2, (LPCVOID *)arg3);
3154}
3155//******************************************************************************
3156//******************************************************************************
3157int WIN32API wvsprintfW(LPWSTR lpOut, LPCWSTR lpFmt, va_list argptr)
3158{
3159 int rc;
3160 char szOut[256];
3161 char *lpFmtA;
3162
3163 lpFmtA = UnicodeToAsciiString((LPWSTR)lpFmt);
3164#ifdef DEBUG
3165 WriteLog("USER32: wvsprintfW, DOES NOT HANDLE UNICODE STRINGS!\n");
3166 WriteLog("USER32: %s\n", lpFmt);
3167#endif
3168 rc = O32_wvsprintf(szOut, lpFmtA, (LPCVOID)argptr);
3169
3170 AsciiToUnicode(szOut, lpOut);
3171#ifdef DEBUG
3172 WriteLog("USER32: %s\n", lpOut);
3173#endif
3174 FreeAsciiString(lpFmtA);
3175 return(rc);
3176}
3177//******************************************************************************
3178//No need to support this
3179//******************************************************************************
3180BOOL WIN32API SetMessageQueue(int cMessagesMax)
3181{
3182#ifdef DEBUG
3183 WriteLog("USER32: SetMessageQueue\n");
3184#endif
3185 return(TRUE);
3186}
3187//******************************************************************************
3188//TODO: Not complete
3189//******************************************************************************
3190BOOL WIN32API GetScrollInfo(HWND hwnd, int fnBar, LPSCROLLINFO lpsi)
3191{
3192#ifdef DEBUG
3193 WriteLog("USER32: GetScrollInfo\n");
3194#endif
3195 if(lpsi == NULL)
3196 return(FALSE);
3197
3198 if(lpsi->fMask & SIF_POS)
3199 lpsi->nPos = GetScrollPos(hwnd, fnBar);
3200 if(lpsi->fMask & SIF_RANGE)
3201 GetScrollRange(hwnd, fnBar, &lpsi->nMin, &lpsi->nMax);
3202 if(lpsi->fMask & SIF_PAGE) {
3203#ifdef DEBUG
3204 WriteLog("USER32: GetScrollInfo, page info not implemented\n");
3205#endif
3206 lpsi->nPage = 25;
3207 }
3208 return(TRUE);
3209}
3210//******************************************************************************
3211//TODO: Not complete
3212//******************************************************************************
3213INT WIN32API SetScrollInfo(HWND hwnd, INT fnBar, const SCROLLINFO *lpsi, BOOL fRedraw)
3214{
3215 int smin, smax;
3216
3217#ifdef DEBUG
3218 WriteLog("USER32: SetScrollInfo\n");
3219#endif
3220 if(lpsi == NULL)
3221 return(FALSE);
3222
3223 if(lpsi->fMask & SIF_POS)
3224 SetScrollPos(hwnd, fnBar, lpsi->nPos, fRedraw);
3225 if(lpsi->fMask & SIF_RANGE)
3226 SetScrollRange(hwnd, fnBar, lpsi->nMin, lpsi->nMax, fRedraw);
3227 if(lpsi->fMask & SIF_PAGE) {
3228#ifdef DEBUG
3229 WriteLog("USER32: GetScrollInfo, page info not implemented\n");
3230#endif
3231 }
3232 if(lpsi->fMask & SIF_DISABLENOSCROLL) {
3233#ifdef DEBUG
3234 WriteLog("USER32: GetScrollInfo, disable scrollbar not yet implemented\n");
3235#endif
3236 }
3237 return(TRUE);
3238}
3239//******************************************************************************
3240//******************************************************************************
3241BOOL WIN32API GrayStringA(HDC hdc, HBRUSH hBrush, GRAYSTRINGPROC lpOutputFunc,
3242 LPARAM lpData, int nCount, int X, int Y, int nWidth,
3243 int nHeight)
3244{
3245 BOOL rc;
3246 COLORREF curclr;
3247
3248#ifdef DEBUG
3249 WriteLog("USER32: GrayStringA, not completely implemented\n");
3250#endif
3251 if(lpOutputFunc == NULL && lpData == NULL) {
3252#ifdef DEBUG
3253 WriteLog("USER32: lpOutputFunc == NULL && lpData == NULL\n");
3254#endif
3255 return(FALSE);
3256 }
3257 if(lpOutputFunc) {
3258 return(lpOutputFunc(hdc, lpData, nCount));
3259 }
3260 curclr = SetTextColor(hdc, GetSysColor(COLOR_GRAYTEXT));
3261 rc = TextOutA(hdc, X, Y, (char *)lpData, nCount);
3262 SetTextColor(hdc, curclr);
3263
3264 return(rc);
3265}
3266//******************************************************************************
3267//******************************************************************************
3268BOOL WIN32API GrayStringW(HDC hdc, HBRUSH hBrush, GRAYSTRINGPROC lpOutputFunc,
3269 LPARAM lpData, int nCount, int X, int Y, int nWidth,
3270 int nHeight)
3271{
3272 BOOL rc;
3273 char *astring;
3274 COLORREF curclr;
3275
3276#ifdef DEBUG
3277 WriteLog("USER32: GrayStringW, not completely implemented\n");
3278#endif
3279
3280 if(lpOutputFunc == NULL && lpData == NULL) {
3281#ifdef DEBUG
3282 WriteLog("USER32: lpOutputFunc == NULL && lpData == NULL\n");
3283#endif
3284 return(FALSE);
3285 }
3286 if(nCount == 0)
3287 nCount = UniStrlen((UniChar*)lpData);
3288
3289 if(lpOutputFunc) {
3290 return(lpOutputFunc(hdc, lpData, nCount));
3291 }
3292 astring = UnicodeToAsciiString((LPWSTR)lpData);
3293
3294 curclr = SetTextColor(hdc, GetSysColor(COLOR_GRAYTEXT));
3295 rc = TextOutA(hdc, X, Y, astring, nCount);
3296 SetTextColor(hdc, curclr);
3297
3298 FreeAsciiString(astring);
3299 return(rc);
3300}
3301//******************************************************************************
3302//TODO:
3303//******************************************************************************
3304int WIN32API CopyAcceleratorTableA(HACCEL hAccelSrc, LPACCEL lpAccelDest,
3305 int cAccelEntries)
3306{
3307#ifdef DEBUG
3308 WriteLog("USER32: CopyAcceleratorTableA, not implemented\n");
3309#endif
3310 return(0);
3311}
3312//******************************************************************************
3313//TODO:
3314//******************************************************************************
3315int WIN32API CopyAcceleratorTableW(HACCEL hAccelSrc, LPACCEL lpAccelDest,
3316 int cAccelEntries)
3317{
3318#ifdef DEBUG
3319 WriteLog("USER32: CopyAcceleratorTableW, not implemented\n");
3320#endif
3321 return(0);
3322}
3323//******************************************************************************
3324//******************************************************************************
3325LRESULT WIN32API SendMessageTimeoutA(HWND hwnd, UINT Msg, WPARAM wParam,
3326 LPARAM lParam, UINT fuFlags, UINT uTimeOut,
3327 LPDWORD lpdwResult)
3328{
3329#ifdef DEBUG
3330 WriteLog("USER32: SendMessageTimeoutA, partially implemented\n");
3331#endif
3332 //ignore fuFlags & wTimeOut
3333 *lpdwResult = SendMessageA(hwnd, Msg, wParam, lParam);
3334 return(TRUE);
3335}
3336//******************************************************************************
3337//******************************************************************************
3338LRESULT WIN32API SendMessageTimeoutW(HWND hwnd, UINT Msg, WPARAM wParam,
3339 LPARAM lParam, UINT fuFlags, UINT uTimeOut,
3340 LPDWORD lpdwResult)
3341{
3342#ifdef DEBUG
3343 WriteLog("USER32: SendMessageTimeoutW, partially implemented\n");
3344#endif
3345 return(SendMessageTimeoutA(hwnd, Msg, wParam, lParam, fuFlags, uTimeOut, lpdwResult));
3346}
3347//******************************************************************************
3348//******************************************************************************
3349HANDLE WIN32API CopyImage(HANDLE hImage, UINT uType, int cxDesired, int cyDesired, UINT fuFlags)
3350{
3351#ifdef DEBUG
3352 WriteLog("USER32: CopyImage, not implemented\n");
3353#endif
3354 switch(uType) {
3355 case IMAGE_BITMAP:
3356 case IMAGE_CURSOR:
3357 case IMAGE_ICON:
3358 default:
3359#ifdef DEBUG
3360 WriteLog("USER32: CopyImage, unknown type\n");
3361#endif
3362 return(NULL);
3363 }
3364 return(NULL);
3365}
3366//******************************************************************************
3367//******************************************************************************
3368BOOL WIN32API GetKeyboardState(PBYTE lpKeyState)
3369{
3370#ifdef DEBUG
3371 WriteLog("USER32: GetKeyboardState, not properly implemented\n");
3372#endif
3373 memset(lpKeyState, 0, 256);
3374 return(TRUE);
3375}
3376//******************************************************************************
3377//******************************************************************************
3378BOOL WIN32API SetKeyboardState(PBYTE lpKeyState)
3379{
3380#ifdef DEBUG
3381 WriteLog("USER32: SetKeyboardState, not implemented\n");
3382#endif
3383 return(TRUE);
3384}
3385//******************************************************************************
3386//******************************************************************************
3387BOOL WIN32API SendNotifyMessageA(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)
3388{
3389#ifdef DEBUG
3390 WriteLog("USER32: SendNotifyMessageA, not completely implemented\n");
3391#endif
3392 return(SendMessageA(hwnd, Msg, wParam, lParam));
3393}
3394//******************************************************************************
3395//******************************************************************************
3396BOOL WIN32API SendNotifyMessageW(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)
3397{
3398#ifdef DEBUG
3399 WriteLog("USER32: SendNotifyMessageW, not completely implemented\n");
3400#endif
3401 return(SendMessageA(hwnd, Msg, wParam, lParam));
3402}
3403//******************************************************************************
3404//2nd parameter not used according to SDK (yet?)
3405//******************************************************************************
3406VOID WIN32API SetLastErrorEx(DWORD dwErrCode, DWORD dwType)
3407{
3408#ifdef DEBUG
3409 WriteLog("USER32: SetLastErrorEx\n");
3410#endif
3411 SetLastError(dwErrCode);
3412}
3413//******************************************************************************
3414//******************************************************************************
3415LPARAM WIN32API SetMessageExtraInfo(LPARAM lParam)
3416{
3417#ifdef DEBUG
3418 WriteLog("USER32: SetMessageExtraInfo, not implemented\n");
3419#endif
3420 return(0);
3421}
3422//******************************************************************************
3423//******************************************************************************
3424BOOL WIN32API ActivateKeyboardLayout(HKL hkl, UINT fuFlags)
3425{
3426#ifdef DEBUG
3427 WriteLog("USER32: ActivateKeyboardLayout, not implemented\n");
3428#endif
3429 return(TRUE);
3430}
3431//******************************************************************************
3432//******************************************************************************
3433int WIN32API GetKeyboardLayoutList(int nBuff, HKL *lpList)
3434{
3435#ifdef DEBUG
3436 WriteLog("USER32: GetKeyboardLayoutList, not implemented\n");
3437#endif
3438 return(0);
3439}
3440//******************************************************************************
3441//******************************************************************************
3442HKL WIN32API GetKeyboardLayout(DWORD dwLayout)
3443{
3444#ifdef DEBUG
3445 WriteLog("USER32: GetKeyboardLayout, not implemented\n");
3446#endif
3447 return(0);
3448}
3449//******************************************************************************
3450//******************************************************************************
3451int WIN32API LookupIconIdFromDirectory(PBYTE presbits, BOOL fIcon)
3452{
3453#ifdef DEBUG
3454 WriteLog("USER32: LookupIconIdFromDirectory, not implemented\n");
3455#endif
3456 return(0);
3457}
3458//******************************************************************************
3459//******************************************************************************
3460int WIN32API LookupIconIdFromDirectoryEx(PBYTE presbits, BOOL fIcon,
3461 int cxDesired, int cyDesired,
3462 UINT Flags)
3463{
3464#ifdef DEBUG
3465 WriteLog("USER32: LookupIconIdFromDirectoryEx, not implemented\n");
3466#endif
3467 return(0);
3468}
3469//******************************************************************************
3470//DWORD idAttach; /* thread to attach */
3471//DWORD idAttachTo; /* thread to attach to */
3472//BOOL fAttach; /* attach or detach */
3473//******************************************************************************
3474BOOL WIN32API AttachThreadInput(DWORD idAttach, DWORD idAttachTo, BOOL fAttach)
3475{
3476#ifdef DEBUG
3477 WriteLog("USER32: AttachThreadInput, not implemented\n");
3478#endif
3479 return(TRUE);
3480}
3481//******************************************************************************
3482//******************************************************************************
3483BOOL WIN32API RegisterHotKey(HWND hwnd, int idHotKey, UINT fuModifiers, UINT uVirtKey)
3484{
3485#ifdef DEBUG
3486 WriteLog("USER32: RegisterHotKey, not implemented\n");
3487#endif
3488 return(TRUE);
3489}
3490//******************************************************************************
3491//******************************************************************************
3492BOOL WIN32API UnregisterHotKey(HWND hwnd, int idHotKey)
3493{
3494#ifdef DEBUG
3495 WriteLog("USER32: UnregisterHotKey, not implemented\n");
3496#endif
3497 return(TRUE);
3498}
3499//******************************************************************************
3500//******************************************************************************
3501//******************************************************************************
3502//******************************************************************************
3503BOOL WIN32API SetWindowContextHelpId(HWND hwnd, DWORD dwContextHelpId)
3504{
3505#ifdef DEBUG
3506 WriteLog("USER32: SetWindowContextHelpId, not implemented\n");
3507#endif
3508 return(TRUE);
3509}
3510//******************************************************************************
3511//******************************************************************************
3512DWORD WIN32API GetWindowContextHelpId(HWND hwnd)
3513{
3514#ifdef DEBUG
3515 WriteLog("USER32: GetWindowContextHelpId, not implemented\n");
3516#endif
3517 return(0);
3518}
3519//******************************************************************************
3520//restores iconized window to previous size/position
3521//******************************************************************************
3522BOOL WIN32API OpenIcon(HWND hwnd)
3523{
3524#ifdef DEBUG
3525 WriteLog("USER32: OpenIcon\n");
3526#endif
3527 if(!IsIconic(hwnd))
3528 return FALSE;
3529 ShowWindow(hwnd, SW_SHOWNORMAL);
3530 return TRUE;
3531}
3532//******************************************************************************
3533//******************************************************************************
3534BOOL WIN32API IsWindowUnicode(HWND hwnd)
3535{
3536#ifdef DEBUG
3537 WriteLog("USER32: IsWindowUnicode, not implemented\n");
3538#endif
3539 return(FALSE);
3540}
3541//******************************************************************************
3542//******************************************************************************
3543BOOL WIN32API GetMonitorInfoA(HMONITOR,LPMONITORINFO)
3544{
3545#ifdef DEBUG
3546 WriteLog("USER32: GetMonitorInfoA not supported!!\n");
3547#endif
3548 return(FALSE);
3549}
3550//******************************************************************************
3551//******************************************************************************
3552BOOL WIN32API GetMonitorInfoW(HMONITOR,LPMONITORINFO)
3553{
3554#ifdef DEBUG
3555 WriteLog("USER32: GetMonitorInfoW not supported!!\n");
3556#endif
3557 return(FALSE);
3558}
3559//******************************************************************************
3560//******************************************************************************
3561HMONITOR WIN32API MonitorFromWindow(HWND hwnd, DWORD dwFlags)
3562{
3563#ifdef DEBUG
3564 WriteLog("USER32: MonitorFromWindow not correctly supported??\n");
3565#endif
3566 return(0);
3567}
3568//******************************************************************************
3569//******************************************************************************
3570HMONITOR WIN32API MonitorFromRect(LPRECT rect, DWORD dwFlags)
3571{
3572#ifdef DEBUG
3573 WriteLog("USER32: MonitorFromRect not correctly supported??\n");
3574#endif
3575 return(0);
3576}
3577//******************************************************************************
3578//******************************************************************************
3579HMONITOR WIN32API MonitorFromPoint(POINT point, DWORD dwflags)
3580{
3581#ifdef DEBUG
3582 WriteLog("USER32: MonitorFromPoint not correctly supported??\n");
3583#endif
3584 return(0);
3585}
3586//******************************************************************************
3587//******************************************************************************
3588BOOL WIN32API EnumDisplayMonitors(HDC,LPRECT,MONITORENUMPROC,LPARAM)
3589{
3590#ifdef DEBUG
3591 WriteLog("USER32: EnumDisplayMonitors not supported??\n");
3592#endif
3593 return(FALSE);
3594}
3595//******************************************************************************
3596//******************************************************************************
3597BOOL WIN32API EnumDisplaySettingsA(LPCSTR lpszDeviceName, DWORD iModeNum,
3598 LPDEVMODEA lpDevMode)
3599{
3600#ifdef DEBUG
3601 WriteLog("USER32: EnumDisplaySettingsA FAKED\n");
3602#endif
3603 switch(iModeNum) {
3604 case 0:
3605 lpDevMode->dmBitsPerPel = 16;
3606 lpDevMode->dmPelsWidth = 768;
3607 lpDevMode->dmPelsHeight = 1024;
3608 lpDevMode->dmDisplayFlags = 0;
3609 lpDevMode->dmDisplayFrequency = 70;
3610 break;
3611 case 1:
3612 lpDevMode->dmBitsPerPel = 16;
3613 lpDevMode->dmPelsWidth = 640;
3614 lpDevMode->dmPelsHeight = 480;
3615 lpDevMode->dmDisplayFlags = 0;
3616 lpDevMode->dmDisplayFrequency = 70;
3617 break;
3618 default:
3619 return(FALSE);
3620 }
3621 return(TRUE);
3622}
3623//******************************************************************************
3624//******************************************************************************
3625LONG WIN32API ChangeDisplaySettingsA(LPDEVMODEA lpDevMode, DWORD dwFlags)
3626{
3627#ifdef DEBUG
3628 if(lpDevMode) {
3629 WriteLog("USER32: ChangeDisplaySettingsA FAKED %X\n", dwFlags);
3630 WriteLog("USER32: ChangeDisplaySettingsA lpDevMode->dmBitsPerPel %d\n", lpDevMode->dmBitsPerPel);
3631 WriteLog("USER32: ChangeDisplaySettingsA lpDevMode->dmPelsWidth %d\n", lpDevMode->dmPelsWidth);
3632 WriteLog("USER32: ChangeDisplaySettingsA lpDevMode->dmPelsHeight %d\n", lpDevMode->dmPelsHeight);
3633 }
3634#endif
3635 return(DISP_CHANGE_SUCCESSFUL);
3636}
3637//******************************************************************************
3638//******************************************************************************
3639
3640
3641/*****************************************************************************
3642 * Name : BOOL WIN32API AnyPopup
3643 * Purpose : The AnyPopup function indicates whether an owned, visible,
3644 * top-level pop-up, or overlapped window exists on the screen. The
3645 * function searches the entire Windows screen, not just the calling
3646 * application's client area.
3647 * Parameters: VOID
3648 * Variables :
3649 * Result : If a pop-up window exists, the return value is TRUE even if the
3650 * pop-up window is completely covered by other windows. Otherwise,
3651 * it is FALSE.
3652 * Remark : AnyPopup is a Windows version 1.x function and is retained for
3653 * compatibility purposes. It is generally not useful.
3654 * Status : UNTESTED STUB
3655 *
3656 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3657 *****************************************************************************/
3658
3659BOOL WIN32API AnyPopup(VOID)
3660{
3661 dprintf(("USER32:AnyPopup() not implemented.\n"));
3662
3663 return (FALSE);
3664}
3665
3666
3667/*****************************************************************************
3668 * Name : long WIN32API BroadcastSystemMessage
3669 * Purpose : The BroadcastSystemMessage function sends a message to the given
3670 * recipients. The recipients can be applications, installable
3671 * drivers, Windows-based network drivers, system-level device
3672 * drivers, or any combination of these system components.
3673 * Parameters: DWORD dwFlags,
3674 LPDWORD lpdwRecipients,
3675 UINT uiMessage,
3676 WPARAM wParam,
3677 LPARAM lParam
3678 * Variables :
3679 * Result : If the function succeeds, the return value is a positive value.
3680 * If the function is unable to broadcast the message, the return value is -1.
3681 * If the dwFlags parameter is BSF_QUERY and at least one recipient returned FALSE to the corresponding message, the return value is zero.
3682 * Remark :
3683 * Status : UNTESTED STUB
3684 *
3685 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3686 *****************************************************************************/
3687
3688long WIN32API BroadcastSystemMessage(DWORD dwFlags,
3689 LPDWORD lpdwRecipients,
3690 UINT uiMessage,
3691 WPARAM wParam,
3692 LPARAM lParam)
3693{
3694 dprintf(("USER32:BroadcastSystemMessage(%08xh,%08xh,%08xh,%08xh,%08x) not implemented.\n",
3695 dwFlags,
3696 lpdwRecipients,
3697 uiMessage,
3698 wParam,
3699 lParam));
3700
3701 return (-1);
3702}
3703
3704
3705/*****************************************************************************
3706 * Name : WORD WIN32API CascadeWindows
3707 * Purpose : The CascadeWindows function cascades the specified windows or
3708 * the child windows of the specified parent window.
3709 * Parameters: HWND hwndParent handle of parent window
3710 * UINT wHow types of windows not to arrange
3711 * CONST RECT * lpRect rectangle to arrange windows in
3712 * UINT cKids number of windows to arrange
3713 * const HWND FAR * lpKids array of window handles
3714 * Variables :
3715 * Result : If the function succeeds, the return value is the number of windows arranged.
3716 * If the function fails, the return value is zero.
3717 * Remark :
3718 * Status : UNTESTED STUB
3719 *
3720 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3721 *****************************************************************************/
3722
3723WORD WIN32API CascadeWindows(HWND hwndParent,
3724 UINT wHow,
3725 CONST LPRECT lpRect,
3726 UINT cKids,
3727 const HWND *lpKids)
3728{
3729 dprintf(("USER32:CascadeWindows(%08xh,%u,%08xh,%u,%08x) not implemented.\n",
3730 hwndParent,
3731 wHow,
3732 lpRect,
3733 cKids,
3734 lpKids));
3735
3736 return (0);
3737}
3738
3739
3740/*****************************************************************************
3741 * Name : LONG WIN32API ChangeDisplaySettingsW
3742 * Purpose : The ChangeDisplaySettings function changes the display settings
3743 * to the specified graphics mode.
3744 * Parameters: LPDEVMODEW lpDevModeW
3745 * DWORD dwFlags
3746 * Variables :
3747 * Result : DISP_CHANGE_SUCCESSFUL The settings change was successful.
3748 * DISP_CHANGE_RESTART The computer must be restarted in order for the graphics mode to work.
3749 * DISP_CHANGE_BADFLAGS An invalid set of flags was passed in.
3750 * DISP_CHANGE_FAILED The display driver failed the specified graphics mode.
3751 * DISP_CHANGE_BADMODE The graphics mode is not supported.
3752 * DISP_CHANGE_NOTUPDATED Unable to write settings to the registry.
3753 * Remark :
3754 * Status : UNTESTED STUB
3755 *
3756 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3757 *****************************************************************************/
3758
3759LONG WIN32API ChangeDisplaySettingsW(LPDEVMODEW lpDevMode,
3760 DWORD dwFlags)
3761{
3762 dprintf(("USER32:ChangeDisplaySettingsW(%08xh,%08x) not implemented.\n",
3763 lpDevMode,
3764 dwFlags));
3765
3766 return (ChangeDisplaySettingsA((LPDEVMODEA)lpDevMode,
3767 dwFlags));
3768}
3769
3770/*****************************************************************************
3771 * Name : BOOL WIN32API CloseDesktop
3772 * Purpose : The CloseDesktop function closes an open handle of a desktop
3773 * object. A desktop is a secure object contained within a window
3774 * station object. A desktop has a logical display surface and
3775 * contains windows, menus and hooks.
3776 * Parameters: HDESK hDesktop
3777 * Variables :
3778 * Result : If the function succeeds, the return value is TRUE.
3779 * If the functions fails, the return value is FALSE. To get
3780 * extended error information, call GetLastError.
3781 * Remark :
3782 * Status : UNTESTED STUB
3783 *
3784 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3785 *****************************************************************************/
3786
3787BOOL WIN32API CloseDesktop(HDESK hDesktop)
3788{
3789 dprintf(("USER32:CloseDesktop(%08x) not implemented.\n",
3790 hDesktop));
3791
3792 return (FALSE);
3793}
3794
3795
3796/*****************************************************************************
3797 * Name : BOOL WIN32API CloseWindowStation
3798 * Purpose : The CloseWindowStation function closes an open window station handle.
3799 * Parameters: HWINSTA hWinSta
3800 * Variables :
3801 * Result :
3802 * Remark : If the function succeeds, the return value is TRUE.
3803 * If the functions fails, the return value is FALSE. To get
3804 * extended error information, call GetLastError.
3805 * Status : UNTESTED STUB
3806 *
3807 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3808 *****************************************************************************/
3809
3810BOOL WIN32API CloseWindowStation(HWINSTA hWinSta)
3811{
3812 dprintf(("USER32:CloseWindowStation(%08x) not implemented.\n",
3813 hWinSta));
3814
3815 return (FALSE);
3816}
3817
3818
3819/*****************************************************************************
3820 * Name : HDESK WIN32API CreateDesktopA
3821 * Purpose : The CreateDesktop function creates a new desktop on the window
3822 * station associated with the calling process.
3823 * Parameters: LPCTSTR lpszDesktop name of the new desktop
3824 * LPCTSTR lpszDevice name of display device to assign to the desktop
3825 * LPDEVMODE pDevMode reserved; must be NULL
3826 * DWORD dwFlags flags to control interaction with other applications
3827 * DWORD dwDesiredAccess specifies access of returned handle
3828 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the desktop
3829 * Variables :
3830 * Result : If the function succeeds, the return value is a handle of the
3831 * newly created desktop.
3832 * If the function fails, the return value is NULL. To get extended
3833 * error information, call GetLastError.
3834 * Remark :
3835 * Status : UNTESTED STUB
3836 *
3837 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3838 *****************************************************************************/
3839
3840HDESK WIN32API CreateDesktopA(LPCTSTR lpszDesktop,
3841 LPCTSTR lpszDevice,
3842 LPDEVMODEA pDevMode,
3843 DWORD dwFlags,
3844 DWORD dwDesiredAccess,
3845 LPSECURITY_ATTRIBUTES lpsa)
3846{
3847 dprintf(("USER32:CreateDesktopA(%s,%s,%08xh,%08xh,%08xh,%08x) not implemented.\n",
3848 lpszDesktop,
3849 lpszDevice,
3850 pDevMode,
3851 dwFlags,
3852 dwDesiredAccess,
3853 lpsa));
3854
3855 return (NULL);
3856}
3857
3858
3859/*****************************************************************************
3860 * Name : HDESK WIN32API CreateDesktopW
3861 * Purpose : The CreateDesktop function creates a new desktop on the window
3862 * station associated with the calling process.
3863 * Parameters: LPCTSTR lpszDesktop name of the new desktop
3864 * LPCTSTR lpszDevice name of display device to assign to the desktop
3865 * LPDEVMODE pDevMode reserved; must be NULL
3866 * DWORD dwFlags flags to control interaction with other applications
3867 * DWORD dwDesiredAccess specifies access of returned handle
3868 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the desktop
3869 * Variables :
3870 * Result : If the function succeeds, the return value is a handle of the
3871 * newly created desktop.
3872 * If the function fails, the return value is NULL. To get extended
3873 * error information, call GetLastError.
3874 * Remark :
3875 * Status : UNTESTED STUB
3876 *
3877 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3878 *****************************************************************************/
3879
3880HDESK WIN32API CreateDesktopW(LPCTSTR lpszDesktop,
3881 LPCTSTR lpszDevice,
3882 LPDEVMODEW pDevMode,
3883 DWORD dwFlags,
3884 DWORD dwDesiredAccess,
3885 LPSECURITY_ATTRIBUTES lpsa)
3886{
3887 dprintf(("USER32:CreateDesktopW(%s,%s,%08xh,%08xh,%08xh,%08x) not implemented.\n",
3888 lpszDesktop,
3889 lpszDevice,
3890 pDevMode,
3891 dwFlags,
3892 dwDesiredAccess,
3893 lpsa));
3894
3895 return (NULL);
3896}
3897
3898
3899/*****************************************************************************
3900 * Name : HWINSTA WIN32API CreateWindowStationA
3901 * Purpose : The CreateWindowStation function creates a window station object.
3902 * It returns a handle that can be used to access the window station.
3903 * A window station is a secure object that contains a set of global
3904 * atoms, a clipboard, and a set of desktop objects.
3905 * Parameters: LPTSTR lpwinsta name of the new window station
3906 * DWORD dwReserved reserved; must be NULL
3907 * DWORD dwDesiredAccess specifies access of returned handle
3908 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the window station
3909 * Variables :
3910 * Result : If the function succeeds, the return value is the handle to the
3911 * newly created window station.
3912 * If the function fails, the return value is NULL. To get extended
3913 * error information, call GetLastError.
3914 * Remark :
3915 * Status : UNTESTED STUB
3916 *
3917 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3918 *****************************************************************************/
3919
3920HWINSTA WIN32API CreateWindowStationA(LPTSTR lpWinSta,
3921 DWORD dwReserved,
3922 DWORD dwDesiredAccess,
3923 LPSECURITY_ATTRIBUTES lpsa)
3924{
3925 dprintf(("USER32:CreateWindowStationA(%s,%08xh,%08xh,%08x) not implemented.\n",
3926 lpWinSta,
3927 dwReserved,
3928 dwDesiredAccess,
3929 lpsa));
3930
3931 return (NULL);
3932}
3933
3934
3935/*****************************************************************************
3936 * Name : HWINSTA WIN32API CreateWindowStationW
3937 * Purpose : The CreateWindowStation function creates a window station object.
3938 * It returns a handle that can be used to access the window station.
3939 * A window station is a secure object that contains a set of global
3940 * atoms, a clipboard, and a set of desktop objects.
3941 * Parameters: LPTSTR lpwinsta name of the new window station
3942 * DWORD dwReserved reserved; must be NULL
3943 * DWORD dwDesiredAccess specifies access of returned handle
3944 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the window station
3945 * Variables :
3946 * Result : If the function succeeds, the return value is the handle to the
3947 * newly created window station.
3948 * If the function fails, the return value is NULL. To get extended
3949 * error information, call GetLastError.
3950 * Remark :
3951 * Status : UNTESTED STUB
3952 *
3953 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3954 *****************************************************************************/
3955
3956HWINSTA WIN32API CreateWindowStationW(LPWSTR lpWinSta,
3957 DWORD dwReserved,
3958 DWORD dwDesiredAccess,
3959 LPSECURITY_ATTRIBUTES lpsa)
3960{
3961 dprintf(("USER32:CreateWindowStationW(%s,%08xh,%08xh,%08x) not implemented.\n",
3962 lpWinSta,
3963 dwReserved,
3964 dwDesiredAccess,
3965 lpsa));
3966
3967 return (NULL);
3968}
3969
3970/*****************************************************************************
3971 * Name : BOOL WIN32API DragDetect
3972 * Purpose : The DragDetect function captures the mouse and tracks its movement
3973 * Parameters: HWND hwnd
3974 * POINT pt
3975 * Variables :
3976 * Result : If the user moved the mouse outside of the drag rectangle while
3977 * holding the left button down, the return value is TRUE.
3978 * If the user did not move the mouse outside of the drag rectangle
3979 * while holding the left button down, the return value is FALSE.
3980 * Remark :
3981 * Status : UNTESTED STUB
3982 *
3983 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3984 *****************************************************************************/
3985
3986BOOL WIN32API DragDetect(HWND hwnd,
3987 POINT pt)
3988{
3989 dprintf(("USER32:DragDetect(%08xh,...) not implemented.\n",
3990 hwnd));
3991
3992 return (FALSE);
3993}
3994
3995
3996/*****************************************************************************
3997 * Name : BOOL WIN32API DrawAnimatedRects
3998 * Purpose : The DrawAnimatedRects function draws a wire-frame rectangle
3999 * and animates it to indicate the opening of an icon or the
4000 * minimizing or maximizing of a window.
4001 * Parameters: HWND hwnd handle of clipping window
4002 * int idAni type of animation
4003 * CONST RECT * lprcFrom address of rectangle coordinates (minimized)
4004 * CONST RECT * lprcTo address of rectangle coordinates (restored)
4005 * Variables :
4006 * Result : If the function succeeds, the return value is TRUE.
4007 * If the function fails, the return value is FALSE.
4008 * Remark :
4009 * Status : UNTESTED STUB
4010 *
4011 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4012 *****************************************************************************/
4013
4014BOOL WIN32API DrawAnimatedRects(HWND hwnd,
4015 int idAni,
4016 CONST RECT *lprcFrom,
4017 CONST RECT *lprcTo)
4018{
4019 dprintf(("USER32:DrawAnimatedRects (%08xh,%u,%08xh,%08x) not implemented.\n",
4020 hwnd,
4021 idAni,
4022 lprcFrom,
4023 lprcTo));
4024
4025 return (TRUE);
4026}
4027
4028
4029/*****************************************************************************
4030 * Name : VOID WIN32API DrawCaption
4031 * Purpose : The DrawCaption function draws a window caption.
4032 * Parameters: HDC hdc handle of device context
4033 * LPRECT lprc address of bounding rectangle coordinates
4034 * HFONT hfont handle of font for caption
4035 * HICON hicon handle of icon in caption
4036 * LPSTR lpszText address of caption string
4037 * WORD wFlags drawing options
4038 * Variables :
4039 * Result :
4040 * Remark :
4041 * Status : UNTESTED STUB
4042 *
4043 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4044 *****************************************************************************/
4045
4046BOOL WIN32API DrawCaption (HWND hwnd,
4047 HDC hdc,
4048 const RECT *lprc,
4049 UINT wFlags)
4050{
4051 dprintf(("USER32:DrawCaption (%08xh,%08xh,%08xh,%08xh) not implemented.\n",
4052 hwnd,
4053 hdc,
4054 lprc,
4055 wFlags));
4056
4057 return FALSE;
4058}
4059
4060
4061/*****************************************************************************
4062 * Name :
4063 * Purpose :
4064 * Parameters:
4065 * Variables :
4066 * Result :
4067 * Remark :
4068 * Status : UNTESTED STUB
4069 *
4070 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4071 *****************************************************************************/
4072
4073/*****************************************************************************
4074 * Name : BOOL WIN32API EnumDesktopWindows
4075 * Purpose : The EnumDesktopWindows function enumerates all windows in a
4076 * desktop by passing the handle of each window, in turn, to an
4077 * application-defined callback function.
4078 * Parameters: HDESK hDesktop handle of desktop to enumerate
4079 * WNDENUMPROC lpfn points to application's callback function
4080 * LPARAM lParam 32-bit value to pass to the callback function
4081 * Variables :
4082 * Result : If the function succeeds, the return value is TRUE.
4083 * If the function fails, the return value is FALSE. To get
4084 * extended error information, call GetLastError.
4085 * Remark :
4086 * Status : UNTESTED STUB
4087 *
4088 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4089 *****************************************************************************/
4090
4091BOOL WIN32API EnumDesktopWindows(HDESK hDesktop,
4092 WNDENUMPROC lpfn,
4093 LPARAM lParam)
4094{
4095 dprintf(("USER32:EnumDesktopWindows (%08xh,%08xh,%08x) not implemented.\n",
4096 hDesktop,
4097 lpfn,
4098 lParam));
4099
4100 return (FALSE);
4101}
4102
4103
4104/*****************************************************************************
4105 * Name : BOOL WIN32API EnumDesktopsA
4106 * Purpose : The EnumDesktops function enumerates all desktops in the window
4107 * station assigned to the calling process. The function does so by
4108 * passing the name of each desktop, in turn, to an application-
4109 * defined callback function.
4110 * Parameters: HWINSTA hwinsta handle of window station to enumerate
4111 * DESKTOPENUMPROC lpEnumFunc points to application's callback function
4112 * LPARAM lParam 32-bit value to pass to the callback function
4113 * Variables :
4114 * Result : If the function succeeds, the return value is TRUE.
4115 * If the function fails, the return value is FALSE. To get extended
4116 * error information, call GetLastError.
4117 * Remark :
4118 * Status : UNTESTED STUB
4119 *
4120 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4121 *****************************************************************************/
4122
4123BOOL WIN32API EnumDesktopsA(HWINSTA hWinSta,
4124 DESKTOPENUMPROCA lpEnumFunc,
4125 LPARAM lParam)
4126{
4127 dprintf(("USER32:EnumDesktopsA (%08xh,%08xh,%08x) not implemented.\n",
4128 hWinSta,
4129 lpEnumFunc,
4130 lParam));
4131
4132 return (FALSE);
4133}
4134
4135
4136/*****************************************************************************
4137 * Name : BOOL WIN32API EnumDesktopsW
4138 * Purpose : The EnumDesktops function enumerates all desktops in the window
4139 * station assigned to the calling process. The function does so by
4140 * passing the name of each desktop, in turn, to an application-
4141 * defined callback function.
4142 * Parameters: HWINSTA hwinsta handle of window station to enumerate
4143 * DESKTOPENUMPROC lpEnumFunc points to application's callback function
4144 * LPARAM lParam 32-bit value to pass to the callback function
4145 * Variables :
4146 * Result : If the function succeeds, the return value is TRUE.
4147 * If the function fails, the return value is FALSE. To get extended
4148 * error information, call GetLastError.
4149 * Remark :
4150 * Status : UNTESTED STUB
4151 *
4152 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4153 *****************************************************************************/
4154
4155BOOL WIN32API EnumDesktopsW(HWINSTA hWinSta,
4156 DESKTOPENUMPROCW lpEnumFunc,
4157 LPARAM lParam)
4158{
4159 dprintf(("USER32:EnumDesktopsW (%08xh,%08xh,%08x) not implemented.\n",
4160 hWinSta,
4161 lpEnumFunc,
4162 lParam));
4163
4164 return (FALSE);
4165}
4166
4167
4168
4169/*****************************************************************************
4170 * Name : BOOL WIN32API EnumDisplaySettingsW
4171 * Purpose : The EnumDisplaySettings function obtains information about one
4172 * of a display device's graphics modes. You can obtain information
4173 * for all of a display device's graphics modes by making a series
4174 * of calls to this function.
4175 * Parameters: LPCTSTR lpszDeviceName specifies the display device
4176 * DWORD iModeNum specifies the graphics mode
4177 * LPDEVMODE lpDevMode points to structure to receive settings
4178 * Variables :
4179 * Result : If the function succeeds, the return value is TRUE.
4180 * If the function fails, the return value is FALSE.
4181 * Remark :
4182 * Status : UNTESTED STUB
4183 *
4184 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4185 *****************************************************************************/
4186
4187BOOL WIN32API EnumDisplaySettingsW(LPCSTR lpszDeviceName,
4188 DWORD iModeNum,
4189 LPDEVMODEW lpDevMode)
4190{
4191 dprintf(("USER32:EnumDisplaySettingsW (%s,%08xh,%08x) not implemented.\n",
4192 lpszDeviceName,
4193 iModeNum,
4194 lpDevMode));
4195
4196 return (EnumDisplaySettingsA(lpszDeviceName,
4197 iModeNum,
4198 (LPDEVMODEA)lpDevMode));
4199}
4200
4201
4202/*****************************************************************************
4203 * Name : BOOL WIN32API EnumWindowStationsA
4204 * Purpose : The EnumWindowStations function enumerates all windowstations
4205 * in the system by passing the name of each window station, in
4206 * turn, to an application-defined callback function.
4207 * Parameters:
4208 * Variables : WINSTAENUMPROC lpEnumFunc points to application's callback function
4209 * LPARAM lParam 32-bit value to pass to the callback function
4210 * Result : If the function succeeds, the return value is TRUE.
4211 * If the function fails the return value is FALSE. To get extended
4212 * error information, call GetLastError.
4213 * Remark :
4214 * Status : UNTESTED STUB
4215 *
4216 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4217 *****************************************************************************/
4218
4219BOOL WIN32API EnumWindowStationsA(WINSTAENUMPROCA lpEnumFunc,
4220 LPARAM lParam)
4221{
4222 dprintf(("USER32:EnumWindowStationsA (%08xh,%08x) not implemented.\n",
4223 lpEnumFunc,
4224 lParam));
4225
4226 return (FALSE);
4227}
4228
4229
4230/*****************************************************************************
4231 * Name : BOOL WIN32API EnumWindowStationsW
4232 * Purpose : The EnumWindowStations function enumerates all windowstations
4233 * in the system by passing the name of each window station, in
4234 * turn, to an application-defined callback function.
4235 * Parameters:
4236 * Variables : WINSTAENUMPROC lpEnumFunc points to application's callback function
4237 * LPARAM lParam 32-bit value to pass to the callback function
4238 * Result : If the function succeeds, the return value is TRUE.
4239 * If the function fails the return value is FALSE. To get extended
4240 * error information, call GetLastError.
4241 * Remark :
4242 * Status : UNTESTED STUB
4243 *
4244 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4245 *****************************************************************************/
4246
4247BOOL WIN32API EnumWindowStationsW(WINSTAENUMPROCW lpEnumFunc,
4248 LPARAM lParam)
4249{
4250 dprintf(("USER32:EnumWindowStationsW (%08xh,%08x) not implemented.\n",
4251 lpEnumFunc,
4252 lParam));
4253
4254 return (FALSE);
4255}
4256
4257
4258/*****************************************************************************
4259 * Name : HWND WIN32API FindWindowExW
4260 * Purpose : The FindWindowEx function retrieves the handle of a window whose
4261 * class name and window name match the specified strings. The
4262 * function searches child windows, beginning with the one following
4263 * the given child window.
4264 * Parameters: HWND hwndParent handle of parent window
4265 * HWND hwndChildAfter handle of a child window
4266 * LPCTSTR lpszClass address of class name
4267 * LPCTSTR lpszWindow address of window name
4268 * Variables :
4269 * Result : If the function succeeds, the return value is the handle of the
4270 * window that has the specified class and window names.
4271 * If the function fails, the return value is NULL. To get extended
4272 * error information, call GetLastError.
4273 * Remark :
4274 * Status : UNTESTED STUB
4275 *
4276 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4277 *****************************************************************************/
4278
4279HWND WIN32API FindWindowExW(HWND hwndParent,
4280 HWND hwndChildAfter,
4281 LPCWSTR lpszClass,
4282 LPCWSTR lpszWindow)
4283{
4284 dprintf(("USER32:FindWindowExW (%08xh,%08xh,%s,%s) not implemented.\n",
4285 hwndParent,
4286 hwndChildAfter,
4287 lpszClass,
4288 lpszWindow));
4289
4290 return (NULL);
4291}
4292
4293/*****************************************************************************
4294 * Name : BOOL WIN32API GetInputState
4295 * Purpose : The GetInputState function determines whether there are
4296 * mouse-button or keyboard messages in the calling thread's message queue.
4297 * Parameters:
4298 * Variables :
4299 * Result : If the queue contains one or more new mouse-button or keyboard
4300 * messages, the return value is TRUE.
4301 * If the function fails, the return value is FALSE.
4302 * Remark :
4303 * Status : UNTESTED STUB
4304 *
4305 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4306 *****************************************************************************/
4307
4308BOOL WIN32API GetInputState(VOID)
4309{
4310 dprintf(("USER32:GetInputState () not implemented.\n"));
4311
4312 return (FALSE);
4313}
4314
4315
4316/*****************************************************************************
4317 * Name : UINT WIN32API GetKBCodePage
4318 * Purpose : The GetKBCodePage function is provided for compatibility with
4319 * earlier versions of Windows. In the Win32 application programming
4320 * interface (API) it just calls the GetOEMCP function.
4321 * Parameters:
4322 * Variables :
4323 * Result : If the function succeeds, the return value is an OEM code-page
4324 * identifier, or it is the default identifier if the registry
4325 * value is not readable. For a list of OEM code-page identifiers,
4326 * see GetOEMCP.
4327 * Remark :
4328 * Status : UNTESTED
4329 *
4330 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4331 *****************************************************************************/
4332
4333UINT WIN32API GetKBCodePage(VOID)
4334{
4335 return (GetOEMCP());
4336}
4337
4338
4339/*****************************************************************************
4340 * Name : BOOL WIN32API GetKeyboardLayoutNameA
4341 * Purpose : The GetKeyboardLayoutName function retrieves the name of the
4342 * active keyboard layout.
4343 * Parameters: LPTSTR pwszKLID address of buffer for layout name
4344 * Variables :
4345 * Result : If the function succeeds, the return value is TRUE.
4346 * If the function fails, the return value is FALSE. To get extended
4347 * error information, call GetLastError.
4348 * Remark :
4349 * Status : UNTESTED STUB
4350 *
4351 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4352 *****************************************************************************/
4353
4354BOOL WIN32API GetKeyboardLayoutNameA(LPTSTR pwszKLID)
4355{
4356 dprintf(("USER32:GetKeyboardLayoutNameA (%08x) not implemented.",
4357 pwszKLID));
4358
4359 return(FALSE);
4360}
4361
4362
4363/*****************************************************************************
4364 * Name : BOOL WIN32API GetKeyboardLayoutNameW
4365 * Purpose : The GetKeyboardLayoutName function retrieves the name of the
4366 * active keyboard layout.
4367 * Parameters: LPTSTR pwszKLID address of buffer for layout name
4368 * Variables :
4369 * Result : If the function succeeds, the return value is TRUE.
4370 * If the function fails, the return value is FALSE. To get extended
4371 * error information, call GetLastError.
4372 * Remark :
4373 * Status : UNTESTED STUB
4374 *
4375 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4376 *****************************************************************************/
4377
4378BOOL WIN32API GetKeyboardLayoutNameW(LPWSTR pwszKLID)
4379{
4380 dprintf(("USER32:GetKeyboardLayoutNameW (%08x) not implemented.",
4381 pwszKLID));
4382
4383 return(FALSE);
4384}
4385
4386
4387
4388
4389/*****************************************************************************
4390 * Name : HWINSTA WIN32API GetProcessWindowStation
4391 * Purpose : The GetProcessWindowStation function returns a handle of the
4392 * window station associated with the calling process.
4393 * Parameters:
4394 * Variables :
4395 * Result : If the function succeeds, the return value is a handle of the
4396 * window station associated with the calling process.
4397 * If the function fails, the return value is NULL. This can occur
4398 * if the calling process is not an application written for Windows
4399 * NT. To get extended error information, call GetLastError.
4400 * Remark :
4401 * Status : UNTESTED STUB
4402 *
4403 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4404 *****************************************************************************/
4405
4406HWINSTA WIN32API GetProcessWindowStation(VOID)
4407{
4408 dprintf(("USER32:GetProcessWindowStation () not implemented.\n"));
4409
4410 return (NULL);
4411}
4412
4413
4414
4415/*****************************************************************************
4416 * Name : HDESK WIN32API GetThreadDesktop
4417 * Purpose : The GetThreadDesktop function returns a handle to the desktop
4418 * associated with a specified thread.
4419 * Parameters: DWORD dwThreadId thread identifier
4420 * Variables :
4421 * Result : If the function succeeds, the return value is the handle of the
4422 * desktop associated with the specified thread.
4423 * Remark :
4424 * Status : UNTESTED STUB
4425 *
4426 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4427 *****************************************************************************/
4428
4429HDESK WIN32API GetThreadDesktop(DWORD dwThreadId)
4430{
4431 dprintf(("USER32:GetThreadDesktop (%u) not implemented.\n",
4432 dwThreadId));
4433
4434 return (NULL);
4435}
4436
4437
4438/*****************************************************************************
4439 * Name : BOOL WIN32API GetUserObjectInformationA
4440 * Purpose : The GetUserObjectInformation function returns information about
4441 * a window station or desktop object.
4442 * Parameters: HANDLE hObj handle of object to get information for
4443 * int nIndex type of information to get
4444 * PVOID pvInfo points to buffer that receives the information
4445 * DWORD nLength size, in bytes, of pvInfo buffer
4446 * LPDWORD lpnLengthNeeded receives required size, in bytes, of pvInfo buffer
4447 * Variables :
4448 * Result : If the function succeeds, the return value is TRUE.
4449 * If the function fails, the return value is FALSE. To get extended
4450 * error information, call GetLastError.
4451 * Remark :
4452 * Status : UNTESTED STUB
4453 *
4454 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4455 *****************************************************************************/
4456
4457BOOL WIN32API GetUserObjectInformationA(HANDLE hObj,
4458 int nIndex,
4459 PVOID pvInfo,
4460 DWORD nLength,
4461 LPDWORD lpnLengthNeeded)
4462{
4463 dprintf(("USER32:GetUserObjectInformationA (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
4464 hObj,
4465 nIndex,
4466 pvInfo,
4467 nLength,
4468 lpnLengthNeeded));
4469
4470 return (FALSE);
4471}
4472
4473
4474/*****************************************************************************
4475 * Name : BOOL WIN32API GetUserObjectInformationW
4476 * Purpose : The GetUserObjectInformation function returns information about
4477 * a window station or desktop object.
4478 * Parameters: HANDLE hObj handle of object to get information for
4479 * int nIndex type of information to get
4480 * PVOID pvInfo points to buffer that receives the information
4481 * DWORD nLength size, in bytes, of pvInfo buffer
4482 * LPDWORD lpnLengthNeeded receives required size, in bytes, of pvInfo buffer
4483 * Variables :
4484 * Result : If the function succeeds, the return value is TRUE.
4485 * If the function fails, the return value is FALSE. To get extended
4486 * error information, call GetLastError.
4487 * Remark :
4488 * Status : UNTESTED STUB
4489 *
4490 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4491 *****************************************************************************/
4492
4493BOOL WIN32API GetUserObjectInformationW(HANDLE hObj,
4494 int nIndex,
4495 PVOID pvInfo,
4496 DWORD nLength,
4497 LPDWORD lpnLengthNeeded)
4498{
4499 dprintf(("USER32:GetUserObjectInformationW (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
4500 hObj,
4501 nIndex,
4502 pvInfo,
4503 nLength,
4504 lpnLengthNeeded));
4505
4506 return (FALSE);
4507}
4508
4509
4510/*****************************************************************************
4511 * Name : BOOL WIN32API GetUserObjectSecurity
4512 * Purpose : The GetUserObjectSecurity function retrieves security information
4513 * for the specified user object.
4514 * Parameters: HANDLE hObj handle of user object
4515 * SECURITY_INFORMATION * pSIRequested address of requested security information
4516 * LPSECURITY_DESCRIPTOR pSID address of security descriptor
4517 * DWORD nLength size of buffer for security descriptor
4518 * LPDWORD lpnLengthNeeded address of required size of buffer
4519 * Variables :
4520 * Result : If the function succeeds, the return value is TRUE.
4521 * If the function fails, the return value is FALSE. To get extended
4522 * error information, call GetLastError.
4523 * Remark :
4524 * Status : UNTESTED STUB
4525 *
4526 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4527 *****************************************************************************/
4528
4529BOOL WIN32API GetUserObjectSecurity(HANDLE hObj,
4530 SECURITY_INFORMATION * pSIRequested,
4531 LPSECURITY_DESCRIPTOR pSID,
4532 DWORD nLength,
4533 LPDWORD lpnLengthNeeded)
4534{
4535 dprintf(("USER32:GetUserObjectSecurity (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
4536 hObj,
4537 pSIRequested,
4538 pSID,
4539 nLength,
4540 lpnLengthNeeded));
4541
4542 return (FALSE);
4543}
4544
4545
4546
4547/*****************************************************************************
4548 * Name : int WIN32API GetWindowRgn
4549 * Purpose : The GetWindowRgn function obtains a copy of the window region of a window.
4550 * Parameters: HWND hWnd handle to window whose window region is to be obtained
4551 * HRGN hRgn handle to region that receives a copy of the window region
4552 * Variables :
4553 * Result : NULLREGION, SIMPLEREGION, COMPLEXREGION, ERROR
4554 * Remark :
4555 * Status : UNTESTED STUB
4556 *
4557 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4558 *****************************************************************************/
4559
4560int WIN32API GetWindowRgn (HWND hWnd,
4561 HRGN hRgn)
4562{
4563 dprintf(("USER32:GetWindowRgn (%08xh,%08x) not implemented.\n",
4564 hWnd,
4565 hRgn));
4566
4567 return (NULLREGION);
4568}
4569
4570
4571
4572/*****************************************************************************
4573 * Name : HCURSOR WIN32API LoadCursorFromFileA
4574 * Purpose : The LoadCursorFromFile function creates a cursor based on data
4575 * contained in a file. The file is specified by its name or by a
4576 * system cursor identifier. The function returns a handle to the
4577 * newly created cursor. Files containing cursor data may be in
4578 * either cursor (.CUR) or animated cursor (.ANI) format.
4579 * Parameters: LPCTSTR lpFileName pointer to cursor file, or system cursor id
4580 * Variables :
4581 * Result : If the function is successful, the return value is a handle to
4582 * the new cursor.
4583 * If the function fails, the return value is NULL. To get extended
4584 * error information, call GetLastError. GetLastError may return
4585 * the following
4586 * Remark :
4587 * Status : UNTESTED STUB
4588 *
4589 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4590 *****************************************************************************/
4591
4592HCURSOR WIN32API LoadCursorFromFileA(LPCTSTR lpFileName)
4593{
4594 dprintf(("USER32:LoadCursorFromFileA (%s) not implemented.\n",
4595 lpFileName));
4596
4597 return (NULL);
4598}
4599
4600
4601/*****************************************************************************
4602 * Name : HCURSOR WIN32API LoadCursorFromFileW
4603 * Purpose : The LoadCursorFromFile function creates a cursor based on data
4604 * contained in a file. The file is specified by its name or by a
4605 * system cursor identifier. The function returns a handle to the
4606 * newly created cursor. Files containing cursor data may be in
4607 * either cursor (.CUR) or animated cursor (.ANI) format.
4608 * Parameters: LPCTSTR lpFileName pointer to cursor file, or system cursor id
4609 * Variables :
4610 * Result : If the function is successful, the return value is a handle to
4611 * the new cursor.
4612 * If the function fails, the return value is NULL. To get extended
4613 * error information, call GetLastError. GetLastError may return
4614 * the following
4615 * Remark :
4616 * Status : UNTESTED STUB
4617 *
4618 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4619 *****************************************************************************/
4620
4621HCURSOR WIN32API LoadCursorFromFileW(LPCWSTR lpFileName)
4622{
4623 dprintf(("USER32:LoadCursorFromFileW (%s) not implemented.\n",
4624 lpFileName));
4625
4626 return (NULL);
4627}
4628
4629
4630/*****************************************************************************
4631 * Name : HLK WIN32API LoadKeyboardLayoutA
4632 * Purpose : The LoadKeyboardLayout function loads a new keyboard layout into
4633 * the system. Several keyboard layouts can be loaded at a time, but
4634 * only one per process is active at a time. Loading multiple keyboard
4635 * layouts makes it possible to rapidly switch between layouts.
4636 * Parameters:
4637 * Variables :
4638 * Result : If the function succeeds, the return value is the handle of the
4639 * keyboard layout.
4640 * If the function fails, the return value is NULL. To get extended
4641 * error information, call GetLastError.
4642 * Remark :
4643 * Status : UNTESTED STUB
4644 *
4645 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4646 *****************************************************************************/
4647
4648HKL WIN32API LoadKeyboardLayoutA(LPCTSTR pwszKLID,
4649 UINT Flags)
4650{
4651 dprintf(("USER32:LeadKeyboardLayoutA (%s,%u) not implemented.\n",
4652 pwszKLID,
4653 Flags));
4654
4655 return (NULL);
4656}
4657
4658
4659/*****************************************************************************
4660 * Name : HLK WIN32API LoadKeyboardLayoutW
4661 * Purpose : The LoadKeyboardLayout function loads a new keyboard layout into
4662 * the system. Several keyboard layouts can be loaded at a time, but
4663 * only one per process is active at a time. Loading multiple keyboard
4664 * layouts makes it possible to rapidly switch between layouts.
4665 * Parameters:
4666 * Variables :
4667 * Result : If the function succeeds, the return value is the handle of the
4668 * keyboard layout.
4669 * If the function fails, the return value is NULL. To get extended
4670 * error information, call GetLastError.
4671 * Remark :
4672 * Status : UNTESTED STUB
4673 *
4674 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4675 *****************************************************************************/
4676
4677HKL WIN32API LoadKeyboardLayoutW(LPCWSTR pwszKLID,
4678 UINT Flags)
4679{
4680 dprintf(("USER32:LeadKeyboardLayoutW (%s,%u) not implemented.\n",
4681 pwszKLID,
4682 Flags));
4683
4684 return (NULL);
4685}
4686
4687
4688/*****************************************************************************
4689 * Name : UINT WIN32API MapVirtualKeyExA
4690 * Purpose : The MapVirtualKeyEx function translates (maps) a virtual-key
4691 * code into a scan code or character value, or translates a scan
4692 * code into a virtual-key code. The function translates the codes
4693 * using the input language and physical keyboard layout identified
4694 * by the given keyboard layout handle.
4695 * Parameters:
4696 * Variables :
4697 * Result : The return value is either a scan code, a virtual-key code, or
4698 * a character value, depending on the value of uCode and uMapType.
4699 * If there is no translation, the return value is zero.
4700 * Remark :
4701 * Status : UNTESTED STUB
4702 *
4703 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4704 *****************************************************************************/
4705
4706UINT WIN32API MapVirtualKeyExA(UINT uCode,
4707 UINT uMapType,
4708 HKL dwhkl)
4709{
4710 dprintf(("USER32:MapVirtualKeyExA (%u,%u,%08x) not implemented.\n",
4711 uCode,
4712 uMapType,
4713 dwhkl));
4714
4715 return (0);
4716}
4717
4718
4719/*****************************************************************************
4720 * Name : UINT WIN32API MapVirtualKeyExW
4721 * Purpose : The MapVirtualKeyEx function translates (maps) a virtual-key
4722 * code into a scan code or character value, or translates a scan
4723 * code into a virtual-key code. The function translates the codes
4724 * using the input language and physical keyboard layout identified
4725 * by the given keyboard layout handle.
4726 * Parameters:
4727 * Variables :
4728 * Result : The return value is either a scan code, a virtual-key code, or
4729 * a character value, depending on the value of uCode and uMapType.
4730 * If there is no translation, the return value is zero.
4731 * Remark :
4732 * Status : UNTESTED STUB
4733
4734 *
4735 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4736 *****************************************************************************/
4737
4738UINT WIN32API MapVirtualKeyExW(UINT uCode,
4739 UINT uMapType,
4740 HKL dwhkl)
4741{
4742 dprintf(("USER32:MapVirtualKeyExW (%u,%u,%08x) not implemented.\n",
4743 uCode,
4744 uMapType,
4745 dwhkl));
4746
4747 return (0);
4748}
4749
4750
4751/*****************************************************************************
4752 * Name : int WIN32API MessageBoxExA
4753 * Purpose : The MessageBoxEx function creates, displays, and operates a message box.
4754 * Parameters: HWND hWnd handle of owner window
4755 * LPCTSTR lpText address of text in message box
4756 * LPCTSTR lpCaption address of title of message box
4757 * UINT uType style of message box
4758 * WORD wLanguageId language identifier
4759 * Variables :
4760 * Result : If the function succeeds, the return value is a nonzero menu-item
4761 * value returned by the dialog box.
4762 * Remark :
4763 * Status : UNTESTED STUB
4764 *
4765 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4766 *****************************************************************************/
4767
4768int WIN32API MessageBoxExA(HWND hWnd,
4769 LPCTSTR lpText,
4770 LPCTSTR lpCaption,
4771 UINT uType,
4772 WORD wLanguageId)
4773{
4774 dprintf(("USER32:MessageBoxExA (%08xh,%s,%s,%u,%08w) not implemented.\n",
4775 hWnd,
4776 lpText,
4777 lpCaption,
4778 uType,
4779 wLanguageId));
4780
4781 return (MessageBoxA(hWnd,
4782 lpText,
4783 lpCaption,
4784 uType));
4785}
4786
4787
4788/*****************************************************************************
4789 * Name : int WIN32API MessageBoxExW
4790 * Purpose : The MessageBoxEx function creates, displays, and operates a message box.
4791 * Parameters: HWND hWnd handle of owner window
4792 * LPCTSTR lpText address of text in message box
4793 * LPCTSTR lpCaption address of title of message box
4794 * UINT uType style of message box
4795 * WORD wLanguageId language identifier
4796 * Variables :
4797 * Result : If the function succeeds, the return value is a nonzero menu-item
4798 * value returned by the dialog box.
4799 * Remark :
4800 * Status : UNTESTED STUB
4801 *
4802 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4803 *****************************************************************************/
4804
4805int WIN32API MessageBoxExW(HWND hWnd,
4806 LPCWSTR lpText,
4807 LPCWSTR lpCaption,
4808 UINT uType,
4809 WORD wLanguageId)
4810{
4811
4812 dprintf(("USER32:MessageBoxExW (%08xh,%x,%x,%u,%08w) not implemented.\n",
4813 hWnd,
4814 lpText,
4815 lpCaption,
4816 uType,
4817 wLanguageId));
4818
4819 return MessageBoxW(hWnd, lpText, lpCaption, uType);
4820}
4821
4822
4823/*****************************************************************************
4824 * Name : BOOL WIN32API MessageBoxIndirectW
4825 * Purpose : The MessageBoxIndirect function creates, displays, and operates
4826 * a message box. The message box contains application-defined
4827 * message text and title, any icon, and any combination of
4828 * predefined push buttons.
4829 * Parameters:
4830 * Variables :
4831 * Result :
4832 * Remark :
4833 * Status : UNTESTED STUB
4834 *
4835 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4836 *****************************************************************************/
4837
4838BOOL WIN32API MessageBoxIndirectW(LPMSGBOXPARAMSW lpMsgBoxParams)
4839{
4840 dprintf(("USER32:MessageBoxIndirectW (%08x) not implemented.\n",
4841 lpMsgBoxParams));
4842
4843 return (FALSE);
4844}
4845
4846
4847/*****************************************************************************
4848 * Name : BOOL WIN32API MessageBoxIndirectA
4849 * Purpose : The MessageBoxIndirect function creates, displays, and operates
4850 * a message box. The message box contains application-defined
4851 * message text and title, any icon, and any combination of
4852 * predefined push buttons.
4853 * Parameters:
4854 * Variables :
4855 * Result :
4856 * Remark :
4857 * Status : UNTESTED STUB
4858 *
4859 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4860 *****************************************************************************/
4861
4862BOOL WIN32API MessageBoxIndirectA(LPMSGBOXPARAMSA lpMsgBoxParams)
4863{
4864 dprintf(("USER32:MessageBoxIndirectA (%08x) not implemented.\n",
4865 lpMsgBoxParams));
4866
4867 return (FALSE);
4868}
4869
4870
4871/*****************************************************************************
4872 * Name : DWORD WIN32API OemKeyScan
4873 * Purpose : The OemKeyScan function maps OEM ASCII codes 0 through 0x0FF
4874 * into the OEM scan codes and shift states. The function provides
4875 * information that allows a program to send OEM text to another
4876 * program by simulating keyboard input.
4877 * Parameters:
4878 * Variables :
4879 * Result :
4880 * Remark :
4881 * Status : UNTESTED STUB
4882 *
4883 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4884 *****************************************************************************/
4885
4886DWORD WIN32API OemKeyScan(WORD wOemChar)
4887{
4888 dprintf(("USER32:OemKeyScan (%u) not implemented.\n",
4889 wOemChar));
4890
4891 return (wOemChar);
4892}
4893
4894
4895/*****************************************************************************
4896 * Name : HDESK WIN32API OpenDesktopA
4897 * Purpose : The OpenDesktop function returns a handle to an existing desktop.
4898 * A desktop is a secure object contained within a window station
4899 * object. A desktop has a logical display surface and contains
4900 * windows, menus and hooks.
4901 * Parameters: LPCTSTR lpszDesktopName name of the desktop to open
4902 * DWORD dwFlags flags to control interaction with other applications
4903 * BOOL fInherit specifies whether returned handle is inheritable
4904 * DWORD dwDesiredAccess specifies access of returned handle
4905 * Variables :
4906 * Result : If the function succeeds, the return value is the handle to the
4907 * opened desktop.
4908 * If the function fails, the return value is NULL. To get extended
4909 * error information, call GetLastError.
4910 * Remark :
4911 * Status : UNTESTED STUB
4912 *
4913 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4914 *****************************************************************************/
4915
4916HDESK WIN32API OpenDesktopA(LPCTSTR lpszDesktopName,
4917 DWORD dwFlags,
4918 BOOL fInherit,
4919 DWORD dwDesiredAccess)
4920{
4921 dprintf(("USER32:OpenDesktopA (%s,%08xh,%08xh,%08x) not implemented.\n",
4922 lpszDesktopName,
4923 dwFlags,
4924 fInherit,
4925 dwDesiredAccess));
4926
4927 return (NULL);
4928}
4929
4930
4931/*****************************************************************************
4932 * Name : HDESK WIN32API OpenDesktopW
4933 * Purpose : The OpenDesktop function returns a handle to an existing desktop.
4934 * A desktop is a secure object contained within a window station
4935 * object. A desktop has a logical display surface and contains
4936 * windows, menus and hooks.
4937 * Parameters: LPCTSTR lpszDesktopName name of the desktop to open
4938 * DWORD dwFlags flags to control interaction with other applications
4939 * BOOL fInherit specifies whether returned handle is inheritable
4940 * DWORD dwDesiredAccess specifies access of returned handle
4941 * Variables :
4942 * Result : If the function succeeds, the return value is the handle to the
4943 * opened desktop.
4944 * If the function fails, the return value is NULL. To get extended
4945 * error information, call GetLastError.
4946 * Remark :
4947 * Status : UNTESTED STUB
4948 *
4949 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4950 *****************************************************************************/
4951
4952HDESK WIN32API OpenDesktopW(LPCTSTR lpszDesktopName,
4953 DWORD dwFlags,
4954 BOOL fInherit,
4955 DWORD dwDesiredAccess)
4956{
4957 dprintf(("USER32:OpenDesktopW (%s,%08xh,%08xh,%08x) not implemented.\n",
4958 lpszDesktopName,
4959 dwFlags,
4960 fInherit,
4961 dwDesiredAccess));
4962
4963 return (NULL);
4964}
4965
4966
4967/*****************************************************************************
4968 * Name : HDESK WIN32API OpenInputDesktop
4969 * Purpose : The OpenInputDesktop function returns a handle to the desktop
4970 * that receives user input. The input desktop is a desktop on the
4971 * window station associated with the logged-on user.
4972 * Parameters: DWORD dwFlags flags to control interaction with other applications
4973 * BOOL fInherit specifies whether returned handle is inheritable
4974 * DWORD dwDesiredAccess specifies access of returned handle
4975 * Variables :
4976 * Result : If the function succeeds, the return value is a handle of the
4977 * desktop that receives user input.
4978 * If the function fails, the return value is NULL. To get extended
4979 * error information, call GetLastError.
4980 * Remark :
4981 * Status : UNTESTED STUB
4982 *
4983 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
4984 *****************************************************************************/
4985
4986HDESK WIN32API OpenInputDesktop(DWORD dwFlags,
4987 BOOL fInherit,
4988 DWORD dwDesiredAccess)
4989{
4990 dprintf(("USER32:OpenInputDesktop (%08xh,%08xh,%08x) not implemented.\n",
4991 dwFlags,
4992 fInherit,
4993 dwDesiredAccess));
4994
4995 return (NULL);
4996}
4997
4998
4999/*****************************************************************************
5000 * Name : HWINSTA WIN32API OpenWindowStationA
5001 * Purpose : The OpenWindowStation function returns a handle to an existing
5002 * window station.
5003 * Parameters: LPCTSTR lpszWinStaName name of the window station to open
5004 * BOOL fInherit specifies whether returned handle is inheritable
5005 * DWORD dwDesiredAccess specifies access of returned handle
5006 * Variables :
5007 * Result : If the function succeeds, the return value is the handle to the
5008 * specified window station.
5009 * If the function fails, the return value is NULL. To get extended
5010 * error information, call GetLastError.
5011 * Remark :
5012 * Status : UNTESTED STUB
5013 *
5014 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5015 *****************************************************************************/
5016
5017HWINSTA WIN32API OpenWindowStationA(LPCTSTR lpszWinStaName,
5018 BOOL fInherit,
5019 DWORD dwDesiredAccess)
5020{
5021 dprintf(("USER32:OpenWindowStatieonA (%s,%08xh,%08x) not implemented.\n",
5022 lpszWinStaName,
5023 fInherit,
5024 dwDesiredAccess));
5025
5026 return (NULL);
5027}
5028
5029
5030/*****************************************************************************
5031 * Name : HWINSTA WIN32API OpenWindowStationW
5032 * Purpose : The OpenWindowStation function returns a handle to an existing
5033 * window station.
5034 * Parameters: LPCTSTR lpszWinStaName name of the window station to open
5035 * BOOL fInherit specifies whether returned handle is inheritable
5036 * DWORD dwDesiredAccess specifies access of returned handle
5037 * Variables :
5038 * Result : If the function succeeds, the return value is the handle to the
5039 * specified window station.
5040 * If the function fails, the return value is NULL. To get extended
5041 * error information, call GetLastError.
5042
5043
5044 * Remark :
5045 * Status : UNTESTED STUB
5046 *
5047 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5048 *****************************************************************************/
5049
5050HWINSTA WIN32API OpenWindowStationW(LPCTSTR lpszWinStaName,
5051 BOOL fInherit,
5052 DWORD dwDesiredAccess)
5053{
5054 dprintf(("USER32:OpenWindowStatieonW (%s,%08xh,%08x) not implemented.\n",
5055 lpszWinStaName,
5056 fInherit,
5057 dwDesiredAccess));
5058
5059 return (NULL);
5060}
5061
5062
5063/*****************************************************************************
5064 * Name : BOOL WIN32API PaintDesktop
5065 * Purpose : The PaintDesktop function fills the clipping region in the
5066 * specified device context with the desktop pattern or wallpaper.
5067 * The function is provided primarily for shell desktops.
5068 * Parameters:
5069 * Variables :
5070 * Result : If the function succeeds, the return value is TRUE.
5071 * If the function fails, the return value is FALSE.
5072 * Remark :
5073 * Status : UNTESTED STUB
5074 *
5075 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5076 *****************************************************************************/
5077
5078BOOL WIN32API PaintDesktop(HDC hdc)
5079{
5080 dprintf(("USER32:PaintDesktop (%08x) not implemented.\n",
5081 hdc));
5082
5083 return (FALSE);
5084}
5085
5086
5087/*****************************************************************************
5088 * Name : BOOL WIN32API SendMessageCallbackA
5089 * Purpose : The SendMessageCallback function sends the specified message to
5090 * a window or windows. The function calls the window procedure for
5091 * the specified window and returns immediately. After the window
5092 * procedure processes the message, the system calls the specified
5093 * callback function, passing the result of the message processing
5094 * and an application-defined value to the callback function.
5095 * Parameters: HWND hwnd handle of destination window
5096 * UINT uMsg message to send
5097 * WPARAM wParam first message parameter
5098 * LPARAM lParam second message parameter
5099 * SENDASYNCPROC lpResultCallBack function to receive message value
5100 * DWORD dwData value to pass to callback function
5101 * Variables :
5102 * Result : If the function succeeds, the return value is TRUE.
5103 * If the function fails, the return value is FALSE. To get extended
5104 * error information, call GetLastError.
5105 * Remark :
5106 * Status : UNTESTED STUB
5107 *
5108 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5109 *****************************************************************************/
5110
5111BOOL WIN32API SendMessageCallbackA(HWND hWnd,
5112 UINT uMsg,
5113 WPARAM wParam,
5114 LPARAM lParam,
5115 SENDASYNCPROC lpResultCallBack,
5116 DWORD dwData)
5117{
5118 dprintf(("USER32:SendMessageCallBackA (%08xh,%08xh,%08xh,%08xh,%08xh,%08x) not implemented.\n",
5119 hWnd,
5120 uMsg,
5121 wParam,
5122 lParam,
5123 lpResultCallBack,
5124 dwData));
5125
5126 return (FALSE);
5127}
5128
5129
5130/*****************************************************************************
5131 * Name : BOOL WIN32API SendMessageCallbackW
5132 * Purpose : The SendMessageCallback function sends the specified message to
5133 * a window or windows. The function calls the window procedure for
5134 * the specified window and returns immediately. After the window
5135 * procedure processes the message, the system calls the specified
5136 * callback function, passing the result of the message processing
5137 * and an application-defined value to the callback function.
5138 * Parameters: HWND hwnd handle of destination window
5139 * UINT uMsg message to send
5140 * WPARAM wParam first message parameter
5141 * LPARAM lParam second message parameter
5142 * SENDASYNCPROC lpResultCallBack function to receive message value
5143 * DWORD dwData value to pass to callback function
5144 * Variables :
5145 * Result : If the function succeeds, the return value is TRUE.
5146 * If the function fails, the return value is FALSE. To get extended
5147 * error information, call GetLastError.
5148 * Remark :
5149 * Status : UNTESTED STUB
5150 *
5151 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5152 *****************************************************************************/
5153
5154BOOL WIN32API SendMessageCallbackW(HWND hWnd,
5155 UINT uMsg,
5156 WPARAM wParam,
5157 LPARAM lParam,
5158 SENDASYNCPROC lpResultCallBack,
5159 DWORD dwData)
5160{
5161 dprintf(("USER32:SendMessageCallBackW (%08xh,%08xh,%08xh,%08xh,%08xh,%08x) not implemented.\n",
5162 hWnd,
5163 uMsg,
5164 wParam,
5165 lParam,
5166 lpResultCallBack,
5167 dwData));
5168
5169 return (FALSE);
5170}
5171
5172
5173/*****************************************************************************
5174 * Name : VOID WIN32API SetDebugErrorLevel
5175 * Purpose : The SetDebugErrorLevel function sets the minimum error level at
5176 * which Windows will generate debugging events and pass them to a debugger.
5177 * Parameters: DWORD dwLevel debugging error level
5178 * Variables :
5179 * Result :
5180 * Remark :
5181 * Status : UNTESTED STUB
5182 *
5183 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5184 *****************************************************************************/
5185
5186VOID WIN32API SetDebugErrorLevel(DWORD dwLevel)
5187{
5188 dprintf(("USER32:SetDebugErrorLevel (%08x) not implemented.\n",
5189 dwLevel));
5190}
5191
5192
5193/*****************************************************************************
5194 * Name : BOOL WIN32API SetProcessWindowStation
5195 * Purpose : The SetProcessWindowStation function assigns a window station
5196 * to the calling process. This enables the process to access
5197 * objects in the window station such as desktops, the clipboard,
5198 * and global atoms. All subsequent operations on the window station
5199 * use the access rights granted to hWinSta.
5200 * Parameters:
5201 * Variables :
5202 * Result : If the function succeeds, the return value is TRUE.
5203 * If the function fails, the return value is FALSE. To get extended
5204 * error information, call GetLastError.
5205 * Remark :
5206 * Status : UNTESTED STUB
5207 *
5208 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5209 *****************************************************************************/
5210
5211BOOL WIN32API SetProcessWindowStation(HWINSTA hWinSta)
5212{
5213 dprintf(("USER32:SetProcessWindowStation (%08x) not implemented.\n",
5214 hWinSta));
5215
5216 return (FALSE);
5217}
5218
5219
5220/*****************************************************************************
5221 * Name : BOOL WIN32API SetSystemCursor
5222 * Purpose : The SetSystemCursor function replaces the contents of the system
5223 * cursor specified by dwCursorId with the contents of the cursor
5224 * specified by hCursor, and then destroys hCursor. This function
5225 * lets an application customize the system cursors.
5226 * Parameters: HCURSOR hCursor set specified system cursor to this cursor's
5227 * contents, then destroy this
5228 * DWORD dwCursorID system cursor specified by its identifier
5229 * Variables :
5230 * Result : If the function succeeds, the return value is TRUE.
5231 * If the function fails, the return value is FALSE. To get extended
5232 * error information, call GetLastError.
5233 * Remark :
5234 * Status : UNTESTED STUB
5235 *
5236 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5237 *****************************************************************************/
5238
5239BOOL WIN32API SetSystemCursor(HCURSOR hCursor,
5240 DWORD dwCursorId)
5241{
5242 dprintf(("USER32:SetSystemCursor (%08xh,%08x) not implemented.\n",
5243 hCursor,
5244 dwCursorId));
5245
5246 return (FALSE);
5247}
5248
5249
5250/*****************************************************************************
5251 * Name : BOOL WIN32API SetThreadDesktop
5252 * Purpose : The SetThreadDesktop function assigns a desktop to the calling
5253 * thread. All subsequent operations on the desktop use the access
5254 * rights granted to hDesk.
5255 * Parameters: HDESK hDesk handle of the desktop to assign to this thread
5256 * Variables :
5257 * Result : If the function succeeds, the return value is TRUE.
5258 * If the function fails, the return value is FALSE. To get extended
5259 * error information, call GetLastError.
5260 * Remark :
5261 * Status : UNTESTED STUB
5262 *
5263 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5264 *****************************************************************************/
5265
5266BOOL WIN32API SetThreadDesktop(HDESK hDesktop)
5267{
5268 dprintf(("USER32:SetThreadDesktop (%08x) not implemented.\n",
5269 hDesktop));
5270
5271 return (FALSE);
5272}
5273
5274
5275/*****************************************************************************
5276 * Name : BOOL WIN32API SetUserObjectInformationA
5277 * Purpose : The SetUserObjectInformation function sets information about a
5278 * window station or desktop object.
5279 * Parameters: HANDLE hObject handle of the object for which to set information
5280 * int nIndex type of information to set
5281 * PVOID lpvInfo points to a buffer that contains the information
5282 * DWORD cbInfo size, in bytes, of lpvInfo buffer
5283 * Variables :
5284 * Result : If the function succeeds, the return value is TRUE.
5285 * If the function fails the return value is FALSE. To get extended
5286 * error information, call GetLastError.
5287 * Remark :
5288 * Status : UNTESTED STUB
5289 *
5290 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5291 *****************************************************************************/
5292
5293BOOL WIN32API SetUserObjectInformationA(HANDLE hObject,
5294 int nIndex,
5295 PVOID lpvInfo,
5296 DWORD cbInfo)
5297{
5298 dprintf(("USER32:SetUserObjectInformationA (%08xh,%u,%08xh,%08x) not implemented.\n",
5299 hObject,
5300 nIndex,
5301 lpvInfo,
5302 cbInfo));
5303
5304 return (FALSE);
5305}
5306
5307
5308/*****************************************************************************
5309 * Name : BOOL WIN32API SetUserObjectInformationW
5310 * Purpose : The SetUserObjectInformation function sets information about a
5311 * window station or desktop object.
5312 * Parameters: HANDLE hObject handle of the object for which to set information
5313 * int nIndex type of information to set
5314 * PVOID lpvInfo points to a buffer that contains the information
5315 * DWORD cbInfo size, in bytes, of lpvInfo buffer
5316 * Variables :
5317 * Result : If the function succeeds, the return value is TRUE.
5318 * If the function fails the return value is FALSE. To get extended
5319 * error information, call GetLastError.
5320 * Remark :
5321 * Status : UNTESTED STUB
5322 *
5323 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5324 *****************************************************************************/
5325
5326BOOL WIN32API SetUserObjectInformationW(HANDLE hObject,
5327 int nIndex,
5328 PVOID lpvInfo,
5329 DWORD cbInfo)
5330{
5331 dprintf(("USER32:SetUserObjectInformationW (%08xh,%u,%08xh,%08x) not implemented.\n",
5332 hObject,
5333 nIndex,
5334 lpvInfo,
5335 cbInfo));
5336
5337 return (FALSE);
5338}
5339
5340
5341/*****************************************************************************
5342 * Name : BOOL WIN32API SetUserObjectSecurity
5343 * Purpose : The SetUserObjectSecurity function sets the security of a user
5344 * object. This can be, for example, a window or a DDE conversation
5345 * Parameters: HANDLE hObject handle of user object
5346 * SECURITY_INFORMATION * psi address of security information
5347 * LPSECURITY_DESCRIPTOR psd address of security descriptor
5348 * Variables :
5349 * Result : If the function succeeds, the return value is TRUE.
5350 * If the function fails, the return value is FALSE. To get extended
5351 * error information, call GetLastError.
5352 * Remark :
5353 * Status : UNTESTED STUB
5354 *
5355 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5356 *****************************************************************************/
5357
5358BOOL WIN32API SetUserObjectSecurity(HANDLE hObject,
5359 SECURITY_INFORMATION * psi,
5360 LPSECURITY_DESCRIPTOR psd)
5361{
5362 dprintf(("USER32:SetUserObjectSecuroty (%08xh,%08xh,%08x) not implemented.\n",
5363 hObject,
5364 psi,
5365 psd));
5366
5367 return (FALSE);
5368}
5369
5370
5371/*****************************************************************************
5372 * Name : int WIN32API SetWindowRgn
5373 * Purpose : The SetWindowRgn function sets the window region of a window. The
5374 * window region determines the area within the window where the
5375 * operating system permits drawing. The operating system does not
5376 * display any portion of a window that lies outside of the window region
5377 * Parameters: HWND hWnd handle to window whose window region is to be set
5378 * HRGN hRgn handle to region
5379 * BOOL bRedraw window redraw flag
5380 * Variables :
5381 * Result : If the function succeeds, the return value is non-zero.
5382 * If the function fails, the return value is zero.
5383 * Remark :
5384 * Status : UNTESTED STUB
5385 *
5386 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5387 *****************************************************************************/
5388
5389int WIN32API SetWindowRgn(HWND hWnd,
5390 HRGN hRgn,
5391 BOOL bRedraw)
5392{
5393 dprintf(("USER32:SetWindowRgn (%08xh,%08xh,%u) not implemented.\n",
5394 hWnd,
5395 hRgn,
5396 bRedraw));
5397
5398 return (0);
5399}
5400
5401
5402/*****************************************************************************
5403 * Name : BOOL WIN32API SetWindowsHookW
5404 * Purpose : The SetWindowsHook function is not implemented in the Win32 API.
5405 * Win32-based applications should use the SetWindowsHookEx function.
5406 * Parameters:
5407 * Variables :
5408 * Result :
5409 * Remark : ARGH ! MICROSOFT !
5410 * Status : UNTESTED STUB
5411 *
5412 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5413 *****************************************************************************/
5414
5415HHOOK WIN32API SetWindowsHookW(int nFilterType, HOOKPROC pfnFilterProc)
5416
5417{
5418 return (FALSE);
5419}
5420
5421
5422/*****************************************************************************
5423 * Name : BOOL WIN32API ShowWindowAsync
5424 * Purpose : The ShowWindowAsync function sets the show state of a window
5425 * created by a different thread.
5426 * Parameters: HWND hwnd handle of window
5427 * int nCmdShow show state of window
5428 * Variables :
5429 * Result : If the window was previously visible, the return value is TRUE.
5430 * If the window was previously hidden, the return value is FALSE.
5431 * Remark :
5432 * Status : UNTESTED STUB
5433 *
5434 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5435 *****************************************************************************/
5436
5437BOOL WIN32API ShowWindowAsync (HWND hWnd,
5438 int nCmdShow)
5439{
5440 dprintf(("USER32:ShowWindowAsync (%08xh,%08x) not implemented.\n",
5441 hWnd,
5442 nCmdShow));
5443
5444 return (FALSE);
5445}
5446
5447
5448/*****************************************************************************
5449 * Name : BOOL WIN32API SwitchDesktop
5450 * Purpose : The SwitchDesktop function makes a desktop visible and activates
5451 * it. This enables the desktop to receive input from the user. The
5452 * calling process must have DESKTOP_SWITCHDESKTOP access to the
5453 * desktop for the SwitchDesktop function to succeed.
5454 * Parameters:
5455 * Variables :
5456 * Result : If the function succeeds, the return value is TRUE.
5457 * If the function fails, the return value is FALSE. To get extended
5458 * error information, call GetLastError.
5459 * Remark :
5460 * Status : UNTESTED STUB
5461 *
5462 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5463 *****************************************************************************/
5464
5465BOOL WIN32API SwitchDesktop(HDESK hDesktop)
5466{
5467 dprintf(("USER32:SwitchDesktop (%08x) not implemented.\n",
5468 hDesktop));
5469
5470 return (FALSE);
5471}
5472
5473
5474/*****************************************************************************
5475 * Name : WORD WIN32API TileWindows
5476 * Purpose : The TileWindows function tiles the specified windows, or the child
5477 * windows of the specified parent window.
5478 * Parameters: HWND hwndParent handle of parent window
5479 * WORD wFlags types of windows not to arrange
5480 * LPCRECT lpRect rectangle to arrange windows in
5481 * WORD cChildrenb number of windows to arrange
5482 * const HWND *ahwndChildren array of window handles
5483 * Variables :
5484 * Result : If the function succeeds, the return value is the number of
5485 * windows arranged.
5486 * If the function fails, the return value is zero.
5487 * Remark :
5488 * Status : UNTESTED STUB
5489 *
5490 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5491 *****************************************************************************/
5492
5493WORD WIN32API TileWindows(HWND hwndParent,
5494 UINT wFlags,
5495 const LPRECT lpRect,
5496 UINT cChildrenb,
5497 const HWND *ahwndChildren)
5498{
5499 dprintf(("USER32:TileWindows (%08xh,%08xh,%08xh,%08xh,%08x) not implemented.\n",
5500 hwndParent,
5501 wFlags,
5502 lpRect,
5503 cChildrenb,
5504 ahwndChildren));
5505
5506 return (0);
5507}
5508
5509
5510/*****************************************************************************
5511 * Name : int WIN32API ToAscii
5512 * Purpose : The ToAscii function translates the specified virtual-key code
5513 * and keyboard state to the corresponding Windows character or characters.
5514 * Parameters: UINT uVirtKey virtual-key code
5515 * UINT uScanCode scan code
5516 * PBYTE lpbKeyState address of key-state array
5517 * LPWORD lpwTransKey buffer for translated key
5518 * UINT fuState active-menu flag
5519 * Variables :
5520 * Result : 0 The specified virtual key has no translation for the current
5521 * state of the keyboard.
5522 * 1 One Windows character was copied to the buffer.
5523 * 2 Two characters were copied to the buffer. This usually happens
5524 * when a dead-key character (accent or diacritic) stored in the
5525 * keyboard layout cannot be composed with the specified virtual
5526 * key to form a single character.
5527 * Remark :
5528 * Status : UNTESTED STUB
5529 *
5530 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5531 *****************************************************************************/
5532
5533int WIN32API ToAscii(UINT uVirtKey,
5534 UINT uScanCode,
5535 PBYTE lpbKeyState,
5536 LPWORD lpwTransKey,
5537 UINT fuState)
5538{
5539 dprintf(("USER32:ToAscii (%u,%u,%08xh,%08xh,%u) not implemented.\n",
5540 uVirtKey,
5541 uScanCode,
5542 lpbKeyState,
5543 lpwTransKey,
5544 fuState));
5545
5546 return (0);
5547}
5548
5549
5550/*****************************************************************************
5551 * Name : int WIN32API ToAsciiEx
5552 * Purpose : The ToAscii function translates the specified virtual-key code
5553 * and keyboard state to the corresponding Windows character or characters.
5554 * Parameters: UINT uVirtKey virtual-key code
5555 * UINT uScanCode scan code
5556 * PBYTE lpbKeyState address of key-state array
5557 * LPWORD lpwTransKey buffer for translated key
5558 * UINT fuState active-menu flag
5559 * HLK hlk keyboard layout handle
5560 * Variables :
5561 * Result : 0 The specified virtual key has no translation for the current
5562 * state of the keyboard.
5563 * 1 One Windows character was copied to the buffer.
5564 * 2 Two characters were copied to the buffer. This usually happens
5565 * when a dead-key character (accent or diacritic) stored in the
5566 * keyboard layout cannot be composed with the specified virtual
5567 * key to form a single character.
5568 * Remark :
5569 * Status : UNTESTED STUB
5570 *
5571 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5572 *****************************************************************************/
5573
5574int WIN32API ToAsciiEx(UINT uVirtKey,
5575 UINT uScanCode,
5576 PBYTE lpbKeyState,
5577 LPWORD lpwTransKey,
5578 UINT fuState,
5579 HKL hkl)
5580{
5581 dprintf(("USER32:ToAsciiEx (%u,%u,%08xh,%08xh,%u,%08x) not implemented.\n",
5582 uVirtKey,
5583 uScanCode,
5584 lpbKeyState,
5585 lpwTransKey,
5586 fuState,
5587 hkl));
5588
5589 return (0);
5590}
5591
5592
5593/*****************************************************************************
5594 * Name : int WIN32API ToUnicode
5595 * Purpose : The ToUnicode function translates the specified virtual-key code
5596 * and keyboard state to the corresponding Unicode character or characters.
5597 * Parameters: UINT wVirtKey virtual-key code
5598 * UINT wScanCode scan code
5599 * PBYTE lpKeyState address of key-state array
5600 * LPWSTR pwszBuff buffer for translated key
5601 * int cchBuff size of translated key buffer
5602 * UINT wFlags set of function-conditioning flags
5603 * Variables :
5604 * Result : - 1 The specified virtual key is a dead-key character (accent or
5605 * diacritic). This value is returned regardless of the keyboard
5606 * layout, even if several characters have been typed and are
5607 * stored in the keyboard state. If possible, even with Unicode
5608 * keyboard layouts, the function has written a spacing version of
5609 * the dead-key character to the buffer specified by pwszBuffer.
5610 * For example, the function writes the character SPACING ACUTE
5611 * (0x00B4), rather than the character NON_SPACING ACUTE (0x0301).
5612 * 0 The specified virtual key has no translation for the current
5613 * state of the keyboard. Nothing was written to the buffer
5614 * specified by pwszBuffer.
5615 * 1 One character was written to the buffer specified by pwszBuffer.
5616 * 2 or more Two or more characters were written to the buffer specified by
5617 * pwszBuff. The most common cause for this is that a dead-key
5618 * character (accent or diacritic) stored in the keyboard layout
5619 * could not be combined with the specified virtual key to form a
5620 * single character.
5621 * Remark :
5622 * Status : UNTESTED STUB
5623 *
5624 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5625 *****************************************************************************/
5626
5627int WIN32API ToUnicode(UINT uVirtKey,
5628 UINT uScanCode,
5629 PBYTE lpKeyState,
5630 LPWSTR pwszBuff,
5631 int cchBuff,
5632 UINT wFlags)
5633{
5634 dprintf(("USER32:ToUnicode (%u,%u,%08xh,%08xh,%u,%08x) not implemented.\n",
5635 uVirtKey,
5636 uScanCode,
5637 lpKeyState,
5638 pwszBuff,
5639 cchBuff,
5640 wFlags));
5641
5642 return (0);
5643}
5644
5645
5646/*****************************************************************************
5647 * Name : BOOL WIN32API UnloadKeyboardLayout
5648 * Purpose : The UnloadKeyboardLayout function removes a keyboard layout.
5649 * Parameters: HKL hkl handle of keyboard layout
5650 * Variables :
5651 * Result : If the function succeeds, the return value is the handle of the
5652 * keyboard layout; otherwise, it is NULL. To get extended error
5653 * information, use the GetLastError function.
5654 * Remark :
5655 * Status : UNTESTED STUB
5656 *
5657 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5658 *****************************************************************************/
5659
5660BOOL WIN32API UnloadKeyboardLayout (HKL hkl)
5661{
5662 dprintf(("USER32:UnloadKeyboardLayout (%08x) not implemented.\n",
5663 hkl));
5664
5665 return (0);
5666}
5667
5668
5669/*****************************************************************************
5670 * Name : SHORT WIN32API VkKeyScanExW
5671 * Purpose : The VkKeyScanEx function translates a character to the
5672 * corresponding virtual-key code and shift state. The function
5673 * translates the character using the input language and physical
5674 * keyboard layout identified by the given keyboard layout handle.
5675 * Parameters: UINT uChar character to translate
5676 * HKL hkl keyboard layout handle
5677 * Variables :
5678 * Result : see docs
5679 * Remark :
5680 * Status : UNTESTED STUB
5681 *
5682 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5683 *****************************************************************************/
5684
5685WORD WIN32API VkKeyScanExW(WCHAR uChar,
5686 HKL hkl)
5687{
5688 dprintf(("USER32:VkKeyScanExW (%u,%08x) not implemented.\n",
5689 uChar,
5690 hkl));
5691
5692 return (uChar);
5693}
5694
5695
5696/*****************************************************************************
5697 * Name : SHORT WIN32API VkKeyScanExA
5698 * Purpose : The VkKeyScanEx function translates a character to the
5699 * corresponding virtual-key code and shift state. The function
5700 * translates the character using the input language and physical
5701 * keyboard layout identified by the given keyboard layout handle.
5702 * Parameters: UINT uChar character to translate
5703 * HKL hkl keyboard layout handle
5704 * Variables :
5705 * Result : see docs
5706 * Remark :
5707 * Status : UNTESTED STUB
5708 *
5709 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5710 *****************************************************************************/
5711
5712WORD WIN32API VkKeyScanExA(CHAR uChar,
5713 HKL hkl)
5714{
5715 dprintf(("USER32:VkKeyScanExA (%u,%08x) not implemented.\n",
5716 uChar,
5717 hkl));
5718
5719 return (uChar);
5720}
5721
5722
5723/*****************************************************************************
5724 * Name : VOID WIN32API keybd_event
5725 * Purpose : The keybd_event function synthesizes a keystroke. The system
5726 * can use such a synthesized keystroke to generate a WM_KEYUP or
5727 * WM_KEYDOWN message. The keyboard driver's interrupt handler calls
5728 * the keybd_event function.
5729 * Parameters: BYTE bVk virtual-key code
5730
5731 * BYTE bScan hardware scan code
5732 * DWORD dwFlags flags specifying various function options
5733 * DWORD dwExtraInfo additional data associated with keystroke
5734 * Variables :
5735 * Result :
5736 * Remark :
5737 * Status : UNTESTED STUB
5738 *
5739 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5740 *****************************************************************************/
5741
5742VOID WIN32API keybd_event (BYTE bVk,
5743 BYTE bScan,
5744 DWORD dwFlags,
5745 DWORD dwExtraInfo)
5746{
5747 dprintf(("USER32:keybd_event (%u,%u,%08xh,%08x) not implemented.\n",
5748 bVk,
5749 bScan,
5750 dwFlags,
5751 dwExtraInfo));
5752}
5753
5754
5755/*****************************************************************************
5756 * Name : VOID WIN32API mouse_event
5757 * Purpose : The mouse_event function synthesizes mouse motion and button clicks.
5758 * Parameters: DWORD dwFlags flags specifying various motion/click variants
5759 * DWORD dx horizontal mouse position or position change
5760 * DWORD dy vertical mouse position or position change
5761 * DWORD cButtons unused, reserved for future use, set to zero
5762 * DWORD dwExtraInfo 32 bits of application-defined information
5763 * Variables :
5764 * Result :
5765 * Remark :
5766 * Status : UNTESTED STUB
5767 *
5768 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
5769 *****************************************************************************/
5770
5771VOID WIN32API mouse_event(DWORD dwFlags,
5772 DWORD dx,
5773 DWORD dy,
5774 DWORD cButtons,
5775 DWORD dwExtraInfo)
5776{
5777 dprintf(("USER32:mouse_event (%08xh,%u,%u,%u,%08x) not implemented.\n",
5778 dwFlags,
5779 dx,
5780 dy,
5781 cButtons,
5782 dwExtraInfo));
5783}
5784
5785
5786/*****************************************************************************
5787 * Name : BOOL WIN32API SetShellWindow
5788 * Purpose : Unknown
5789 * Parameters: Unknown
5790 * Variables :
5791 * Result :
5792 * Remark :
5793 * Status : UNTESTED UNKNOWN STUB
5794 *
5795 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
5796 *****************************************************************************/
5797
5798BOOL WIN32API SetShellWindow(DWORD x1)
5799{
5800 dprintf(("USER32: SetShellWindow(%08x) not implemented.\n",
5801 x1));
5802
5803 return (FALSE); /* default */
5804}
5805
5806
5807/*****************************************************************************
5808 * Name : BOOL WIN32API PlaySoundEvent
5809 * Purpose : Unknown
5810 * Parameters: Unknown
5811 * Variables :
5812 * Result :
5813 * Remark :
5814 * Status : UNTESTED UNKNOWN STUB
5815 *
5816 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
5817 *****************************************************************************/
5818
5819BOOL WIN32API PlaySoundEvent(DWORD x1)
5820{
5821 dprintf(("USER32: PlaySoundEvent(%08x) not implemented.\n",
5822 x1));
5823
5824 return (FALSE); /* default */
5825}
5826
5827
5828/*****************************************************************************
5829 * Name : BOOL WIN32API TileChildWindows
5830 * Purpose : Unknown
5831 * Parameters: Unknown
5832 * Variables :
5833 * Result :
5834 * Remark :
5835 * Status : UNTESTED UNKNOWN STUB
5836 *
5837 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
5838 *****************************************************************************/
5839
5840BOOL WIN32API TileChildWindows(DWORD x1,
5841 DWORD x2)
5842{
5843 dprintf(("USER32: TileChildWindows(%08xh,%08xh) not implemented.\n",
5844 x1,
5845 x2));
5846
5847 return (FALSE); /* default */
5848}
5849
5850
5851/*****************************************************************************
5852 * Name : BOOL WIN32API SetSysColorsTemp
5853 * Purpose : Unknown
5854 * Parameters: Unknown
5855 * Variables :
5856 * Result :
5857 * Remark :
5858 * Status : UNTESTED UNKNOWN STUB
5859 *
5860 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
5861 *****************************************************************************/
5862
5863BOOL WIN32API SetSysColorsTemp(void)
5864{
5865 dprintf(("USER32: SetSysColorsTemp() not implemented.\n"));
5866
5867 return (FALSE); /* default */
5868}
5869
5870
5871/*****************************************************************************
5872 * Name : BOOL WIN32API RegisterNetworkCapabilities
5873 * Purpose : Unknown
5874 * Parameters: Unknown
5875 * Variables :
5876 * Result :
5877 * Remark :
5878 * Status : UNTESTED UNKNOWN STUB
5879 *
5880 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
5881 *****************************************************************************/
5882
5883BOOL WIN32API RegisterNetworkCapabilities(DWORD x1,
5884 DWORD x2)
5885{
5886 dprintf(("USER32: RegisterNetworkCapabilities(%08xh,%08xh) not implemented.\n",
5887 x1,
5888 x2));
5889
5890 return (FALSE); /* default */
5891}
5892
5893
5894/*****************************************************************************
5895 * Name : BOOL WIN32API EndTask
5896 * Purpose : Unknown
5897 * Parameters: Unknown
5898 * Variables :
5899 * Result :
5900 * Remark :
5901 * Status : UNTESTED UNKNOWN STUB
5902 *
5903 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
5904 *****************************************************************************/
5905
5906BOOL WIN32API EndTask(DWORD x1,
5907 DWORD x2,
5908 DWORD x3)
5909{
5910 dprintf(("USER32: EndTask(%08xh,%08xh,%08xh) not implemented.\n",
5911 x1,
5912 x2,
5913 x3));
5914
5915 return (FALSE); /* default */
5916}
5917
5918
5919/*****************************************************************************
5920 * Name : BOOL WIN32API SwitchToThisWindow
5921 * Purpose : Unknown
5922 * Parameters: Unknown
5923 * Variables :
5924 * Result :
5925 * Remark :
5926 * Status : UNTESTED UNKNOWN STUB
5927 *
5928 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
5929 *****************************************************************************/
5930
5931BOOL WIN32API SwitchToThisWindow(HWND hwnd,
5932 BOOL x2)
5933{
5934 dprintf(("USER32: SwitchToThisWindow(%08xh,%08xh) not implemented.\n",
5935 hwnd,
5936 x2));
5937
5938 return (FALSE); /* default */
5939}
5940
5941
5942/*****************************************************************************
5943 * Name : BOOL WIN32API GetNextQueueWindow
5944 * Purpose : Unknown
5945 * Parameters: Unknown
5946 * Variables :
5947 * Result :
5948 * Remark :
5949 * Status : UNTESTED UNKNOWN STUB
5950 *
5951 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
5952 *****************************************************************************/
5953
5954BOOL WIN32API GetNextQueueWindow(DWORD x1,
5955 DWORD x2)
5956{
5957 dprintf(("USER32: GetNextQueueWindow(%08xh,%08xh) not implemented.\n",
5958 x1,
5959 x2));
5960
5961 return (FALSE); /* default */
5962}
5963
5964
5965/*****************************************************************************
5966 * Name : BOOL WIN32API YieldTask
5967 * Purpose : Unknown
5968 * Parameters: Unknown
5969 * Variables :
5970 * Result :
5971 * Remark :
5972 * Status : UNTESTED UNKNOWN STUB
5973 *
5974 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
5975 *****************************************************************************/
5976
5977BOOL WIN32API YieldTask(void)
5978{
5979 dprintf(("USER32: YieldTask() not implemented.\n"));
5980
5981 return (FALSE); /* default */
5982}
5983
5984
5985/*****************************************************************************
5986 * Name : BOOL WIN32API WinOldAppHackoMatic
5987 * Purpose : Unknown
5988 * Parameters: Unknown
5989 * Variables :
5990 * Result :
5991 * Remark :
5992 * Status : UNTESTED UNKNOWN STUB
5993 *
5994 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
5995 *****************************************************************************/
5996
5997BOOL WIN32API WinOldAppHackoMatic(DWORD x1)
5998{
5999 dprintf(("USER32: WinOldAppHackoMatic(%08x) not implemented.\n",
6000 x1));
6001
6002 return (FALSE); /* default */
6003}
6004
6005
6006/*****************************************************************************
6007 * Name : BOOL WIN32API DragObject
6008 * Purpose : Unknown
6009 * Parameters: Unknown
6010 * Variables :
6011 * Result :
6012 * Remark :
6013 * Status : UNTESTED UNKNOWN STUB
6014 *
6015 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6016 *****************************************************************************/
6017
6018DWORD WIN32API DragObject(HWND x1,HWND x2,UINT x3,DWORD x4,HCURSOR x5)
6019{
6020 dprintf(("USER32: DragObject(%08x,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
6021 x1,
6022 x2,
6023 x3,
6024 x4,
6025 x5));
6026
6027 return (FALSE); /* default */
6028}
6029
6030
6031/*****************************************************************************
6032 * Name : BOOL WIN32API CascadeChildWindows
6033 * Purpose : Unknown
6034 * Parameters: Unknown
6035 * Variables :
6036 * Result :
6037 * Remark :
6038 * Status : UNTESTED UNKNOWN STUB
6039 *
6040 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6041 *****************************************************************************/
6042
6043BOOL WIN32API CascadeChildWindows(DWORD x1,
6044 DWORD x2)
6045{
6046 dprintf(("USER32: CascadeChildWindows(%08xh,%08xh) not implemented.\n",
6047 x1,
6048 x2));
6049
6050 return (FALSE); /* default */
6051}
6052
6053
6054/*****************************************************************************
6055 * Name : BOOL WIN32API RegisterSystemThread
6056 * Purpose : Unknown
6057 * Parameters: Unknown
6058 * Variables :
6059 * Result :
6060 * Remark :
6061 * Status : UNTESTED UNKNOWN STUB
6062 *
6063 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6064 *****************************************************************************/
6065
6066BOOL WIN32API RegisterSystemThread(DWORD x1,
6067 DWORD x2)
6068{
6069 dprintf(("USER32: RegisterSystemThread(%08xh,%08xh) not implemented.\n",
6070 x1,
6071 x2));
6072
6073 return (FALSE); /* default */
6074}
6075
6076
6077/*****************************************************************************
6078 * Name : BOOL WIN32API IsHungThread
6079 * Purpose : Unknown
6080 * Parameters: Unknown
6081 * Variables :
6082 * Result :
6083 * Remark :
6084 * Status : UNTESTED UNKNOWN STUB
6085 *
6086 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6087 *****************************************************************************/
6088
6089BOOL WIN32API IsHungThread(DWORD x1)
6090{
6091 dprintf(("USER32: IsHungThread(%08xh) not implemented.\n",
6092 x1));
6093
6094 return (FALSE); /* default */
6095}
6096
6097
6098/*****************************************************************************
6099 * Name : BOOL WIN32API SysErrorBox
6100 * Purpose : Unknown
6101 * Parameters: Unknown
6102 * Variables :
6103 * Result :
6104 * Remark : HARDERR like ?
6105 * Status : UNTESTED UNKNOWN STUB
6106 *
6107 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6108 *****************************************************************************/
6109
6110BOOL WIN32API SysErrorBox(DWORD x1,
6111 DWORD x2,
6112 DWORD x3)
6113{
6114 dprintf(("USER32: SysErrorBox(%08xh,%08xh,%08xh) not implemented.\n",
6115 x1,
6116 x2,
6117 x3));
6118
6119 return (FALSE); /* default */
6120}
6121
6122
6123/*****************************************************************************
6124 * Name : BOOL WIN32API UserSignalProc
6125 * Purpose : Unknown
6126 * Parameters: Unknown
6127 * Variables :
6128 * Result :
6129 * Remark :
6130 * Status : UNTESTED UNKNOWN STUB
6131 *
6132 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6133 *****************************************************************************/
6134
6135BOOL WIN32API UserSignalProc(DWORD x1,
6136 DWORD x2,
6137 DWORD x3,
6138 DWORD x4)
6139{
6140 dprintf(("USER32: SysErrorBox(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
6141 x1,
6142 x2,
6143 x3,
6144 x4));
6145
6146 return (FALSE); /* default */
6147}
6148
6149
6150/*****************************************************************************
6151 * Name : BOOL WIN32API GetShellWindow
6152 * Purpose : Unknown
6153 * Parameters: Unknown
6154 * Variables :
6155 * Result :
6156 * Remark :
6157 * Status : UNTESTED UNKNOWN STUB
6158 *
6159 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
6160 *****************************************************************************/
6161
6162HWND WIN32API GetShellWindow(void)
6163{
6164 dprintf(("USER32: GetShellWindow() not implemented.\n"));
6165
6166 return (0); /* default */
6167}
6168
6169
6170
6171/***********************************************************************
6172 * RegisterTasklist32 [USER32.436]
6173 */
6174DWORD WIN32API RegisterTasklist (DWORD x)
6175{
6176 dprintf(("USER32: RegisterTasklist(%08xh) not implemented.\n",
6177 x));
6178
6179 return TRUE;
6180}
6181
6182
6183/***********************************************************************
6184 * DrawCaptionTemp32A [USER32.599]
6185 *
6186 * PARAMS
6187 *
6188 * RETURNS
6189 * Success:
6190 * Failure:
6191 */
6192
6193BOOL WIN32API DrawCaptionTempA(HWND hwnd,
6194 HDC hdc,
6195 const RECT *rect,
6196 HFONT hFont,
6197 HICON hIcon,
6198 LPCSTR str,
6199 UINT uFlags)
6200{
6201 RECT rc = *rect;
6202
6203 dprintf(("USER32: DrawCaptionTempA(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh)\n",
6204 hwnd,
6205 hdc,
6206 rect,
6207 hFont,
6208 hIcon,
6209 str,
6210 uFlags));
6211
6212 /* drawing background */
6213 if (uFlags & DC_INBUTTON)
6214 {
6215 O32_FillRect (hdc,
6216 &rc,
6217 GetSysColorBrush (COLOR_3DFACE));
6218
6219 if (uFlags & DC_ACTIVE)
6220 {
6221 HBRUSH hbr = O32_SelectObject (hdc,
6222 GetSysColorBrush (COLOR_ACTIVECAPTION));
6223 O32_PatBlt (hdc,
6224 rc.left,
6225 rc.top,
6226 rc.right - rc.left,
6227 rc.bottom - rc.top,
6228 0xFA0089);
6229
6230 O32_SelectObject (hdc,
6231 hbr);
6232 }
6233 }
6234 else
6235 {
6236 O32_FillRect (hdc,
6237 &rc,
6238 GetSysColorBrush ((uFlags & DC_ACTIVE) ?
6239 COLOR_ACTIVECAPTION : COLOR_INACTIVECAPTION));
6240 }
6241
6242
6243 /* drawing icon */
6244 if ((uFlags & DC_ICON) && !(uFlags & DC_SMALLCAP))
6245 {
6246 POINT pt;
6247
6248 pt.x = rc.left + 2;
6249 pt.y = (rc.bottom + rc.top - O32_GetSystemMetrics(SM_CYSMICON)) / 2;
6250
6251 if (hIcon)
6252 {
6253 DrawIconEx (hdc,
6254 pt.x,
6255 pt.y,
6256 hIcon,
6257 O32_GetSystemMetrics(SM_CXSMICON),
6258 O32_GetSystemMetrics(SM_CYSMICON),
6259 0,
6260 0,
6261 DI_NORMAL);
6262 }
6263 else
6264 {
6265 /* @@@PH 1999/06/08 not ported yet, just don't draw any icon
6266 WND *wndPtr = WIN_FindWndPtr(hwnd);
6267 HICON hAppIcon = 0;
6268
6269 if (wndPtr->class->hIconSm)
6270 hAppIcon = wndPtr->class->hIconSm;
6271 else
6272 if (wndPtr->class->hIcon)
6273 hAppIcon = wndPtr->class->hIcon;
6274
6275 DrawIconEx (hdc,
6276 pt.x,
6277 pt.y,
6278 hAppIcon,
6279 GetSystemMetrics(SM_CXSMICON),
6280 GetSystemMetrics(SM_CYSMICON),
6281 0,
6282 0,
6283 DI_NORMAL);
6284
6285 WIN_ReleaseWndPtr(wndPtr);
6286 */
6287 }
6288
6289 rc.left += (rc.bottom - rc.top);
6290 }
6291
6292 /* drawing text */
6293 if (uFlags & DC_TEXT)
6294 {
6295 HFONT hOldFont;
6296
6297 if (uFlags & DC_INBUTTON)
6298 O32_SetTextColor (hdc,
6299 O32_GetSysColor (COLOR_BTNTEXT));
6300 else
6301 if (uFlags & DC_ACTIVE)
6302 O32_SetTextColor (hdc,
6303 O32_GetSysColor (COLOR_CAPTIONTEXT));
6304 else
6305 O32_SetTextColor (hdc,
6306 O32_GetSysColor (COLOR_INACTIVECAPTIONTEXT));
6307
6308 O32_SetBkMode (hdc,
6309 TRANSPARENT);
6310
6311 if (hFont)
6312 hOldFont = O32_SelectObject (hdc,
6313 hFont);
6314 else
6315 {
6316 NONCLIENTMETRICSA nclm;
6317 HFONT hNewFont;
6318
6319 nclm.cbSize = sizeof(NONCLIENTMETRICSA);
6320 O32_SystemParametersInfo (SPI_GETNONCLIENTMETRICS,
6321 0,
6322 &nclm,
6323 0);
6324 hNewFont = O32_CreateFontIndirect ((uFlags & DC_SMALLCAP) ?
6325 &nclm.lfSmCaptionFont : &nclm.lfCaptionFont);
6326 hOldFont = O32_SelectObject (hdc,
6327 hNewFont);
6328 }
6329
6330 if (str)
6331 O32_DrawText (hdc,
6332 str,
6333 -1,
6334 &rc,
6335 DT_SINGLELINE | DT_VCENTER | DT_NOPREFIX | DT_LEFT);
6336 else
6337 {
6338 CHAR szText[128];
6339 INT nLen;
6340
6341 nLen = O32_GetWindowText (hwnd,
6342 szText,
6343 128);
6344
6345 O32_DrawText (hdc,
6346 szText,
6347 nLen,
6348 &rc,
6349 DT_SINGLELINE | DT_VCENTER | DT_NOPREFIX | DT_LEFT);
6350 }
6351
6352 if (hFont)
6353 O32_SelectObject (hdc,
6354 hOldFont);
6355 else
6356 O32_DeleteObject (O32_SelectObject (hdc,
6357 hOldFont));
6358 }
6359
6360 /* drawing focus ??? */
6361 if (uFlags & 0x2000)
6362 {
6363 dprintf(("USER32: DrawCaptionTempA undocumented flag (0x2000)!\n"));
6364 }
6365
6366 return 0;
6367}
6368
6369
6370/***********************************************************************
6371 * DrawCaptionTemp32W [USER32.602]
6372 *
6373 * PARAMS
6374 *
6375 * RETURNS
6376 * Success:
6377 * Failure:
6378 */
6379
6380BOOL WIN32API DrawCaptionTempW (HWND hwnd,
6381 HDC hdc,
6382 const RECT *rect,
6383 HFONT hFont,
6384 HICON hIcon,
6385 LPCWSTR str,
6386 UINT uFlags)
6387{
6388 LPSTR strAscii = UnicodeToAsciiString((LPWSTR)str);
6389
6390 BOOL res = DrawCaptionTempA (hwnd,
6391 hdc,
6392 rect,
6393 hFont,
6394 hIcon,
6395 strAscii,
6396 uFlags);
6397
6398 FreeAsciiString(strAscii);
6399
6400 return res;
6401}
6402
Note: See TracBrowser for help on using the repository browser.