]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/msgdlg.h
fix virtual function hiding warnings
[wxWidgets.git] / include / wx / msgdlg.h
index 7c372cff6fd35a06c88bcdf173ce1ec96460c35a..7c4329fa39c33755b9c16173932968fee44ad9c2 100644 (file)
@@ -153,20 +153,14 @@ public:
         wxASSERT_MSG( (style & wxID_OK) != wxID_OK,
                       "wxMessageBox: Did you mean wxOK (and not wxID_OK)?" );
 
-        if ((style & wxNO) == 0)
-            wxASSERT_MSG( !(style & wxNO_DEFAULT),
-                          "wxNO_DEFAULT is invalid without wxNO" );
-
-        if ((style & wxCANCEL) == 0)
-            wxASSERT_MSG( !(style & wxCANCEL_DEFAULT),
-                          "wxCANCEL_DEFAULT is invalid without wxCANCEL" );
-
-        if ((style & wxCANCEL_DEFAULT) != 0)
-            wxASSERT_MSG( !(style & wxNO_DEFAULT),
-                          "only one default button can be specified" );
-        if ((style & wxNO_DEFAULT) != 0)
-            wxASSERT_MSG( !(style & wxCANCEL_DEFAULT),
-                          "only one default button can be specified" );
+        if ((style & wxNO_DEFAULT) != 0 && (style & wxNO) == 0)
+            wxFAIL_MSG("wxNO_DEFAULT is invalid without wxNO");
+
+        if ((style & wxCANCEL_DEFAULT) != 0 && (style & wxCANCEL) == 0)
+            wxFAIL_MSG("wxCANCEL_DEFAULT is invalid without wxCANCEL");
+
+        if ((style & wxCANCEL_DEFAULT) != 0 && (style & wxNO_DEFAULT) != 0)
+            wxFAIL_MSG("only one default button can be specified");
 #endif
 
         m_dialogStyle = style;
@@ -192,7 +186,7 @@ protected:
              m_caption;
     long m_dialogStyle;
 
-    DECLARE_NO_COPY_CLASS(wxMessageDialogBase)
+    wxDECLARE_NO_COPY_CLASS(wxMessageDialogBase);
 };
 
 // this is a helper class for native wxMessageDialog implementations which need
@@ -296,7 +290,7 @@ private:
              m_ok,
              m_cancel;
 
-    DECLARE_NO_COPY_CLASS(wxMessageDialogWithCustomLabels)
+    wxDECLARE_NO_COPY_CLASS(wxMessageDialogWithCustomLabels);
 };
 
 #endif // ports needing wxMessageDialogWithCustomLabels