]> git.saurik.com Git - wxWidgets.git/commitdiff
check for wrong wxID_OK usage (patch 758388)
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 6 Jul 2003 22:00:28 +0000 (22:00 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 6 Jul 2003 22:00:28 +0000 (22:00 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21725 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/msgdlg.cpp

index aa45cb91811ede79ebcac1104ebfb71121b7d2d7..e5e4eb07bbf91efd1b000ad5dc0e8140841275b7 100644 (file)
@@ -38,6 +38,15 @@ wxMessageDialog::wxMessageDialog(wxWindow *parent,
                                  long style,
                                  const wxPoint& WXUNUSED(pos))
 {
+#ifdef __WXDEBUG__
+    // check for common programming errors
+    if ( (style & wxID_OK) == wxID_OK )
+    {
+        // programmer probably confused wxID_OK with wxOK. Correct one is wxOK.
+        wxFAIL_MSG( _T("wxMessageBox: Did you mean wxOK (and not wxID_OK)?") );
+    }
+#endif // __WXDEBUG__
+
     m_caption = caption;
     m_message = message;
     m_dialogStyle = style;