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"
25 #include "stackframe.h"
27 /* handle <--> handle16 conversions */
28 #define HANDLE_16(h32) (LOWORD(h32))
29 #define HANDLE_32(h16) ((HANDLE)(ULONG_PTR)(h16))
31 static HWND16 hwndSysModal;
33 /* ### start build ### */
34 extern WORD CALLBACK WIN_CallTo16_word_wl(WNDENUMPROC16,WORD,LONG);
35 /* ### stop build ### */
43 /* callback for 16-bit window enumeration functions */
44 static BOOL CALLBACK wnd_enum_callback( HWND hwnd, LPARAM param )
46 const struct wnd_enum_info *info = (struct wnd_enum_info *)param;
47 return WIN_CallTo16_word_wl( info->proc, HWND_16(hwnd), info->param );
50 /* convert insert after window handle to 32-bit */
51 inline static HWND full_insert_after_hwnd( HWND16 hwnd )
53 HWND ret = WIN_Handle32( hwnd );
54 if (ret == (HWND)0xffff) ret = HWND_TOPMOST;
58 /**************************************************************************
61 INT16 WINAPI MessageBox16( HWND16 hwnd, LPCSTR text, LPCSTR title, UINT16 type )
63 return MessageBoxA( WIN_Handle32(hwnd), text, title, type );
67 /**************************************************************************
70 BOOL16 WINAPI KillTimer16( HWND16 hwnd, UINT16 id )
72 return KillTimer( WIN_Handle32(hwnd), id );
76 /**************************************************************************
77 * SetCapture (USER.18)
79 HWND16 WINAPI SetCapture16( HWND16 hwnd )
81 return HWND_16( SetCapture( WIN_Handle32(hwnd) ));
85 /**************************************************************************
86 * ReleaseCapture (USER.19)
88 BOOL16 WINAPI ReleaseCapture16(void)
90 return ReleaseCapture();
94 /**************************************************************************
97 HWND16 WINAPI SetFocus16( HWND16 hwnd )
99 return HWND_16( SetFocus( WIN_Handle32(hwnd) ));
103 /**************************************************************************
106 HWND16 WINAPI GetFocus16(void)
108 return HWND_16( GetFocus() );
112 /**************************************************************************
113 * RemoveProp (USER.24)
115 HANDLE16 WINAPI RemoveProp16( HWND16 hwnd, LPCSTR str )
117 return HANDLE_16(RemovePropA( WIN_Handle32(hwnd), str ));
121 /**************************************************************************
124 HANDLE16 WINAPI GetProp16( HWND16 hwnd, LPCSTR str )
126 return HANDLE_16(GetPropA( WIN_Handle32(hwnd), str ));
130 /**************************************************************************
133 BOOL16 WINAPI SetProp16( HWND16 hwnd, LPCSTR str, HANDLE16 handle )
135 return SetPropA( WIN_Handle32(hwnd), str, HANDLE_32(handle) );
139 /**************************************************************************
140 * ClientToScreen (USER.28)
142 void WINAPI ClientToScreen16( HWND16 hwnd, LPPOINT16 lppnt )
144 MapWindowPoints16( hwnd, 0, lppnt, 1 );
148 /**************************************************************************
149 * ScreenToClient (USER.29)
151 void WINAPI ScreenToClient16( HWND16 hwnd, LPPOINT16 lppnt )
153 MapWindowPoints16( 0, hwnd, lppnt, 1 );
157 /**************************************************************************
158 * WindowFromPoint (USER.30)
160 HWND16 WINAPI WindowFromPoint16( POINT16 pt )
164 CONV_POINT16TO32( &pt, &pt32 );
165 return HWND_16( WindowFromPoint( pt32 ) );
169 /**************************************************************************
172 BOOL16 WINAPI IsIconic16(HWND16 hwnd)
174 return IsIconic( WIN_Handle32(hwnd) );
178 /**************************************************************************
179 * GetWindowRect (USER.32)
181 void WINAPI GetWindowRect16( HWND16 hwnd, LPRECT16 rect )
185 GetWindowRect( WIN_Handle32(hwnd), &rect32 );
186 rect->left = rect32.left;
187 rect->top = rect32.top;
188 rect->right = rect32.right;
189 rect->bottom = rect32.bottom;
193 /**************************************************************************
194 * GetClientRect (USER.33)
196 void WINAPI GetClientRect16( HWND16 hwnd, LPRECT16 rect )
200 GetClientRect( WIN_Handle32(hwnd), &rect32 );
201 rect->left = rect32.left;
202 rect->top = rect32.top;
203 rect->right = rect32.right;
204 rect->bottom = rect32.bottom;
208 /**************************************************************************
209 * EnableWindow (USER.34)
211 BOOL16 WINAPI EnableWindow16( HWND16 hwnd, BOOL16 enable )
213 return EnableWindow( WIN_Handle32(hwnd), enable );
217 /**************************************************************************
218 * IsWindowEnabled (USER.35)
220 BOOL16 WINAPI IsWindowEnabled16(HWND16 hwnd)
222 return IsWindowEnabled( WIN_Handle32(hwnd) );
226 /**************************************************************************
227 * GetWindowText (USER.36)
229 INT16 WINAPI GetWindowText16( HWND16 hwnd, SEGPTR lpString, INT16 nMaxCount )
231 return SendMessage16( hwnd, WM_GETTEXT, nMaxCount, lpString );
235 /**************************************************************************
236 * SetWindowText (USER.37)
238 BOOL16 WINAPI SetWindowText16( HWND16 hwnd, SEGPTR lpString )
240 return SendMessage16( hwnd, WM_SETTEXT, 0, (LPARAM)lpString );
244 /**************************************************************************
245 * GetWindowTextLength (USER.38)
247 INT16 WINAPI GetWindowTextLength16( HWND16 hwnd )
249 return SendMessage16( hwnd, WM_GETTEXTLENGTH, 0, 0 );
253 /***********************************************************************
254 * BeginPaint (USER.39)
256 HDC16 WINAPI BeginPaint16( HWND16 hwnd, LPPAINTSTRUCT16 lps )
260 BeginPaint( WIN_Handle32(hwnd), &ps );
261 lps->hdc = HDC_16(ps.hdc);
262 lps->fErase = ps.fErase;
263 lps->rcPaint.top = ps.rcPaint.top;
264 lps->rcPaint.left = ps.rcPaint.left;
265 lps->rcPaint.right = ps.rcPaint.right;
266 lps->rcPaint.bottom = ps.rcPaint.bottom;
267 lps->fRestore = ps.fRestore;
268 lps->fIncUpdate = ps.fIncUpdate;
273 /***********************************************************************
276 BOOL16 WINAPI EndPaint16( HWND16 hwnd, const PAINTSTRUCT16* lps )
280 ps.hdc = HDC_32(lps->hdc);
281 return EndPaint( WIN_Handle32(hwnd), &ps );
285 /**************************************************************************
286 * ShowWindow (USER.42)
288 BOOL16 WINAPI ShowWindow16( HWND16 hwnd, INT16 cmd )
290 return ShowWindow( WIN_Handle32(hwnd), cmd );
294 /**************************************************************************
295 * CloseWindow (USER.43)
297 BOOL16 WINAPI CloseWindow16( HWND16 hwnd )
299 return CloseWindow( WIN_Handle32(hwnd) );
303 /**************************************************************************
306 BOOL16 WINAPI OpenIcon16( HWND16 hwnd )
308 return OpenIcon( WIN_Handle32(hwnd) );
312 /**************************************************************************
313 * BringWindowToTop (USER.45)
315 BOOL16 WINAPI BringWindowToTop16( HWND16 hwnd )
317 return BringWindowToTop( WIN_Handle32(hwnd) );
321 /**************************************************************************
322 * GetParent (USER.46)
324 HWND16 WINAPI GetParent16( HWND16 hwnd )
326 return HWND_16( GetParent( WIN_Handle32(hwnd) ));
330 /**************************************************************************
333 BOOL16 WINAPI IsWindow16( HWND16 hwnd )
335 CURRENT_STACK16->es = USER_HeapSel;
336 /* don't use WIN_Handle32 here, we don't care about the full handle */
337 return IsWindow( HWND_32(hwnd) );
341 /**************************************************************************
344 BOOL16 WINAPI IsChild16( HWND16 parent, HWND16 child )
346 return IsChild( WIN_Handle32(parent), WIN_Handle32(child) );
350 /**************************************************************************
351 * IsWindowVisible (USER.49)
353 BOOL16 WINAPI IsWindowVisible16( HWND16 hwnd )
355 return IsWindowVisible( WIN_Handle32(hwnd) );
359 /**************************************************************************
360 * FindWindow (USER.50)
362 HWND16 WINAPI FindWindow16( LPCSTR className, LPCSTR title )
364 return HWND_16( FindWindowA( className, title ));
368 /**************************************************************************
369 * DestroyWindow (USER.53)
371 BOOL16 WINAPI DestroyWindow16( HWND16 hwnd )
373 return DestroyWindow( WIN_Handle32(hwnd) );
377 /*******************************************************************
378 * EnumWindows (USER.54)
380 BOOL16 WINAPI EnumWindows16( WNDENUMPROC16 func, LPARAM lParam )
382 struct wnd_enum_info info;
386 return EnumWindows( wnd_enum_callback, (LPARAM)&info );
390 /**********************************************************************
391 * EnumChildWindows (USER.55)
393 BOOL16 WINAPI EnumChildWindows16( HWND16 parent, WNDENUMPROC16 func, LPARAM lParam )
395 struct wnd_enum_info info;
399 return EnumChildWindows( WIN_Handle32(parent), wnd_enum_callback, (LPARAM)&info );
403 /**************************************************************************
404 * MoveWindow (USER.56)
406 BOOL16 WINAPI MoveWindow16( HWND16 hwnd, INT16 x, INT16 y, INT16 cx, INT16 cy, BOOL16 repaint )
408 return MoveWindow( WIN_Handle32(hwnd), x, y, cx, cy, repaint );
412 /**************************************************************************
413 * GetClassName (USER.58)
415 INT16 WINAPI GetClassName16( HWND16 hwnd, LPSTR buffer, INT16 count )
417 return GetClassNameA( WIN_Handle32(hwnd), buffer, count );
421 /**************************************************************************
422 * SetActiveWindow (USER.59)
424 HWND16 WINAPI SetActiveWindow16( HWND16 hwnd )
426 return HWND_16( SetActiveWindow( WIN_Handle32(hwnd) ));
430 /**************************************************************************
431 * GetActiveWindow (USER.60)
433 HWND16 WINAPI GetActiveWindow16(void)
435 return HWND_16( GetActiveWindow() );
439 /**************************************************************************
440 * ScrollWindow (USER.61)
442 void WINAPI ScrollWindow16( HWND16 hwnd, INT16 dx, INT16 dy, const RECT16 *rect,
443 const RECT16 *clipRect )
445 RECT rect32, clipRect32;
447 if (rect) CONV_RECT16TO32( rect, &rect32 );
448 if (clipRect) CONV_RECT16TO32( clipRect, &clipRect32 );
449 ScrollWindow( WIN_Handle32(hwnd), dx, dy, rect ? &rect32 : NULL,
450 clipRect ? &clipRect32 : NULL );
454 /**************************************************************************
455 * SetScrollPos (USER.62)
457 INT16 WINAPI SetScrollPos16( HWND16 hwnd, INT16 nBar, INT16 nPos, BOOL16 redraw )
459 return SetScrollPos( WIN_Handle32(hwnd), nBar, nPos, redraw );
463 /**************************************************************************
464 * GetScrollPos (USER.63)
466 INT16 WINAPI GetScrollPos16( HWND16 hwnd, INT16 nBar )
468 return GetScrollPos( WIN_Handle32(hwnd), nBar );
472 /**************************************************************************
473 * SetScrollRange (USER.64)
475 void WINAPI SetScrollRange16( HWND16 hwnd, INT16 nBar, INT16 MinVal, INT16 MaxVal, BOOL16 redraw )
477 /* Invalid range -> range is set to (0,0) */
478 if ((INT)MaxVal - (INT)MinVal > 0x7fff) MinVal = MaxVal = 0;
479 SetScrollRange( WIN_Handle32(hwnd), nBar, MinVal, MaxVal, redraw );
483 /**************************************************************************
484 * GetScrollRange (USER.65)
486 BOOL16 WINAPI GetScrollRange16( HWND16 hwnd, INT16 nBar, LPINT16 lpMin, LPINT16 lpMax)
489 BOOL ret = GetScrollRange( WIN_Handle32(hwnd), nBar, &min, &max );
490 if (lpMin) *lpMin = min;
491 if (lpMax) *lpMax = max;
496 /**************************************************************************
499 HDC16 WINAPI GetDC16( HWND16 hwnd )
501 return HDC_16(GetDC( WIN_Handle32(hwnd) ));
505 /**************************************************************************
506 * GetWindowDC (USER.67)
508 HDC16 WINAPI GetWindowDC16( HWND16 hwnd )
510 return GetDCEx16( hwnd, 0, DCX_USESTYLE | DCX_WINDOW );
514 /**************************************************************************
515 * ReleaseDC (USER.68)
517 INT16 WINAPI ReleaseDC16( HWND16 hwnd, HDC16 hdc )
519 return (INT16)ReleaseDC( WIN_Handle32(hwnd), HDC_32(hdc) );
523 /**************************************************************************
524 * EndDialog (USER.88)
526 BOOL16 WINAPI EndDialog16( HWND16 hwnd, INT16 retval )
528 return EndDialog( WIN_Handle32(hwnd), retval );
532 /**************************************************************************
533 * GetDlgItem (USER.91)
535 HWND16 WINAPI GetDlgItem16( HWND16 hwndDlg, INT16 id )
537 return HWND_16( GetDlgItem( WIN_Handle32(hwndDlg), (UINT16) id ));
541 /**************************************************************************
542 * SetDlgItemText (USER.92)
544 void WINAPI SetDlgItemText16( HWND16 hwnd, INT16 id, SEGPTR lpString )
546 SendDlgItemMessage16( hwnd, id, WM_SETTEXT, 0, (LPARAM)lpString );
550 /**************************************************************************
551 * GetDlgItemText (USER.93)
553 INT16 WINAPI GetDlgItemText16( HWND16 hwnd, INT16 id, SEGPTR str, UINT16 len )
555 return (INT16)SendDlgItemMessage16( hwnd, id, WM_GETTEXT, len, (LPARAM)str );
559 /**************************************************************************
560 * SetDlgItemInt (USER.94)
562 void WINAPI SetDlgItemInt16( HWND16 hwnd, INT16 id, UINT16 value, BOOL16 fSigned )
564 SetDlgItemInt( WIN_Handle32(hwnd), (UINT)(UINT16)id,
565 (UINT)(fSigned ? (INT16) value : (UINT16) value), fSigned );
569 /**************************************************************************
570 * GetDlgItemInt (USER.95)
572 UINT16 WINAPI GetDlgItemInt16( HWND16 hwnd, INT16 id, BOOL16 *translated, BOOL16 fSigned )
577 if (translated) *translated = FALSE;
578 result = GetDlgItemInt( WIN_Handle32(hwnd), (UINT)(UINT16)id, &ok, fSigned );
582 if (((INT)result < -32767) || ((INT)result > 32767)) return 0;
586 if (result > 65535) return 0;
588 if (translated) *translated = TRUE;
589 return (UINT16)result;
593 /**************************************************************************
594 * CheckRadioButton (USER.96)
596 BOOL16 WINAPI CheckRadioButton16( HWND16 hwndDlg, UINT16 firstID,
597 UINT16 lastID, UINT16 checkID )
599 return CheckRadioButton( WIN_Handle32(hwndDlg), firstID, lastID, checkID );
603 /**************************************************************************
604 * CheckDlgButton (USER.97)
606 BOOL16 WINAPI CheckDlgButton16( HWND16 hwnd, INT16 id, UINT16 check )
608 SendDlgItemMessage16( hwnd, id, BM_SETCHECK16, check, 0 );
613 /**************************************************************************
614 * IsDlgButtonChecked (USER.98)
616 UINT16 WINAPI IsDlgButtonChecked16( HWND16 hwnd, UINT16 id )
618 return (UINT16)SendDlgItemMessage16( hwnd, id, BM_GETCHECK16, 0, 0 );
622 /**************************************************************************
623 * DlgDirSelect (USER.99)
625 BOOL16 WINAPI DlgDirSelect16( HWND16 hwnd, LPSTR str, INT16 id )
627 return DlgDirSelectEx16( hwnd, str, 128, id );
631 /**************************************************************************
632 * DlgDirList (USER.100)
634 INT16 WINAPI DlgDirList16( HWND16 hDlg, LPSTR spec, INT16 idLBox,
635 INT16 idStatic, UINT16 attrib )
637 /* according to Win16 docs, DDL_DRIVES should make DDL_EXCLUSIVE
638 * be set automatically (this is different in Win32, and
639 * DIALOG_DlgDirList sends Win32 messages to the control,
641 if (attrib & DDL_DRIVES) attrib |= DDL_EXCLUSIVE;
642 return DlgDirListA( WIN_Handle32(hDlg), spec, idLBox, idStatic, attrib );
646 /**************************************************************************
647 * SendDlgItemMessage (USER.101)
649 LRESULT WINAPI SendDlgItemMessage16( HWND16 hwnd, INT16 id, UINT16 msg,
650 WPARAM16 wParam, LPARAM lParam )
652 HWND16 hwndCtrl = GetDlgItem16( hwnd, id );
653 if (hwndCtrl) return SendMessage16( hwndCtrl, msg, wParam, lParam );
658 /**************************************************************************
659 * MapDialogRect (USER.103)
661 void WINAPI MapDialogRect16( HWND16 hwnd, LPRECT16 rect )
664 MapDialogRect( WIN_Handle32(hwnd), &rect32 );
665 rect->left = rect32.left;
666 rect->right = rect32.right;
667 rect->top = rect32.top;
668 rect->bottom = rect32.bottom;
672 /**************************************************************************
673 * FlashWindow (USER.105)
675 BOOL16 WINAPI FlashWindow16( HWND16 hwnd, BOOL16 bInvert )
677 return FlashWindow( WIN_Handle32(hwnd), bInvert );
681 /**************************************************************************
682 * WindowFromDC (USER.117)
684 HWND16 WINAPI WindowFromDC16( HDC16 hDC )
686 return HWND_16( WindowFromDC( HDC_32(hDC) ) );
690 /**************************************************************************
691 * UpdateWindow (USER.124)
693 void WINAPI UpdateWindow16( HWND16 hwnd )
695 RedrawWindow16( hwnd, NULL, 0, RDW_UPDATENOW | RDW_ALLCHILDREN );
699 /**************************************************************************
700 * InvalidateRect (USER.125)
702 void WINAPI InvalidateRect16( HWND16 hwnd, const RECT16 *rect, BOOL16 erase )
704 RedrawWindow16( hwnd, rect, 0, RDW_INVALIDATE | (erase ? RDW_ERASE : 0) );
708 /**************************************************************************
709 * InvalidateRgn (USER.126)
711 void WINAPI InvalidateRgn16( HWND16 hwnd, HRGN16 hrgn, BOOL16 erase )
713 RedrawWindow16( hwnd, NULL, hrgn, RDW_INVALIDATE | (erase ? RDW_ERASE : 0) );
717 /**************************************************************************
718 * ValidateRect (USER.127)
720 void WINAPI ValidateRect16( HWND16 hwnd, const RECT16 *rect )
722 RedrawWindow16( hwnd, rect, 0, RDW_VALIDATE | RDW_NOCHILDREN );
726 /**************************************************************************
727 * ValidateRgn (USER.128)
729 void WINAPI ValidateRgn16( HWND16 hwnd, HRGN16 hrgn )
731 RedrawWindow16( hwnd, NULL, hrgn, RDW_VALIDATE | RDW_NOCHILDREN );
735 /**************************************************************************
736 * GetClassWord (USER.129)
738 WORD WINAPI GetClassWord16( HWND16 hwnd, INT16 offset )
740 return GetClassWord( WIN_Handle32(hwnd), offset );
744 /**************************************************************************
745 * SetClassWord (USER.130)
747 WORD WINAPI SetClassWord16( HWND16 hwnd, INT16 offset, WORD newval )
749 return SetClassWord( WIN_Handle32(hwnd), offset, newval );
753 /**************************************************************************
754 * GetWindowWord (USER.133)
756 WORD WINAPI GetWindowWord16( HWND16 hwnd, INT16 offset )
758 return GetWindowWord( WIN_Handle32(hwnd), offset );
762 /**************************************************************************
763 * SetWindowWord (USER.134)
765 WORD WINAPI SetWindowWord16( HWND16 hwnd, INT16 offset, WORD newval )
767 return SetWindowWord( WIN_Handle32(hwnd), offset, newval );
771 /**************************************************************************
772 * OpenClipboard (USER.137)
774 BOOL16 WINAPI OpenClipboard16( HWND16 hwnd )
776 return OpenClipboard( WIN_Handle32(hwnd) );
780 /**************************************************************************
781 * GetClipboardOwner (USER.140)
783 HWND16 WINAPI GetClipboardOwner16(void)
785 return HWND_16( GetClipboardOwner() );
789 /**************************************************************************
790 * SetClipboardViewer (USER.147)
792 HWND16 WINAPI SetClipboardViewer16( HWND16 hwnd )
794 return HWND_16( SetClipboardViewer( WIN_Handle32(hwnd) ));
798 /**************************************************************************
799 * GetClipboardViewer (USER.148)
801 HWND16 WINAPI GetClipboardViewer16(void)
803 return HWND_16( GetClipboardViewer() );
807 /**************************************************************************
808 * ChangeClipboardChain (USER.149)
810 BOOL16 WINAPI ChangeClipboardChain16(HWND16 hwnd, HWND16 hwndNext)
812 return ChangeClipboardChain( WIN_Handle32(hwnd), WIN_Handle32(hwndNext) );
816 /**************************************************************************
817 * GetSystemMenu (USER.156)
819 HMENU16 WINAPI GetSystemMenu16( HWND16 hwnd, BOOL16 revert )
821 return HMENU_16(GetSystemMenu( WIN_Handle32(hwnd), revert ));
825 /**************************************************************************
828 HMENU16 WINAPI GetMenu16( HWND16 hwnd )
830 return HMENU_16(GetMenu( WIN_Handle32(hwnd) ));
834 /**************************************************************************
837 BOOL16 WINAPI SetMenu16( HWND16 hwnd, HMENU16 hMenu )
839 return SetMenu( WIN_Handle32(hwnd), HMENU_32(hMenu) );
843 /**************************************************************************
844 * DrawMenuBar (USER.160)
846 void WINAPI DrawMenuBar16( HWND16 hwnd )
848 DrawMenuBar( WIN_Handle32(hwnd) );
852 /**************************************************************************
853 * HiliteMenuItem (USER.162)
855 BOOL16 WINAPI HiliteMenuItem16( HWND16 hwnd, HMENU16 hMenu, UINT16 id, UINT16 wHilite )
857 return HiliteMenuItem( WIN_Handle32(hwnd), HMENU_32(hMenu), id, wHilite );
861 /**************************************************************************
862 * CreateCaret (USER.163)
864 void WINAPI CreateCaret16( HWND16 hwnd, HBITMAP16 bitmap, INT16 width, INT16 height )
866 CreateCaret( WIN_Handle32(hwnd), HBITMAP_32(bitmap), width, height );
870 /*****************************************************************
871 * DestroyCaret (USER.164)
873 void WINAPI DestroyCaret16(void)
879 /*****************************************************************
880 * SetCaretPos (USER.165)
882 void WINAPI SetCaretPos16( INT16 x, INT16 y )
888 /**************************************************************************
889 * HideCaret (USER.166)
891 void WINAPI HideCaret16( HWND16 hwnd )
893 HideCaret( WIN_Handle32(hwnd) );
897 /**************************************************************************
898 * ShowCaret (USER.167)
900 void WINAPI ShowCaret16( HWND16 hwnd )
902 ShowCaret( WIN_Handle32(hwnd) );
906 /*****************************************************************
907 * SetCaretBlinkTime (USER.168)
909 void WINAPI SetCaretBlinkTime16( UINT16 msecs )
911 SetCaretBlinkTime( msecs );
915 /*****************************************************************
916 * GetCaretBlinkTime (USER.169)
918 UINT16 WINAPI GetCaretBlinkTime16(void)
920 return GetCaretBlinkTime();
924 /**************************************************************************
925 * ArrangeIconicWindows (USER.170)
927 UINT16 WINAPI ArrangeIconicWindows16( HWND16 parent)
929 return ArrangeIconicWindows( WIN_Handle32(parent) );
933 /**************************************************************************
934 * SwitchToThisWindow (USER.172)
936 void WINAPI SwitchToThisWindow16( HWND16 hwnd, BOOL16 restore )
938 SwitchToThisWindow( WIN_Handle32(hwnd), restore );
942 /**************************************************************************
943 * KillSystemTimer (USER.182)
945 BOOL16 WINAPI KillSystemTimer16( HWND16 hwnd, UINT16 id )
947 return KillSystemTimer( WIN_Handle32(hwnd), id );
951 /*****************************************************************
952 * GetCaretPos (USER.183)
954 void WINAPI GetCaretPos16( LPPOINT16 pt16 )
957 if (GetCaretPos( &pt ))
965 /**************************************************************************
966 * SetSysModalWindow (USER.188)
968 HWND16 WINAPI SetSysModalWindow16( HWND16 hwnd )
970 HWND16 old = hwndSysModal;
976 /**************************************************************************
977 * GetSysModalWindow (USER.189)
979 HWND16 WINAPI GetSysModalWindow16(void)
985 /**************************************************************************
986 * GetUpdateRect (USER.190)
988 BOOL16 WINAPI GetUpdateRect16( HWND16 hwnd, LPRECT16 rect, BOOL16 erase )
993 if (!rect) return GetUpdateRect( WIN_Handle32(hwnd), NULL, erase );
994 ret = GetUpdateRect( WIN_Handle32(hwnd), &r, erase );
995 CONV_RECT32TO16( &r, rect );
1000 /**************************************************************************
1001 * ChildWindowFromPoint (USER.191)
1003 HWND16 WINAPI ChildWindowFromPoint16( HWND16 hwndParent, POINT16 pt )
1006 CONV_POINT16TO32( &pt, &pt32 );
1007 return HWND_16( ChildWindowFromPoint( WIN_Handle32(hwndParent), pt32 ));
1011 /**************************************************************************
1012 * DlgDirSelectComboBox (USER.194)
1014 BOOL16 WINAPI DlgDirSelectComboBox16( HWND16 hwnd, LPSTR str, INT16 id )
1016 return DlgDirSelectComboBoxEx16( hwnd, str, 128, id );
1020 /**************************************************************************
1021 * DlgDirListComboBox (USER.195)
1023 INT16 WINAPI DlgDirListComboBox16( HWND16 hDlg, LPSTR spec, INT16 idCBox,
1024 INT16 idStatic, UINT16 attrib )
1026 return DlgDirListComboBoxA( WIN_Handle32(hDlg), spec, idCBox, idStatic, attrib );
1030 /***********************************************************************
1031 * GetWindowTask (USER.224)
1033 HTASK16 WINAPI GetWindowTask16( HWND16 hwnd )
1035 DWORD tid = GetWindowThreadProcessId( HWND_32(hwnd), NULL );
1037 return HTASK_16(tid);
1040 /**********************************************************************
1041 * EnumTaskWindows (USER.225)
1043 BOOL16 WINAPI EnumTaskWindows16( HTASK16 hTask, WNDENUMPROC16 func, LPARAM lParam )
1045 struct wnd_enum_info info;
1046 DWORD tid = HTASK_32( hTask );
1048 if (!tid) return FALSE;
1050 info.param = lParam;
1051 return EnumThreadWindows( tid, wnd_enum_callback, (LPARAM)&info );
1055 /**************************************************************************
1056 * GetNextDlgGroupItem (USER.227)
1058 HWND16 WINAPI GetNextDlgGroupItem16( HWND16 hwndDlg, HWND16 hwndCtrl,
1061 return HWND_16( GetNextDlgGroupItem( WIN_Handle32(hwndDlg),
1062 WIN_Handle32(hwndCtrl), fPrevious ));
1066 /**************************************************************************
1067 * GetNextDlgTabItem (USER.228)
1069 HWND16 WINAPI GetNextDlgTabItem16( HWND16 hwndDlg, HWND16 hwndCtrl,
1072 return HWND_16( GetNextDlgTabItem( WIN_Handle32(hwndDlg),
1073 WIN_Handle32(hwndCtrl), fPrevious ));
1077 /**************************************************************************
1078 * GetTopWindow (USER.229)
1080 HWND16 WINAPI GetTopWindow16( HWND16 hwnd )
1082 return HWND_16( GetTopWindow( WIN_Handle32(hwnd) ));
1086 /**************************************************************************
1087 * GetNextWindow (USER.230)
1089 HWND16 WINAPI GetNextWindow16( HWND16 hwnd, WORD flag )
1091 if ((flag != GW_HWNDNEXT) && (flag != GW_HWNDPREV)) return 0;
1092 return GetWindow16( hwnd, flag );
1096 /**************************************************************************
1097 * SetWindowPos (USER.232)
1099 BOOL16 WINAPI SetWindowPos16( HWND16 hwnd, HWND16 hwndInsertAfter,
1100 INT16 x, INT16 y, INT16 cx, INT16 cy, WORD flags)
1102 return SetWindowPos( WIN_Handle32(hwnd), full_insert_after_hwnd(hwndInsertAfter),
1103 x, y, cx, cy, flags );
1107 /**************************************************************************
1108 * SetParent (USER.233)
1110 HWND16 WINAPI SetParent16( HWND16 hwndChild, HWND16 hwndNewParent )
1112 return HWND_16( SetParent( WIN_Handle32(hwndChild), WIN_Handle32(hwndNewParent) ));
1116 /**************************************************************************
1117 * GetCapture (USER.236)
1119 HWND16 WINAPI GetCapture16(void)
1121 return HWND_16( GetCapture() );
1125 /**************************************************************************
1126 * GetUpdateRgn (USER.237)
1128 INT16 WINAPI GetUpdateRgn16( HWND16 hwnd, HRGN16 hrgn, BOOL16 erase )
1130 return GetUpdateRgn( WIN_Handle32(hwnd), HRGN_32(hrgn), erase );
1134 /**************************************************************************
1135 * ExcludeUpdateRgn (USER.238)
1137 INT16 WINAPI ExcludeUpdateRgn16( HDC16 hdc, HWND16 hwnd )
1139 return ExcludeUpdateRgn( HDC_32(hdc), WIN_Handle32(hwnd) );
1143 /**************************************************************************
1144 * GetOpenClipboardWindow (USER.248)
1146 HWND16 WINAPI GetOpenClipboardWindow16(void)
1148 return HWND_16( GetOpenClipboardWindow() );
1152 /**************************************************************************
1153 * BeginDeferWindowPos (USER.259)
1155 HDWP16 WINAPI BeginDeferWindowPos16( INT16 count )
1157 return HDWP_16(BeginDeferWindowPos( count ));
1161 /**************************************************************************
1162 * DeferWindowPos (USER.260)
1164 HDWP16 WINAPI DeferWindowPos16( HDWP16 hdwp, HWND16 hwnd, HWND16 hwndAfter,
1165 INT16 x, INT16 y, INT16 cx, INT16 cy,
1168 return HDWP_16(DeferWindowPos( HDWP_32(hdwp), WIN_Handle32(hwnd),
1169 full_insert_after_hwnd(hwndAfter), x, y, cx, cy, flags ));
1173 /**************************************************************************
1174 * EndDeferWindowPos (USER.261)
1176 BOOL16 WINAPI EndDeferWindowPos16( HDWP16 hdwp )
1178 return EndDeferWindowPos(HDWP_32(hdwp));
1182 /**************************************************************************
1183 * GetWindow (USER.262)
1185 HWND16 WINAPI GetWindow16( HWND16 hwnd, WORD rel )
1187 return HWND_16( GetWindow( WIN_Handle32(hwnd), rel ) );
1191 /**************************************************************************
1192 * ShowOwnedPopups (USER.265)
1194 void WINAPI ShowOwnedPopups16( HWND16 owner, BOOL16 fShow )
1196 ShowOwnedPopups( WIN_Handle32(owner), fShow );
1200 /**************************************************************************
1201 * ShowScrollBar (USER.267)
1203 void WINAPI ShowScrollBar16( HWND16 hwnd, INT16 nBar, BOOL16 fShow )
1205 ShowScrollBar( WIN_Handle32(hwnd), nBar, fShow );
1209 /**************************************************************************
1210 * IsZoomed (USER.272)
1212 BOOL16 WINAPI IsZoomed16(HWND16 hwnd)
1214 return IsZoomed( WIN_Handle32(hwnd) );
1218 /**************************************************************************
1219 * GetDlgCtrlID (USER.277)
1221 INT16 WINAPI GetDlgCtrlID16( HWND16 hwnd )
1223 return GetDlgCtrlID( WIN_Handle32(hwnd) );
1227 /**************************************************************************
1228 * GetDesktopHwnd (USER.278)
1230 * Exactly the same thing as GetDesktopWindow(), but not documented.
1231 * Don't ask me why...
1233 HWND16 WINAPI GetDesktopHwnd16(void)
1235 return GetDesktopWindow16();
1239 /**************************************************************************
1240 * SetSystemMenu (USER.280)
1242 BOOL16 WINAPI SetSystemMenu16( HWND16 hwnd, HMENU16 hMenu )
1244 return SetSystemMenu( WIN_Handle32(hwnd), HMENU_32(hMenu) );
1248 /**************************************************************************
1249 * GetDesktopWindow (USER.286)
1251 HWND16 WINAPI GetDesktopWindow16(void)
1253 return HWND_16( GetDesktopWindow() );
1257 /**************************************************************************
1258 * GetLastActivePopup (USER.287)
1260 HWND16 WINAPI GetLastActivePopup16( HWND16 hwnd )
1262 return HWND_16( GetLastActivePopup( WIN_Handle32(hwnd) ));
1266 /**************************************************************************
1267 * RedrawWindow (USER.290)
1269 BOOL16 WINAPI RedrawWindow16( HWND16 hwnd, const RECT16 *rectUpdate,
1270 HRGN16 hrgnUpdate, UINT16 flags )
1275 CONV_RECT16TO32( rectUpdate, &r );
1276 return RedrawWindow(WIN_Handle32(hwnd), &r, HRGN_32(hrgnUpdate), flags);
1278 return RedrawWindow(WIN_Handle32(hwnd), NULL, HRGN_32(hrgnUpdate), flags);
1282 /**************************************************************************
1283 * LockWindowUpdate (USER.294)
1285 BOOL16 WINAPI LockWindowUpdate16( HWND16 hwnd )
1287 return LockWindowUpdate( WIN_Handle32(hwnd) );
1291 /**************************************************************************
1292 * ScrollWindowEx (USER.319)
1294 INT16 WINAPI ScrollWindowEx16( HWND16 hwnd, INT16 dx, INT16 dy,
1295 const RECT16 *rect, const RECT16 *clipRect,
1296 HRGN16 hrgnUpdate, LPRECT16 rcUpdate,
1299 RECT rect32, clipRect32, rcUpdate32;
1302 if (rect) CONV_RECT16TO32( rect, &rect32 );
1303 if (clipRect) CONV_RECT16TO32( clipRect, &clipRect32 );
1304 ret = ScrollWindowEx( WIN_Handle32(hwnd), dx, dy, rect ? &rect32 : NULL,
1305 clipRect ? &clipRect32 : NULL, HRGN_32(hrgnUpdate),
1306 (rcUpdate) ? &rcUpdate32 : NULL, flags );
1307 if (rcUpdate) CONV_RECT32TO16( &rcUpdate32, rcUpdate );
1312 /**************************************************************************
1313 * FillWindow (USER.324)
1315 void WINAPI FillWindow16( HWND16 hwndParent, HWND16 hwnd, HDC16 hdc, HBRUSH16 hbrush )
1319 GetClientRect( WIN_Handle32(hwnd), &rect );
1320 DPtoLP( HDC_32(hdc), (LPPOINT)&rect, 2 );
1321 CONV_RECT32TO16( &rect, &rc16 );
1322 PaintRect16( hwndParent, hwnd, hdc, hbrush, &rc16 );
1326 /**************************************************************************
1327 * PaintRect (USER.325)
1329 void WINAPI PaintRect16( HWND16 hwndParent, HWND16 hwnd, HDC16 hdc,
1330 HBRUSH16 hbrush, const RECT16 *rect)
1332 if (hbrush <= CTLCOLOR_STATIC)
1334 HWND parent = WIN_Handle32(hwndParent), hwnd32 = WIN_Handle32(hwnd);
1336 if (!parent) return;
1337 hbrush = SendMessageW( parent, WM_CTLCOLORMSGBOX + hbrush, (WPARAM)hdc, (LPARAM)hwnd32 );
1338 if (!hbrush) hbrush = DefWindowProcW( parent, WM_CTLCOLORMSGBOX + hbrush,
1339 (WPARAM)hdc, (LPARAM)hwnd32 );
1341 if (hbrush) FillRect16( hdc, rect, hbrush );
1345 /**************************************************************************
1346 * GetControlBrush (USER.326)
1348 HBRUSH16 WINAPI GetControlBrush16( HWND16 hwnd, HDC16 hdc, UINT16 ctlType )
1351 HWND hwnd32 = WIN_Handle32(hwnd);
1352 HWND parent = GetParent( hwnd32 );
1354 if (!parent) parent = hwnd32;
1355 ret = SendMessageW( parent, WM_CTLCOLORMSGBOX + ctlType, (WPARAM)hdc, (LPARAM)hwnd32 );
1356 if (!ret) ret = DefWindowProcW( parent, WM_CTLCOLORMSGBOX + ctlType,
1357 (WPARAM)hdc, (LPARAM)hwnd32 );
1362 /**************************************************************************
1363 * GetDCEx (USER.359)
1365 HDC16 WINAPI GetDCEx16( HWND16 hwnd, HRGN16 hrgnClip, DWORD flags )
1367 return HDC_16(GetDCEx(WIN_Handle32(hwnd), HRGN_32(hrgnClip), flags));
1371 /**************************************************************************
1372 * GetWindowPlacement (USER.370)
1374 BOOL16 WINAPI GetWindowPlacement16( HWND16 hwnd, WINDOWPLACEMENT16 *wp16 )
1376 WINDOWPLACEMENT wpl;
1378 wpl.length = sizeof(wpl);
1379 if (!GetWindowPlacement( WIN_Handle32(hwnd), &wpl )) return FALSE;
1380 wp16->length = sizeof(*wp16);
1381 wp16->flags = wpl.flags;
1382 wp16->showCmd = wpl.showCmd;
1383 CONV_POINT32TO16( &wpl.ptMinPosition, &wp16->ptMinPosition );
1384 CONV_POINT32TO16( &wpl.ptMaxPosition, &wp16->ptMaxPosition );
1385 CONV_RECT32TO16( &wpl.rcNormalPosition, &wp16->rcNormalPosition );
1390 /**************************************************************************
1391 * SetWindowPlacement (USER.371)
1393 BOOL16 WINAPI SetWindowPlacement16( HWND16 hwnd, const WINDOWPLACEMENT16 *wp16 )
1395 WINDOWPLACEMENT wpl;
1397 if (!wp16) return FALSE;
1398 wpl.length = sizeof(wpl);
1399 wpl.flags = wp16->flags;
1400 wpl.showCmd = wp16->showCmd;
1401 wpl.ptMinPosition.x = wp16->ptMinPosition.x;
1402 wpl.ptMinPosition.y = wp16->ptMinPosition.y;
1403 wpl.ptMaxPosition.x = wp16->ptMaxPosition.x;
1404 wpl.ptMaxPosition.y = wp16->ptMaxPosition.y;
1405 wpl.rcNormalPosition.left = wp16->rcNormalPosition.left;
1406 wpl.rcNormalPosition.top = wp16->rcNormalPosition.top;
1407 wpl.rcNormalPosition.right = wp16->rcNormalPosition.right;
1408 wpl.rcNormalPosition.bottom = wp16->rcNormalPosition.bottom;
1409 return SetWindowPlacement( WIN_Handle32(hwnd), &wpl );
1413 /**************************************************************************
1414 * ChildWindowFromPointEx (USER.399)
1416 HWND16 WINAPI ChildWindowFromPointEx16( HWND16 hwndParent, POINT16 pt, UINT16 uFlags)
1419 CONV_POINT16TO32( &pt, &pt32 );
1420 return HWND_16( ChildWindowFromPointEx( WIN_Handle32(hwndParent), pt32, uFlags ));
1424 /**************************************************************************
1425 * GetPriorityClipboardFormat (USER.402)
1427 INT16 WINAPI GetPriorityClipboardFormat16( UINT16 *list, INT16 count )
1431 for (i = 0; i < count; i++)
1432 if (IsClipboardFormatAvailable( list[i] )) return list[i];
1437 /**************************************************************************
1438 * TrackPopupMenu (USER.416)
1440 BOOL16 WINAPI TrackPopupMenu16( HMENU16 hMenu, UINT16 wFlags, INT16 x, INT16 y,
1441 INT16 nReserved, HWND16 hwnd, const RECT16 *lpRect )
1444 if (lpRect) CONV_RECT16TO32( lpRect, &r );
1445 return TrackPopupMenu( HMENU_32(hMenu), wFlags, x, y, nReserved,
1446 WIN_Handle32(hwnd), lpRect ? &r : NULL );
1450 /**************************************************************************
1451 * DlgDirSelectEx (USER.422)
1453 BOOL16 WINAPI DlgDirSelectEx16( HWND16 hwnd, LPSTR str, INT16 len, INT16 id )
1455 return DlgDirSelectExA( WIN_Handle32(hwnd), str, len, id );
1459 /**************************************************************************
1460 * DlgDirSelectComboBoxEx (USER.423)
1462 BOOL16 WINAPI DlgDirSelectComboBoxEx16( HWND16 hwnd, LPSTR str, INT16 len,
1465 return DlgDirSelectComboBoxExA( WIN_Handle32(hwnd), str, len, id );
1469 /**************************************************************************
1470 * FindWindowEx (USER.427)
1472 HWND16 WINAPI FindWindowEx16( HWND16 parent, HWND16 child, LPCSTR className, LPCSTR title )
1474 return HWND_16( FindWindowExA( WIN_Handle32(parent), WIN_Handle32(child),
1475 className, title ));
1479 /**************************************************************************
1480 * DrawAnimatedRects (USER.448)
1482 BOOL16 WINAPI DrawAnimatedRects16( HWND16 hwnd, INT16 idAni,
1483 const RECT16* lprcFrom, const RECT16* lprcTo )
1485 RECT rcFrom32, rcTo32;
1486 rcFrom32.left = lprcFrom->left;
1487 rcFrom32.top = lprcFrom->top;
1488 rcFrom32.right = lprcFrom->right;
1489 rcFrom32.bottom = lprcFrom->bottom;
1490 rcTo32.left = lprcTo->left;
1491 rcTo32.top = lprcTo->top;
1492 rcTo32.right = lprcTo->right;
1493 rcTo32.bottom = lprcTo->bottom;
1494 return DrawAnimatedRects( WIN_Handle32(hwnd), idAni, &rcFrom32, &rcTo32 );
1498 /***********************************************************************
1499 * GetInternalWindowPos (USER.460)
1501 UINT16 WINAPI GetInternalWindowPos16( HWND16 hwnd, LPRECT16 rectWnd, LPPOINT16 ptIcon )
1503 WINDOWPLACEMENT16 wndpl;
1505 if (!GetWindowPlacement16( hwnd, &wndpl )) return 0;
1506 if (rectWnd) *rectWnd = wndpl.rcNormalPosition;
1507 if (ptIcon) *ptIcon = wndpl.ptMinPosition;
1508 return wndpl.showCmd;
1512 /**************************************************************************
1513 * SetInternalWindowPos (USER.461)
1515 void WINAPI SetInternalWindowPos16( HWND16 hwnd, UINT16 showCmd, LPRECT16 rect, LPPOINT16 pt )
1522 rc32.left = rect->left;
1523 rc32.top = rect->top;
1524 rc32.right = rect->right;
1525 rc32.bottom = rect->bottom;
1532 SetInternalWindowPos( WIN_Handle32(hwnd), showCmd,
1533 rect ? &rc32 : NULL, pt ? &pt32 : NULL );
1537 /**************************************************************************
1538 * CalcChildScroll (USER.462)
1540 void WINAPI CalcChildScroll16( HWND16 hwnd, WORD scroll )
1542 CalcChildScroll( WIN_Handle32(hwnd), scroll );
1546 /**************************************************************************
1547 * ScrollChildren (USER.463)
1549 void WINAPI ScrollChildren16(HWND16 hwnd, UINT16 uMsg, WPARAM16 wParam, LPARAM lParam)
1551 ScrollChildren( WIN_Handle32(hwnd), uMsg, wParam, lParam );
1555 /**************************************************************************
1556 * DragDetect (USER.465)
1558 BOOL16 WINAPI DragDetect16( HWND16 hwnd, POINT16 pt )
1561 CONV_POINT16TO32( &pt, &pt32 );
1562 return DragDetect( WIN_Handle32(hwnd), pt32 );
1566 /**************************************************************************
1567 * SetScrollInfo (USER.475)
1569 INT16 WINAPI SetScrollInfo16( HWND16 hwnd, INT16 nBar, const SCROLLINFO *info, BOOL16 redraw )
1571 return SetScrollInfo( WIN_Handle32(hwnd), nBar, info, redraw );
1575 /**************************************************************************
1576 * GetScrollInfo (USER.476)
1578 BOOL16 WINAPI GetScrollInfo16( HWND16 hwnd, INT16 nBar, LPSCROLLINFO info )
1580 return GetScrollInfo( WIN_Handle32(hwnd), nBar, info );
1584 /**************************************************************************
1585 * EnableScrollBar (USER.482)
1587 BOOL16 WINAPI EnableScrollBar16( HWND16 hwnd, INT16 nBar, UINT16 flags )
1589 return EnableScrollBar( WIN_Handle32(hwnd), nBar, flags );
1593 /**************************************************************************
1594 * GetShellWindow (USER.600)
1596 HWND16 WINAPI GetShellWindow16(void)
1598 return HWND_16( GetShellWindow() );
1602 /**************************************************************************
1603 * GetForegroundWindow (USER.608)
1605 HWND16 WINAPI GetForegroundWindow16(void)
1607 return HWND_16( GetForegroundWindow() );
1611 /**************************************************************************
1612 * SetForegroundWindow (USER.609)
1614 BOOL16 WINAPI SetForegroundWindow16( HWND16 hwnd )
1616 return SetForegroundWindow( WIN_Handle32(hwnd) );
1620 /**************************************************************************
1621 * DrawCaptionTemp (USER.657)
1623 BOOL16 WINAPI DrawCaptionTemp16( HWND16 hwnd, HDC16 hdc, const RECT16 *rect,
1624 HFONT16 hFont, HICON16 hIcon, LPCSTR str, UINT16 uFlags )
1628 if (rect) CONV_RECT16TO32(rect,&rect32);
1630 return DrawCaptionTempA( WIN_Handle32(hwnd), HDC_32(hdc),
1631 rect ? &rect32 : NULL, HFONT_32(hFont),
1632 HICON_32(hIcon), str, uFlags & 0x1f );
1636 /**************************************************************************
1637 * DrawCaption (USER.660)
1639 BOOL16 WINAPI DrawCaption16( HWND16 hwnd, HDC16 hdc, const RECT16 *rect, UINT16 flags )
1643 if (rect) CONV_RECT16TO32( rect, &rect32 );
1645 return DrawCaption(WIN_Handle32(hwnd), HDC_32(hdc), rect ? &rect32 : NULL, flags);
1649 /**************************************************************************
1650 * GetMenuItemRect (USER.665)
1652 BOOL16 WINAPI GetMenuItemRect16( HWND16 hwnd, HMENU16 hMenu, UINT16 uItem,
1657 if (!rect) return FALSE;
1658 res = GetMenuItemRect( WIN_Handle32(hwnd), HMENU_32(hMenu), uItem, &r32 );
1659 CONV_RECT32TO16( &r32, rect );
1664 /**************************************************************************
1665 * SetWindowRgn (USER.668)
1667 INT16 WINAPI SetWindowRgn16( HWND16 hwnd, HRGN16 hrgn, BOOL16 redraw )
1669 return SetWindowRgn( WIN_Handle32(hwnd), HRGN_32(hrgn), redraw );
1673 /**************************************************************************
1674 * MessageBoxIndirect (USER.827)
1676 INT16 WINAPI MessageBoxIndirect16( LPMSGBOXPARAMS16 msgbox )
1678 MSGBOXPARAMSA msgbox32;
1680 msgbox32.cbSize = msgbox->cbSize;
1681 msgbox32.hwndOwner = WIN_Handle32( msgbox->hwndOwner );
1682 msgbox32.hInstance = MapHModuleSL(msgbox->hInstance);
1683 msgbox32.lpszText = MapSL(msgbox->lpszText);
1684 msgbox32.lpszCaption = MapSL(msgbox->lpszCaption);
1685 msgbox32.dwStyle = msgbox->dwStyle;
1686 msgbox32.lpszIcon = MapSL(msgbox->lpszIcon);
1687 msgbox32.dwContextHelpId = msgbox->dwContextHelpId;
1688 msgbox32.lpfnMsgBoxCallback = msgbox->lpfnMsgBoxCallback;
1689 msgbox32.dwLanguageId = msgbox->dwLanguageId;
1690 return MessageBoxIndirectA( &msgbox32 );