Removed trailing whitespace.
[wine/wine-gecko.git] / dlls / user / wnd16.c
blob311bbe039a5d6559dc5b1c30176cdc00b4925915
1 /*
2 * 16-bit windowing functions
4 * Copyright 2001 Alexandre Julliard
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #include "wine/winuser16.h"
22 #include "user.h"
23 #include "win.h"
24 #include "task.h"
25 #include "stackframe.h"
27 static HWND16 hwndSysModal;
29 /* ### start build ### */
30 extern WORD CALLBACK WIN_CallTo16_word_wl(WNDENUMPROC16,WORD,LONG);
31 /* ### stop build ### */
33 struct wnd_enum_info
35 WNDENUMPROC16 proc;
36 LPARAM param;
39 /* callback for 16-bit window enumeration functions */
40 static BOOL CALLBACK wnd_enum_callback( HWND hwnd, LPARAM param )
42 const struct wnd_enum_info *info = (struct wnd_enum_info *)param;
43 return WIN_CallTo16_word_wl( info->proc, hwnd, info->param );
46 /* convert insert after window handle to 32-bit */
47 inline static HWND full_insert_after_hwnd( HWND16 hwnd )
49 HWND ret = WIN_Handle32( hwnd );
50 if (ret == (HWND)0xffff) ret = HWND_TOPMOST;
51 return ret;
54 /**************************************************************************
55 * MessageBox (USER.1)
57 INT16 WINAPI MessageBox16( HWND16 hwnd, LPCSTR text, LPCSTR title, UINT16 type )
59 return MessageBoxA( WIN_Handle32(hwnd), text, title, type );
63 /**************************************************************************
64 * KillTimer (USER.12)
66 BOOL16 WINAPI KillTimer16( HWND16 hwnd, UINT16 id )
68 return KillTimer( WIN_Handle32(hwnd), id );
72 /**************************************************************************
73 * SetCapture (USER.18)
75 HWND16 WINAPI SetCapture16( HWND16 hwnd )
77 return WIN_Handle16( SetCapture( WIN_Handle32(hwnd) ));
81 /**************************************************************************
82 * ReleaseCapture (USER.19)
84 BOOL16 WINAPI ReleaseCapture16(void)
86 return ReleaseCapture();
90 /**************************************************************************
91 * SetFocus (USER.22)
93 HWND16 WINAPI SetFocus16( HWND16 hwnd )
95 return WIN_Handle16( SetFocus( WIN_Handle32(hwnd) ));
99 /**************************************************************************
100 * GetFocus (USER.23)
102 HWND16 WINAPI GetFocus16(void)
104 return WIN_Handle16( GetFocus() );
108 /**************************************************************************
109 * RemoveProp (USER.24)
111 HANDLE16 WINAPI RemoveProp16( HWND16 hwnd, LPCSTR str )
113 return (HANDLE16)RemovePropA( WIN_Handle32(hwnd), str );
117 /**************************************************************************
118 * GetProp (USER.25)
120 HANDLE16 WINAPI GetProp16( HWND16 hwnd, LPCSTR str )
122 return (HANDLE16)GetPropA( WIN_Handle32(hwnd), str );
126 /**************************************************************************
127 * SetProp (USER.26)
129 BOOL16 WINAPI SetProp16( HWND16 hwnd, LPCSTR str, HANDLE16 handle )
131 return SetPropA( WIN_Handle32(hwnd), str, handle );
135 /**************************************************************************
136 * ClientToScreen (USER.28)
138 void WINAPI ClientToScreen16( HWND16 hwnd, LPPOINT16 lppnt )
140 MapWindowPoints16( hwnd, 0, lppnt, 1 );
144 /**************************************************************************
145 * ScreenToClient (USER.29)
147 void WINAPI ScreenToClient16( HWND16 hwnd, LPPOINT16 lppnt )
149 MapWindowPoints16( 0, hwnd, lppnt, 1 );
153 /**************************************************************************
154 * WindowFromPoint (USER.30)
156 HWND16 WINAPI WindowFromPoint16( POINT16 pt )
158 POINT pt32;
160 CONV_POINT16TO32( &pt, &pt32 );
161 return WIN_Handle16( WindowFromPoint( pt32 ) );
165 /**************************************************************************
166 * IsIconic (USER.31)
168 BOOL16 WINAPI IsIconic16(HWND16 hwnd)
170 return IsIconic( WIN_Handle32(hwnd) );
174 /**************************************************************************
175 * GetWindowRect (USER.32)
177 void WINAPI GetWindowRect16( HWND16 hwnd, LPRECT16 rect )
179 RECT rect32;
181 GetWindowRect( WIN_Handle32(hwnd), &rect32 );
182 rect->left = rect32.left;
183 rect->top = rect32.top;
184 rect->right = rect32.right;
185 rect->bottom = rect32.bottom;
189 /**************************************************************************
190 * GetClientRect (USER.33)
192 void WINAPI GetClientRect16( HWND16 hwnd, LPRECT16 rect )
194 RECT rect32;
196 GetClientRect( WIN_Handle32(hwnd), &rect32 );
197 rect->left = rect32.left;
198 rect->top = rect32.top;
199 rect->right = rect32.right;
200 rect->bottom = rect32.bottom;
204 /**************************************************************************
205 * EnableWindow (USER.34)
207 BOOL16 WINAPI EnableWindow16( HWND16 hwnd, BOOL16 enable )
209 return EnableWindow( WIN_Handle32(hwnd), enable );
213 /**************************************************************************
214 * IsWindowEnabled (USER.35)
216 BOOL16 WINAPI IsWindowEnabled16(HWND16 hwnd)
218 return IsWindowEnabled( WIN_Handle32(hwnd) );
222 /**************************************************************************
223 * GetWindowText (USER.36)
225 INT16 WINAPI GetWindowText16( HWND16 hwnd, SEGPTR lpString, INT16 nMaxCount )
227 return SendMessage16( hwnd, WM_GETTEXT, nMaxCount, lpString );
231 /**************************************************************************
232 * SetWindowText (USER.37)
234 BOOL16 WINAPI SetWindowText16( HWND16 hwnd, SEGPTR lpString )
236 return SendMessage16( hwnd, WM_SETTEXT, 0, (LPARAM)lpString );
240 /**************************************************************************
241 * GetWindowTextLength (USER.38)
243 INT16 WINAPI GetWindowTextLength16( HWND16 hwnd )
245 return SendMessage16( hwnd, WM_GETTEXTLENGTH, 0, 0 );
249 /***********************************************************************
250 * BeginPaint (USER.39)
252 HDC16 WINAPI BeginPaint16( HWND16 hwnd, LPPAINTSTRUCT16 lps )
254 PAINTSTRUCT ps;
256 BeginPaint( WIN_Handle32(hwnd), &ps );
257 lps->hdc = ps.hdc;
258 lps->fErase = ps.fErase;
259 lps->rcPaint.top = ps.rcPaint.top;
260 lps->rcPaint.left = ps.rcPaint.left;
261 lps->rcPaint.right = ps.rcPaint.right;
262 lps->rcPaint.bottom = ps.rcPaint.bottom;
263 lps->fRestore = ps.fRestore;
264 lps->fIncUpdate = ps.fIncUpdate;
265 return lps->hdc;
269 /***********************************************************************
270 * EndPaint (USER.40)
272 BOOL16 WINAPI EndPaint16( HWND16 hwnd, const PAINTSTRUCT16* lps )
274 PAINTSTRUCT ps;
276 ps.hdc = lps->hdc;
277 return EndPaint( WIN_Handle32(hwnd), &ps );
281 /**************************************************************************
282 * ShowWindow (USER.42)
284 BOOL16 WINAPI ShowWindow16( HWND16 hwnd, INT16 cmd )
286 return ShowWindow( WIN_Handle32(hwnd), cmd );
290 /**************************************************************************
291 * CloseWindow (USER.43)
293 BOOL16 WINAPI CloseWindow16( HWND16 hwnd )
295 return CloseWindow( WIN_Handle32(hwnd) );
299 /**************************************************************************
300 * OpenIcon (USER.44)
302 BOOL16 WINAPI OpenIcon16( HWND16 hwnd )
304 return OpenIcon( WIN_Handle32(hwnd) );
308 /**************************************************************************
309 * BringWindowToTop (USER.45)
311 BOOL16 WINAPI BringWindowToTop16( HWND16 hwnd )
313 return BringWindowToTop( WIN_Handle32(hwnd) );
317 /**************************************************************************
318 * GetParent (USER.46)
320 HWND16 WINAPI GetParent16( HWND16 hwnd )
322 return WIN_Handle16( GetParent( WIN_Handle32(hwnd) ));
326 /**************************************************************************
327 * IsWindow (USER.47)
329 BOOL16 WINAPI IsWindow16( HWND16 hwnd )
331 CURRENT_STACK16->es = USER_HeapSel;
332 /* don't use WIN_Handle32 here, we don't care about the full handle */
333 return IsWindow( (HWND)(ULONG_PTR)hwnd );
337 /**************************************************************************
338 * IsChild (USER.48)
340 BOOL16 WINAPI IsChild16( HWND16 parent, HWND16 child )
342 return IsChild( WIN_Handle32(parent), WIN_Handle32(child) );
346 /**************************************************************************
347 * IsWindowVisible (USER.49)
349 BOOL16 WINAPI IsWindowVisible16( HWND16 hwnd )
351 return IsWindowVisible( WIN_Handle32(hwnd) );
355 /**************************************************************************
356 * FindWindow (USER.50)
358 HWND16 WINAPI FindWindow16( LPCSTR className, LPCSTR title )
360 return WIN_Handle16( FindWindowA( className, title ));
364 /**************************************************************************
365 * DestroyWindow (USER.53)
367 BOOL16 WINAPI DestroyWindow16( HWND16 hwnd )
369 return DestroyWindow( WIN_Handle32(hwnd) );
373 /*******************************************************************
374 * EnumWindows (USER.54)
376 BOOL16 WINAPI EnumWindows16( WNDENUMPROC16 func, LPARAM lParam )
378 struct wnd_enum_info info;
380 info.proc = func;
381 info.param = lParam;
382 return EnumWindows( wnd_enum_callback, (LPARAM)&info );
386 /**********************************************************************
387 * EnumChildWindows (USER.55)
389 BOOL16 WINAPI EnumChildWindows16( HWND16 parent, WNDENUMPROC16 func, LPARAM lParam )
391 struct wnd_enum_info info;
393 info.proc = func;
394 info.param = lParam;
395 return EnumChildWindows( WIN_Handle32(parent), wnd_enum_callback, (LPARAM)&info );
399 /**************************************************************************
400 * MoveWindow (USER.56)
402 BOOL16 WINAPI MoveWindow16( HWND16 hwnd, INT16 x, INT16 y, INT16 cx, INT16 cy, BOOL16 repaint )
404 return MoveWindow( WIN_Handle32(hwnd), x, y, cx, cy, repaint );
408 /**************************************************************************
409 * GetClassName (USER.58)
411 INT16 WINAPI GetClassName16( HWND16 hwnd, LPSTR buffer, INT16 count )
413 return GetClassNameA( WIN_Handle32(hwnd), buffer, count );
417 /**************************************************************************
418 * SetActiveWindow (USER.59)
420 HWND16 WINAPI SetActiveWindow16( HWND16 hwnd )
422 return WIN_Handle16( SetActiveWindow( WIN_Handle32(hwnd) ));
426 /**************************************************************************
427 * GetActiveWindow (USER.60)
429 HWND16 WINAPI GetActiveWindow16(void)
431 return WIN_Handle16( GetActiveWindow() );
435 /**************************************************************************
436 * ScrollWindow (USER.61)
438 void WINAPI ScrollWindow16( HWND16 hwnd, INT16 dx, INT16 dy, const RECT16 *rect,
439 const RECT16 *clipRect )
441 RECT rect32, clipRect32;
443 if (rect) CONV_RECT16TO32( rect, &rect32 );
444 if (clipRect) CONV_RECT16TO32( clipRect, &clipRect32 );
445 ScrollWindow( WIN_Handle32(hwnd), dx, dy, rect ? &rect32 : NULL,
446 clipRect ? &clipRect32 : NULL );
450 /**************************************************************************
451 * SetScrollPos (USER.62)
453 INT16 WINAPI SetScrollPos16( HWND16 hwnd, INT16 nBar, INT16 nPos, BOOL16 redraw )
455 return SetScrollPos( WIN_Handle32(hwnd), nBar, nPos, redraw );
459 /**************************************************************************
460 * GetScrollPos (USER.63)
462 INT16 WINAPI GetScrollPos16( HWND16 hwnd, INT16 nBar )
464 return GetScrollPos( WIN_Handle32(hwnd), nBar );
468 /**************************************************************************
469 * SetScrollRange (USER.64)
471 void WINAPI SetScrollRange16( HWND16 hwnd, INT16 nBar, INT16 MinVal, INT16 MaxVal, BOOL16 redraw )
473 /* Invalid range -> range is set to (0,0) */
474 if ((INT)MaxVal - (INT)MinVal > 0x7fff) MinVal = MaxVal = 0;
475 SetScrollRange( WIN_Handle32(hwnd), nBar, MinVal, MaxVal, redraw );
479 /**************************************************************************
480 * GetScrollRange (USER.65)
482 BOOL16 WINAPI GetScrollRange16( HWND16 hwnd, INT16 nBar, LPINT16 lpMin, LPINT16 lpMax)
484 INT min, max;
485 BOOL ret = GetScrollRange( WIN_Handle32(hwnd), nBar, &min, &max );
486 if (lpMin) *lpMin = min;
487 if (lpMax) *lpMax = max;
488 return ret;
492 /**************************************************************************
493 * GetDC (USER.66)
495 HDC16 WINAPI GetDC16( HWND16 hwnd )
497 return (HDC16)GetDC( WIN_Handle32(hwnd) );
501 /**************************************************************************
502 * GetWindowDC (USER.67)
504 HDC16 WINAPI GetWindowDC16( HWND16 hwnd )
506 return GetDCEx16( hwnd, 0, DCX_USESTYLE | DCX_WINDOW );
510 /**************************************************************************
511 * ReleaseDC (USER.68)
513 INT16 WINAPI ReleaseDC16( HWND16 hwnd, HDC16 hdc )
515 return (INT16)ReleaseDC( WIN_Handle32(hwnd), hdc );
519 /**************************************************************************
520 * EndDialog (USER.88)
522 BOOL16 WINAPI EndDialog16( HWND16 hwnd, INT16 retval )
524 return EndDialog( WIN_Handle32(hwnd), retval );
528 /**************************************************************************
529 * GetDlgItem (USER.91)
531 HWND16 WINAPI GetDlgItem16( HWND16 hwndDlg, INT16 id )
533 return WIN_Handle16( GetDlgItem( WIN_Handle32(hwndDlg), (UINT16) id ));
537 /**************************************************************************
538 * SetDlgItemText (USER.92)
540 void WINAPI SetDlgItemText16( HWND16 hwnd, INT16 id, SEGPTR lpString )
542 SendDlgItemMessage16( hwnd, id, WM_SETTEXT, 0, (LPARAM)lpString );
546 /**************************************************************************
547 * GetDlgItemText (USER.93)
549 INT16 WINAPI GetDlgItemText16( HWND16 hwnd, INT16 id, SEGPTR str, UINT16 len )
551 return (INT16)SendDlgItemMessage16( hwnd, id, WM_GETTEXT, len, (LPARAM)str );
555 /**************************************************************************
556 * SetDlgItemInt (USER.94)
558 void WINAPI SetDlgItemInt16( HWND16 hwnd, INT16 id, UINT16 value, BOOL16 fSigned )
560 SetDlgItemInt( WIN_Handle32(hwnd), (UINT)(UINT16)id,
561 (UINT)(fSigned ? (INT16) value : (UINT16) value), fSigned );
565 /**************************************************************************
566 * GetDlgItemInt (USER.95)
568 UINT16 WINAPI GetDlgItemInt16( HWND16 hwnd, INT16 id, BOOL16 *translated, BOOL16 fSigned )
570 UINT result;
571 BOOL ok;
573 if (translated) *translated = FALSE;
574 result = GetDlgItemInt( WIN_Handle32(hwnd), (UINT)(UINT16)id, &ok, fSigned );
575 if (!ok) return 0;
576 if (fSigned)
578 if (((INT)result < -32767) || ((INT)result > 32767)) return 0;
580 else
582 if (result > 65535) return 0;
584 if (translated) *translated = TRUE;
585 return (UINT16)result;
589 /**************************************************************************
590 * CheckRadioButton (USER.96)
592 BOOL16 WINAPI CheckRadioButton16( HWND16 hwndDlg, UINT16 firstID,
593 UINT16 lastID, UINT16 checkID )
595 return CheckRadioButton( WIN_Handle32(hwndDlg), firstID, lastID, checkID );
599 /**************************************************************************
600 * CheckDlgButton (USER.97)
602 BOOL16 WINAPI CheckDlgButton16( HWND16 hwnd, INT16 id, UINT16 check )
604 SendDlgItemMessage16( hwnd, id, BM_SETCHECK16, check, 0 );
605 return TRUE;
609 /**************************************************************************
610 * IsDlgButtonChecked (USER.98)
612 UINT16 WINAPI IsDlgButtonChecked16( HWND16 hwnd, UINT16 id )
614 return (UINT16)SendDlgItemMessage16( hwnd, id, BM_GETCHECK16, 0, 0 );
618 /**************************************************************************
619 * DlgDirSelect (USER.99)
621 BOOL16 WINAPI DlgDirSelect16( HWND16 hwnd, LPSTR str, INT16 id )
623 return DlgDirSelectEx16( hwnd, str, 128, id );
627 /**************************************************************************
628 * DlgDirList (USER.100)
630 INT16 WINAPI DlgDirList16( HWND16 hDlg, LPSTR spec, INT16 idLBox,
631 INT16 idStatic, UINT16 attrib )
633 /* according to Win16 docs, DDL_DRIVES should make DDL_EXCLUSIVE
634 * be set automatically (this is different in Win32, and
635 * DIALOG_DlgDirList sends Win32 messages to the control,
636 * so do it here) */
637 if (attrib & DDL_DRIVES) attrib |= DDL_EXCLUSIVE;
638 return DlgDirListA( WIN_Handle32(hDlg), spec, idLBox, idStatic, attrib );
642 /**************************************************************************
643 * SendDlgItemMessage (USER.101)
645 LRESULT WINAPI SendDlgItemMessage16( HWND16 hwnd, INT16 id, UINT16 msg,
646 WPARAM16 wParam, LPARAM lParam )
648 HWND16 hwndCtrl = GetDlgItem16( hwnd, id );
649 if (hwndCtrl) return SendMessage16( hwndCtrl, msg, wParam, lParam );
650 else return 0;
654 /**************************************************************************
655 * MapDialogRect (USER.103)
657 void WINAPI MapDialogRect16( HWND16 hwnd, LPRECT16 rect )
659 RECT rect32;
660 MapDialogRect( WIN_Handle32(hwnd), &rect32 );
661 rect->left = rect32.left;
662 rect->right = rect32.right;
663 rect->top = rect32.top;
664 rect->bottom = rect32.bottom;
668 /**************************************************************************
669 * FlashWindow (USER.105)
671 BOOL16 WINAPI FlashWindow16( HWND16 hwnd, BOOL16 bInvert )
673 return FlashWindow( WIN_Handle32(hwnd), bInvert );
677 /**************************************************************************
678 * WindowFromDC (USER.117)
680 HWND16 WINAPI WindowFromDC16( HDC16 hDC )
682 return WIN_Handle16( WindowFromDC( hDC ) );
686 /**************************************************************************
687 * UpdateWindow (USER.124)
689 void WINAPI UpdateWindow16( HWND16 hwnd )
691 RedrawWindow16( hwnd, NULL, 0, RDW_UPDATENOW | RDW_ALLCHILDREN );
695 /**************************************************************************
696 * InvalidateRect (USER.125)
698 void WINAPI InvalidateRect16( HWND16 hwnd, const RECT16 *rect, BOOL16 erase )
700 RedrawWindow16( hwnd, rect, 0, RDW_INVALIDATE | (erase ? RDW_ERASE : 0) );
704 /**************************************************************************
705 * InvalidateRgn (USER.126)
707 void WINAPI InvalidateRgn16( HWND16 hwnd, HRGN16 hrgn, BOOL16 erase )
709 RedrawWindow16( hwnd, NULL, hrgn, RDW_INVALIDATE | (erase ? RDW_ERASE : 0) );
713 /**************************************************************************
714 * ValidateRect (USER.127)
716 void WINAPI ValidateRect16( HWND16 hwnd, const RECT16 *rect )
718 RedrawWindow16( hwnd, rect, 0, RDW_VALIDATE | RDW_NOCHILDREN );
722 /**************************************************************************
723 * ValidateRgn (USER.128)
725 void WINAPI ValidateRgn16( HWND16 hwnd, HRGN16 hrgn )
727 RedrawWindow16( hwnd, NULL, hrgn, RDW_VALIDATE | RDW_NOCHILDREN );
731 /**************************************************************************
732 * GetClassWord (USER.129)
734 WORD WINAPI GetClassWord16( HWND16 hwnd, INT16 offset )
736 return GetClassWord( WIN_Handle32(hwnd), offset );
740 /**************************************************************************
741 * SetClassWord (USER.130)
743 WORD WINAPI SetClassWord16( HWND16 hwnd, INT16 offset, WORD newval )
745 return SetClassWord( WIN_Handle32(hwnd), offset, newval );
749 /**************************************************************************
750 * GetWindowWord (USER.133)
752 WORD WINAPI GetWindowWord16( HWND16 hwnd, INT16 offset )
754 return GetWindowWord( WIN_Handle32(hwnd), offset );
758 /**************************************************************************
759 * SetWindowWord (USER.134)
761 WORD WINAPI SetWindowWord16( HWND16 hwnd, INT16 offset, WORD newval )
763 return SetWindowWord( WIN_Handle32(hwnd), offset, newval );
767 /**************************************************************************
768 * OpenClipboard (USER.137)
770 BOOL16 WINAPI OpenClipboard16( HWND16 hwnd )
772 return OpenClipboard( WIN_Handle32(hwnd) );
776 /**************************************************************************
777 * GetClipboardOwner (USER.140)
779 HWND16 WINAPI GetClipboardOwner16(void)
781 return WIN_Handle16( GetClipboardOwner() );
785 /**************************************************************************
786 * SetClipboardViewer (USER.147)
788 HWND16 WINAPI SetClipboardViewer16( HWND16 hwnd )
790 return WIN_Handle16( SetClipboardViewer( WIN_Handle32(hwnd) ));
794 /**************************************************************************
795 * GetClipboardViewer (USER.148)
797 HWND16 WINAPI GetClipboardViewer16(void)
799 return WIN_Handle16( GetClipboardViewer() );
803 /**************************************************************************
804 * ChangeClipboardChain (USER.149)
806 BOOL16 WINAPI ChangeClipboardChain16(HWND16 hwnd, HWND16 hwndNext)
808 return ChangeClipboardChain( WIN_Handle32(hwnd), WIN_Handle32(hwndNext) );
812 /**************************************************************************
813 * GetSystemMenu (USER.156)
815 HMENU16 WINAPI GetSystemMenu16( HWND16 hwnd, BOOL16 revert )
817 return GetSystemMenu( WIN_Handle32(hwnd), revert );
821 /**************************************************************************
822 * GetMenu (USER.157)
824 HMENU16 WINAPI GetMenu16( HWND16 hwnd )
826 return GetMenu( WIN_Handle32(hwnd) );
830 /**************************************************************************
831 * SetMenu (USER.158)
833 BOOL16 WINAPI SetMenu16( HWND16 hwnd, HMENU16 hMenu )
835 return SetMenu( WIN_Handle32(hwnd), hMenu );
839 /**************************************************************************
840 * DrawMenuBar (USER.160)
842 void WINAPI DrawMenuBar16( HWND16 hwnd )
844 DrawMenuBar( WIN_Handle32(hwnd) );
848 /**************************************************************************
849 * HiliteMenuItem (USER.162)
851 BOOL16 WINAPI HiliteMenuItem16( HWND16 hwnd, HMENU16 hMenu, UINT16 id, UINT16 wHilite )
853 return HiliteMenuItem( WIN_Handle32(hwnd), hMenu, id, wHilite );
857 /**************************************************************************
858 * CreateCaret (USER.163)
860 void WINAPI CreateCaret16( HWND16 hwnd, HBITMAP16 bitmap, INT16 width, INT16 height )
862 CreateCaret( WIN_Handle32(hwnd), bitmap, width, height );
866 /**************************************************************************
867 * HideCaret (USER.166)
869 void WINAPI HideCaret16( HWND16 hwnd )
871 HideCaret( WIN_Handle32(hwnd) );
875 /**************************************************************************
876 * ShowCaret (USER.167)
878 void WINAPI ShowCaret16( HWND16 hwnd )
880 ShowCaret( WIN_Handle32(hwnd) );
884 /**************************************************************************
885 * ArrangeIconicWindows (USER.170)
887 UINT16 WINAPI ArrangeIconicWindows16( HWND16 parent)
889 return ArrangeIconicWindows( WIN_Handle32(parent) );
893 /**************************************************************************
894 * SwitchToThisWindow (USER.172)
896 void WINAPI SwitchToThisWindow16( HWND16 hwnd, BOOL16 restore )
898 SwitchToThisWindow( WIN_Handle32(hwnd), restore );
902 /**************************************************************************
903 * KillSystemTimer (USER.182)
905 BOOL16 WINAPI KillSystemTimer16( HWND16 hwnd, UINT16 id )
907 return KillSystemTimer( WIN_Handle32(hwnd), id );
911 /**************************************************************************
912 * SetSysModalWindow (USER.188)
914 HWND16 WINAPI SetSysModalWindow16( HWND16 hwnd )
916 HWND16 old = hwndSysModal;
917 hwndSysModal = hwnd;
918 return old;
922 /**************************************************************************
923 * GetSysModalWindow (USER.189)
925 HWND16 WINAPI GetSysModalWindow16(void)
927 return hwndSysModal;
931 /**************************************************************************
932 * GetUpdateRect (USER.190)
934 BOOL16 WINAPI GetUpdateRect16( HWND16 hwnd, LPRECT16 rect, BOOL16 erase )
936 RECT r;
937 BOOL16 ret;
939 if (!rect) return GetUpdateRect( WIN_Handle32(hwnd), NULL, erase );
940 ret = GetUpdateRect( WIN_Handle32(hwnd), &r, erase );
941 CONV_RECT32TO16( &r, rect );
942 return ret;
946 /**************************************************************************
947 * ChildWindowFromPoint (USER.191)
949 HWND16 WINAPI ChildWindowFromPoint16( HWND16 hwndParent, POINT16 pt )
951 POINT pt32;
952 CONV_POINT16TO32( &pt, &pt32 );
953 return WIN_Handle16( ChildWindowFromPoint( WIN_Handle32(hwndParent), pt32 ));
957 /**************************************************************************
958 * DlgDirSelectComboBox (USER.194)
960 BOOL16 WINAPI DlgDirSelectComboBox16( HWND16 hwnd, LPSTR str, INT16 id )
962 return DlgDirSelectComboBoxEx16( hwnd, str, 128, id );
966 /**************************************************************************
967 * DlgDirListComboBox (USER.195)
969 INT16 WINAPI DlgDirListComboBox16( HWND16 hDlg, LPSTR spec, INT16 idCBox,
970 INT16 idStatic, UINT16 attrib )
972 return DlgDirListComboBoxA( WIN_Handle32(hDlg), spec, idCBox, idStatic, attrib );
976 /**********************************************************************
977 * EnumTaskWindows (USER.225)
979 BOOL16 WINAPI EnumTaskWindows16( HTASK16 hTask, WNDENUMPROC16 func, LPARAM lParam )
981 struct wnd_enum_info info;
982 TDB *tdb = TASK_GetPtr( hTask );
984 if (!tdb) return FALSE;
985 info.proc = func;
986 info.param = lParam;
987 return EnumThreadWindows( (DWORD)tdb->teb->tid, wnd_enum_callback, (LPARAM)&info );
991 /**************************************************************************
992 * GetNextDlgGroupItem (USER.227)
994 HWND16 WINAPI GetNextDlgGroupItem16( HWND16 hwndDlg, HWND16 hwndCtrl,
995 BOOL16 fPrevious )
997 return WIN_Handle16( GetNextDlgGroupItem( WIN_Handle32(hwndDlg),
998 WIN_Handle32(hwndCtrl), fPrevious ));
1002 /**************************************************************************
1003 * GetNextDlgTabItem (USER.228)
1005 HWND16 WINAPI GetNextDlgTabItem16( HWND16 hwndDlg, HWND16 hwndCtrl,
1006 BOOL16 fPrevious )
1008 return WIN_Handle16( GetNextDlgTabItem( WIN_Handle32(hwndDlg),
1009 WIN_Handle32(hwndCtrl), fPrevious ));
1013 /**************************************************************************
1014 * GetTopWindow (USER.229)
1016 HWND16 WINAPI GetTopWindow16( HWND16 hwnd )
1018 return WIN_Handle16( GetTopWindow( WIN_Handle32(hwnd) ));
1022 /**************************************************************************
1023 * GetNextWindow (USER.230)
1025 HWND16 WINAPI GetNextWindow16( HWND16 hwnd, WORD flag )
1027 if ((flag != GW_HWNDNEXT) && (flag != GW_HWNDPREV)) return 0;
1028 return GetWindow16( hwnd, flag );
1032 /**************************************************************************
1033 * SetWindowPos (USER.232)
1035 BOOL16 WINAPI SetWindowPos16( HWND16 hwnd, HWND16 hwndInsertAfter,
1036 INT16 x, INT16 y, INT16 cx, INT16 cy, WORD flags)
1038 return SetWindowPos( WIN_Handle32(hwnd), full_insert_after_hwnd(hwndInsertAfter),
1039 x, y, cx, cy, flags );
1043 /**************************************************************************
1044 * SetParent (USER.233)
1046 HWND16 WINAPI SetParent16( HWND16 hwndChild, HWND16 hwndNewParent )
1048 return WIN_Handle16( SetParent( WIN_Handle32(hwndChild), WIN_Handle32(hwndNewParent) ));
1052 /**************************************************************************
1053 * GetCapture (USER.236)
1055 HWND16 WINAPI GetCapture16(void)
1057 return WIN_Handle16( GetCapture() );
1061 /**************************************************************************
1062 * GetUpdateRgn (USER.237)
1064 INT16 WINAPI GetUpdateRgn16( HWND16 hwnd, HRGN16 hrgn, BOOL16 erase )
1066 return GetUpdateRgn( WIN_Handle32(hwnd), hrgn, erase );
1070 /**************************************************************************
1071 * ExcludeUpdateRgn (USER.238)
1073 INT16 WINAPI ExcludeUpdateRgn16( HDC16 hdc, HWND16 hwnd )
1075 return ExcludeUpdateRgn( hdc, WIN_Handle32(hwnd) );
1079 /**************************************************************************
1080 * GetOpenClipboardWindow (USER.248)
1082 HWND16 WINAPI GetOpenClipboardWindow16(void)
1084 return WIN_Handle16( GetOpenClipboardWindow() );
1088 /**************************************************************************
1089 * BeginDeferWindowPos (USER.259)
1091 HDWP16 WINAPI BeginDeferWindowPos16( INT16 count )
1093 return BeginDeferWindowPos( count );
1097 /**************************************************************************
1098 * DeferWindowPos (USER.260)
1100 HDWP16 WINAPI DeferWindowPos16( HDWP16 hdwp, HWND16 hwnd, HWND16 hwndAfter,
1101 INT16 x, INT16 y, INT16 cx, INT16 cy,
1102 UINT16 flags )
1104 return DeferWindowPos( hdwp, WIN_Handle32(hwnd), full_insert_after_hwnd(hwndAfter),
1105 x, y, cx, cy, flags );
1109 /**************************************************************************
1110 * EndDeferWindowPos (USER.261)
1112 BOOL16 WINAPI EndDeferWindowPos16( HDWP16 hdwp )
1114 return EndDeferWindowPos( hdwp );
1118 /**************************************************************************
1119 * GetWindow (USER.262)
1121 HWND16 WINAPI GetWindow16( HWND16 hwnd, WORD rel )
1123 return WIN_Handle16( GetWindow( WIN_Handle32(hwnd), rel ) );
1127 /**************************************************************************
1128 * ShowOwnedPopups (USER.265)
1130 void WINAPI ShowOwnedPopups16( HWND16 owner, BOOL16 fShow )
1132 ShowOwnedPopups( WIN_Handle32(owner), fShow );
1136 /**************************************************************************
1137 * ShowScrollBar (USER.267)
1139 void WINAPI ShowScrollBar16( HWND16 hwnd, INT16 nBar, BOOL16 fShow )
1141 ShowScrollBar( WIN_Handle32(hwnd), nBar, fShow );
1145 /**************************************************************************
1146 * IsZoomed (USER.272)
1148 BOOL16 WINAPI IsZoomed16(HWND16 hwnd)
1150 return IsZoomed( WIN_Handle32(hwnd) );
1154 /**************************************************************************
1155 * GetDlgCtrlID (USER.277)
1157 INT16 WINAPI GetDlgCtrlID16( HWND16 hwnd )
1159 return GetDlgCtrlID( WIN_Handle32(hwnd) );
1163 /**************************************************************************
1164 * GetDesktopHwnd (USER.278)
1166 * Exactly the same thing as GetDesktopWindow(), but not documented.
1167 * Don't ask me why...
1169 HWND16 WINAPI GetDesktopHwnd16(void)
1171 return GetDesktopWindow16();
1175 /**************************************************************************
1176 * SetSystemMenu (USER.280)
1178 BOOL16 WINAPI SetSystemMenu16( HWND16 hwnd, HMENU16 hMenu )
1180 return SetSystemMenu( WIN_Handle32(hwnd), hMenu );
1184 /**************************************************************************
1185 * GetDesktopWindow (USER.286)
1187 HWND16 WINAPI GetDesktopWindow16(void)
1189 return WIN_Handle16( GetDesktopWindow() );
1193 /**************************************************************************
1194 * GetLastActivePopup (USER.287)
1196 HWND16 WINAPI GetLastActivePopup16( HWND16 hwnd )
1198 return WIN_Handle16( GetLastActivePopup( WIN_Handle32(hwnd) ));
1202 /**************************************************************************
1203 * RedrawWindow (USER.290)
1205 BOOL16 WINAPI RedrawWindow16( HWND16 hwnd, const RECT16 *rectUpdate,
1206 HRGN16 hrgnUpdate, UINT16 flags )
1208 if (rectUpdate)
1210 RECT r;
1211 CONV_RECT16TO32( rectUpdate, &r );
1212 return RedrawWindow( WIN_Handle32(hwnd), &r, hrgnUpdate, flags );
1214 return RedrawWindow( WIN_Handle32(hwnd), NULL, hrgnUpdate, flags );
1218 /**************************************************************************
1219 * LockWindowUpdate (USER.294)
1221 BOOL16 WINAPI LockWindowUpdate16( HWND16 hwnd )
1223 return LockWindowUpdate( WIN_Handle32(hwnd) );
1227 /**************************************************************************
1228 * ScrollWindowEx (USER.319)
1230 INT16 WINAPI ScrollWindowEx16( HWND16 hwnd, INT16 dx, INT16 dy,
1231 const RECT16 *rect, const RECT16 *clipRect,
1232 HRGN16 hrgnUpdate, LPRECT16 rcUpdate,
1233 UINT16 flags )
1235 RECT rect32, clipRect32, rcUpdate32;
1236 BOOL16 ret;
1238 if (rect) CONV_RECT16TO32( rect, &rect32 );
1239 if (clipRect) CONV_RECT16TO32( clipRect, &clipRect32 );
1240 ret = ScrollWindowEx( WIN_Handle32(hwnd), dx, dy, rect ? &rect32 : NULL,
1241 clipRect ? &clipRect32 : NULL, hrgnUpdate,
1242 (rcUpdate) ? &rcUpdate32 : NULL, flags );
1243 if (rcUpdate) CONV_RECT32TO16( &rcUpdate32, rcUpdate );
1244 return ret;
1248 /**************************************************************************
1249 * FillWindow (USER.324)
1251 void WINAPI FillWindow16( HWND16 hwndParent, HWND16 hwnd, HDC16 hdc, HBRUSH16 hbrush )
1253 RECT rect;
1254 RECT16 rc16;
1255 GetClientRect( WIN_Handle32(hwnd), &rect );
1256 DPtoLP( hdc, (LPPOINT)&rect, 2 );
1257 CONV_RECT32TO16( &rect, &rc16 );
1258 PaintRect16( hwndParent, hwnd, hdc, hbrush, &rc16 );
1262 /**************************************************************************
1263 * PaintRect (USER.325)
1265 void WINAPI PaintRect16( HWND16 hwndParent, HWND16 hwnd, HDC16 hdc,
1266 HBRUSH16 hbrush, const RECT16 *rect)
1268 if (hbrush <= CTLCOLOR_STATIC)
1270 HWND parent = WIN_Handle32(hwndParent), hwnd32 = WIN_Handle32(hwnd);
1272 if (!parent) return;
1273 hbrush = SendMessageW( parent, WM_CTLCOLORMSGBOX + hbrush, (WPARAM)hdc, (LPARAM)hwnd32 );
1274 if (!hbrush) hbrush = DefWindowProcW( parent, WM_CTLCOLORMSGBOX + hbrush,
1275 (WPARAM)hdc, (LPARAM)hwnd32 );
1277 if (hbrush) FillRect16( hdc, rect, hbrush );
1281 /**************************************************************************
1282 * GetControlBrush (USER.326)
1284 HBRUSH16 WINAPI GetControlBrush16( HWND16 hwnd, HDC16 hdc, UINT16 ctlType )
1286 HBRUSH16 ret;
1287 HWND hwnd32 = WIN_Handle32(hwnd);
1288 HWND parent = GetParent( hwnd32 );
1290 if (!parent) parent = hwnd32;
1291 ret = SendMessageW( parent, WM_CTLCOLORMSGBOX + ctlType, (WPARAM)hdc, (LPARAM)hwnd32 );
1292 if (!ret) ret = DefWindowProcW( parent, WM_CTLCOLORMSGBOX + ctlType,
1293 (WPARAM)hdc, (LPARAM)hwnd32 );
1294 return ret;
1298 /**************************************************************************
1299 * GetDCEx (USER.359)
1301 HDC16 WINAPI GetDCEx16( HWND16 hwnd, HRGN16 hrgnClip, DWORD flags )
1303 return (HDC16)GetDCEx( WIN_Handle32(hwnd), hrgnClip, flags );
1307 /**************************************************************************
1308 * GetWindowPlacement (USER.370)
1310 BOOL16 WINAPI GetWindowPlacement16( HWND16 hwnd, WINDOWPLACEMENT16 *wp16 )
1312 WINDOWPLACEMENT wpl;
1314 wpl.length = sizeof(wpl);
1315 if (!GetWindowPlacement( WIN_Handle32(hwnd), &wpl )) return FALSE;
1316 wp16->length = sizeof(*wp16);
1317 wp16->flags = wpl.flags;
1318 wp16->showCmd = wpl.showCmd;
1319 CONV_POINT32TO16( &wpl.ptMinPosition, &wp16->ptMinPosition );
1320 CONV_POINT32TO16( &wpl.ptMaxPosition, &wp16->ptMaxPosition );
1321 CONV_RECT32TO16( &wpl.rcNormalPosition, &wp16->rcNormalPosition );
1322 return TRUE;
1326 /**************************************************************************
1327 * SetWindowPlacement (USER.371)
1329 BOOL16 WINAPI SetWindowPlacement16( HWND16 hwnd, const WINDOWPLACEMENT16 *wp16 )
1331 WINDOWPLACEMENT wpl;
1333 if (!wp16) return FALSE;
1334 wpl.length = sizeof(wpl);
1335 wpl.flags = wp16->flags;
1336 wpl.showCmd = wp16->showCmd;
1337 wpl.ptMinPosition.x = wp16->ptMinPosition.x;
1338 wpl.ptMinPosition.y = wp16->ptMinPosition.y;
1339 wpl.ptMaxPosition.x = wp16->ptMaxPosition.x;
1340 wpl.ptMaxPosition.y = wp16->ptMaxPosition.y;
1341 wpl.rcNormalPosition.left = wp16->rcNormalPosition.left;
1342 wpl.rcNormalPosition.top = wp16->rcNormalPosition.top;
1343 wpl.rcNormalPosition.right = wp16->rcNormalPosition.right;
1344 wpl.rcNormalPosition.bottom = wp16->rcNormalPosition.bottom;
1345 return SetWindowPlacement( WIN_Handle32(hwnd), &wpl );
1349 /**************************************************************************
1350 * ChildWindowFromPointEx (USER.399)
1352 HWND16 WINAPI ChildWindowFromPointEx16( HWND16 hwndParent, POINT16 pt, UINT16 uFlags)
1354 POINT pt32;
1355 CONV_POINT16TO32( &pt, &pt32 );
1356 return WIN_Handle16( ChildWindowFromPointEx( WIN_Handle32(hwndParent), pt32, uFlags ));
1360 /**************************************************************************
1361 * GetPriorityClipboardFormat (USER.402)
1363 INT16 WINAPI GetPriorityClipboardFormat16( UINT16 *list, INT16 count )
1365 int i;
1367 for (i = 0; i < count; i++)
1368 if (IsClipboardFormatAvailable( list[i] )) return list[i];
1369 return -1;
1373 /**************************************************************************
1374 * TrackPopupMenu (USER.416)
1376 BOOL16 WINAPI TrackPopupMenu16( HMENU16 hMenu, UINT16 wFlags, INT16 x, INT16 y,
1377 INT16 nReserved, HWND16 hwnd, const RECT16 *lpRect )
1379 RECT r;
1380 if (lpRect) CONV_RECT16TO32( lpRect, &r );
1381 return TrackPopupMenu( hMenu, wFlags, x, y, nReserved,
1382 WIN_Handle32(hwnd), lpRect ? &r : NULL );
1386 /**************************************************************************
1387 * DlgDirSelectEx (USER.422)
1389 BOOL16 WINAPI DlgDirSelectEx16( HWND16 hwnd, LPSTR str, INT16 len, INT16 id )
1391 return DlgDirSelectExA( WIN_Handle32(hwnd), str, len, id );
1395 /**************************************************************************
1396 * DlgDirSelectComboBoxEx (USER.423)
1398 BOOL16 WINAPI DlgDirSelectComboBoxEx16( HWND16 hwnd, LPSTR str, INT16 len,
1399 INT16 id )
1401 return DlgDirSelectComboBoxExA( WIN_Handle32(hwnd), str, len, id );
1405 /**************************************************************************
1406 * FindWindowEx (USER.427)
1408 HWND16 WINAPI FindWindowEx16( HWND16 parent, HWND16 child, LPCSTR className, LPCSTR title )
1410 return WIN_Handle16( FindWindowExA( WIN_Handle32(parent), WIN_Handle32(child),
1411 className, title ));
1415 /**************************************************************************
1416 * DrawAnimatedRects (USER.448)
1418 BOOL16 WINAPI DrawAnimatedRects16( HWND16 hwnd, INT16 idAni,
1419 const RECT16* lprcFrom, const RECT16* lprcTo )
1421 RECT rcFrom32, rcTo32;
1422 rcFrom32.left = lprcFrom->left;
1423 rcFrom32.top = lprcFrom->top;
1424 rcFrom32.right = lprcFrom->right;
1425 rcFrom32.bottom = lprcFrom->bottom;
1426 rcTo32.left = lprcTo->left;
1427 rcTo32.top = lprcTo->top;
1428 rcTo32.right = lprcTo->right;
1429 rcTo32.bottom = lprcTo->bottom;
1430 return DrawAnimatedRects( WIN_Handle32(hwnd), idAni, &rcFrom32, &rcTo32 );
1434 /**************************************************************************
1435 * SetInternalWindowPos (USER.461)
1437 void WINAPI SetInternalWindowPos16( HWND16 hwnd, UINT16 showCmd, LPRECT16 rect, LPPOINT16 pt )
1439 RECT rc32;
1440 POINT pt32;
1442 if (rect)
1444 rc32.left = rect->left;
1445 rc32.top = rect->top;
1446 rc32.right = rect->right;
1447 rc32.bottom = rect->bottom;
1449 if (pt)
1451 pt32.x = pt->x;
1452 pt32.y = pt->y;
1454 SetInternalWindowPos( WIN_Handle32(hwnd), showCmd,
1455 rect ? &rc32 : NULL, pt ? &pt32 : NULL );
1459 /**************************************************************************
1460 * CalcChildScroll (USER.462)
1462 void WINAPI CalcChildScroll16( HWND16 hwnd, WORD scroll )
1464 return CalcChildScroll( WIN_Handle32(hwnd), scroll );
1468 /**************************************************************************
1469 * ScrollChildren (USER.463)
1471 void WINAPI ScrollChildren16(HWND16 hwnd, UINT16 uMsg, WPARAM16 wParam, LPARAM lParam)
1473 ScrollChildren( WIN_Handle32(hwnd), uMsg, wParam, lParam );
1477 /**************************************************************************
1478 * DragDetect (USER.465)
1480 BOOL16 WINAPI DragDetect16( HWND16 hwnd, POINT16 pt )
1482 POINT pt32;
1483 CONV_POINT16TO32( &pt, &pt32 );
1484 return DragDetect( WIN_Handle32(hwnd), pt32 );
1488 /**************************************************************************
1489 * SetScrollInfo (USER.475)
1491 INT16 WINAPI SetScrollInfo16( HWND16 hwnd, INT16 nBar, const SCROLLINFO *info, BOOL16 redraw )
1493 return SetScrollInfo( WIN_Handle32(hwnd), nBar, info, redraw );
1497 /**************************************************************************
1498 * GetScrollInfo (USER.476)
1500 BOOL16 WINAPI GetScrollInfo16( HWND16 hwnd, INT16 nBar, LPSCROLLINFO info )
1502 return GetScrollInfo( WIN_Handle32(hwnd), nBar, info );
1506 /**************************************************************************
1507 * EnableScrollBar (USER.482)
1509 BOOL16 WINAPI EnableScrollBar16( HWND16 hwnd, INT16 nBar, UINT16 flags )
1511 return EnableScrollBar( WIN_Handle32(hwnd), nBar, flags );
1515 /**************************************************************************
1516 * GetShellWindow (USER.600)
1518 HWND16 WINAPI GetShellWindow16(void)
1520 return WIN_Handle16( GetShellWindow() );
1524 /**************************************************************************
1525 * GetForegroundWindow (USER.608)
1527 HWND16 WINAPI GetForegroundWindow16(void)
1529 return WIN_Handle16( GetForegroundWindow() );
1533 /**************************************************************************
1534 * SetForegroundWindow (USER.609)
1536 BOOL16 WINAPI SetForegroundWindow16( HWND16 hwnd )
1538 return SetForegroundWindow( WIN_Handle32(hwnd) );
1542 /**************************************************************************
1543 * DrawCaptionTemp (USER.657)
1545 BOOL16 WINAPI DrawCaptionTemp16( HWND16 hwnd, HDC16 hdc, const RECT16 *rect,
1546 HFONT16 hFont, HICON16 hIcon, LPCSTR str, UINT16 uFlags )
1548 RECT rect32;
1550 if (rect) CONV_RECT16TO32(rect,&rect32);
1552 return DrawCaptionTempA( WIN_Handle32(hwnd), hdc, rect ? &rect32 : NULL,
1553 hFont, hIcon, str, uFlags & 0x1f );
1557 /**************************************************************************
1558 * DrawCaption (USER.660)
1560 BOOL16 WINAPI DrawCaption16( HWND16 hwnd, HDC16 hdc, const RECT16 *rect, UINT16 flags )
1562 RECT rect32;
1564 if (rect) CONV_RECT16TO32( rect, &rect32 );
1566 return DrawCaption( WIN_Handle32(hwnd), hdc, rect ? &rect32 : NULL, flags );
1570 /**************************************************************************
1571 * GetMenuItemRect (USER.665)
1573 BOOL16 WINAPI GetMenuItemRect16( HWND16 hwnd, HMENU16 hMenu, UINT16 uItem,
1574 LPRECT16 rect)
1576 RECT r32;
1577 BOOL res;
1578 if (!rect) return FALSE;
1579 res = GetMenuItemRect( WIN_Handle32(hwnd), hMenu, uItem, &r32 );
1580 CONV_RECT32TO16( &r32, rect );
1581 return res;
1585 /**************************************************************************
1586 * SetWindowRgn (USER.668)
1588 INT16 WINAPI SetWindowRgn16( HWND16 hwnd, HRGN16 hrgn, BOOL16 redraw )
1590 return SetWindowRgn( WIN_Handle32(hwnd), hrgn, redraw );
1594 /**************************************************************************
1595 * MessageBoxIndirect (USER.827)
1597 INT16 WINAPI MessageBoxIndirect16( LPMSGBOXPARAMS16 msgbox )
1599 MSGBOXPARAMSA msgbox32;
1601 msgbox32.cbSize = msgbox->cbSize;
1602 msgbox32.hwndOwner = WIN_Handle32( msgbox->hwndOwner );
1603 msgbox32.hInstance = msgbox->hInstance;
1604 msgbox32.lpszText = MapSL(msgbox->lpszText);
1605 msgbox32.lpszCaption = MapSL(msgbox->lpszCaption);
1606 msgbox32.dwStyle = msgbox->dwStyle;
1607 msgbox32.lpszIcon = MapSL(msgbox->lpszIcon);
1608 msgbox32.dwContextHelpId = msgbox->dwContextHelpId;
1609 msgbox32.lpfnMsgBoxCallback = msgbox->lpfnMsgBoxCallback;
1610 msgbox32.dwLanguageId = msgbox->dwLanguageId;
1611 return MessageBoxIndirectA( &msgbox32 );