Fix a few 16-bit specific bugs

Joshua Thielen thielen at netprince.net
Fri Nov 9 07:00:07 CST 2001


Hello,

This gets patch gets check and text boxes working in finale.

Modified Files:
wine/dlls/user/wnd16.c

Change Log:
Changed BM_  messages SETCHECK and GETCHECK to SETCHECK16 and GETCHECK16 
in CheckDlgItem16 and IsDlgItemChecked16.
Casted UINT16 value to UINT or INT depending on sign in SetDlgItemInt16.

Joshua Thielen
-------------- next part --------------
Index: wine/dlls/user/wnd16.c
===================================================================
RCS file: /home/wine/wine/dlls/user/wnd16.c,v
retrieving revision 1.1
diff -u -r1.1 wnd16.c
--- wine/dlls/user/wnd16.c	2001/09/19 20:37:05	1.1
+++ wine/dlls/user/wnd16.c	2001/11/09 11:07:41
@@ -467,7 +467,8 @@
  */
 void WINAPI SetDlgItemInt16( HWND16 hwnd, INT16 id, UINT16 value, BOOL16 fSigned )
 {
-    SetDlgItemInt( WIN_Handle32(hwnd), (UINT)(UINT16)id, value, fSigned );
+    SetDlgItemInt( WIN_Handle32(hwnd), (UINT)(UINT16)id, 
+             (UINT)(fSigned ? (INT16) value : (UINT16) value), fSigned );
 }
 
 
@@ -510,7 +511,7 @@
  */
 BOOL16 WINAPI CheckDlgButton16( HWND16 hwnd, INT16 id, UINT16 check )
 {
-    SendDlgItemMessage16( hwnd, id, BM_SETCHECK, check, 0 );
+    SendDlgItemMessage16( hwnd, id, BM_SETCHECK16, check, 0 );
     return TRUE;
 }
 
@@ -520,7 +521,7 @@
  */
 UINT16 WINAPI IsDlgButtonChecked16( HWND16 hwnd, UINT16 id )
 {
-    return (UINT16)SendDlgItemMessage16( hwnd, id, BM_GETCHECK, 0, 0 );
+    return (UINT16)SendDlgItemMessage16( hwnd, id, BM_GETCHECK16, 0, 0 );
 }
 
 


More information about the wine-patches mailing list