MSI: fix radio button groups

Mike McCormack mike at codeweavers.com
Tue Jun 7 01:52:08 CDT 2005


ChangeLog:
* fix radio button groups. Don't add the WS_GROUP style to every window.
-------------- next part --------------
Index: dlls/msi/dialog.c
===================================================================
RCS file: /home/wine/wine/dlls/msi/dialog.c,v
retrieving revision 1.21
diff -u -p -r1.21 dialog.c
--- dlls/msi/dialog.c	6 Jun 2005 15:40:15 -0000	1.21
+++ dlls/msi/dialog.c	7 Jun 2005 06:53:41 -0000
@@ -282,7 +282,7 @@ static msi_control *msi_dialog_create_wi
     LPWSTR font = NULL, title = NULL;
     msi_control *control;
 
-    style |= WS_CHILD | WS_GROUP;
+    style |= WS_CHILD;
 
     control = HeapAlloc( GetProcessHeap(), 0,
                          sizeof *control + strlenW(name)*sizeof(WCHAR) );
@@ -617,20 +617,20 @@ static UINT msi_dialog_radiogroup_contro
     MSIQUERY *view = NULL;
     radio_button_group_descr group;
     MSIPACKAGE *package = dialog->package;
+    WNDPROC oldproc;
 
     prop = MSI_RecordGetString( rec, 9 );
 
     TRACE("%p %p %s\n", dialog, rec, debugstr_w( prop ));
 
     /* Create parent group box to hold radio buttons */
-    control = msi_dialog_add_control( dialog, rec, szButton, BS_OWNERDRAW );
+    control = msi_dialog_add_control( dialog, rec, szButton, BS_OWNERDRAW|WS_GROUP );
+    if( !control )
+        return ERROR_FUNCTION_FAILED;
 
-    if (control->hwnd)
-    {
-        WNDPROC oldproc = (WNDPROC) SetWindowLongPtrW(control->hwnd, GWLP_WNDPROC,
-            (LONG_PTR)MSIRadioGroup_WndProc);
-        SetPropW(control->hwnd, szButtonData, oldproc);
-    }
+    oldproc = (WNDPROC) SetWindowLongPtrW( control->hwnd, GWLP_WNDPROC,
+                                           (LONG_PTR)MSIRadioGroup_WndProc );
+    SetPropW(control->hwnd, szButtonData, oldproc);
 
     if( prop )
         control->property = strdupW( prop );


More information about the wine-patches mailing list