]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/msgdlg.cpp
changes for command line builds of osx-cocoa
[wxWidgets.git] / src / msw / msgdlg.cpp
index be6f508df69614b859973e069b9adb841233f0cb..9d91acab813b36b8c5d6710edc6910adb7e4a453 100644 (file)
@@ -98,15 +98,16 @@ wxMessageDialog::HookFunction(int code, WXWPARAM wParam, WXLPARAM lParam)
 
         wnd->SetHWND((HWND)wParam);
 
+        // update the labels if necessary: we need to do it before centering
+        // the dialog as this can change its size
+        if ( wnd->HasCustomLabels() )
+            wnd->AdjustButtonLabels();
+
         // centre the message box on its parent if requested
         if ( wnd->GetMessageDialogStyle() & wxCENTER )
             wnd->Center(); // center on parent
         //else: default behaviour, center on screen
 
-        // also update the labels if necessary
-        if ( wnd->HasCustomLabels() )
-            wnd->AdjustButtonLabels();
-
         // there seems to be no reason to leave it set
         wnd->SetHWND(NULL);
     }