From e8e4025d1b61ce05e082f9a2c08ac64bea6408ae Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 6 Jul 2003 22:00:28 +0000 Subject: [PATCH] check for wrong wxID_OK usage (patch 758388) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21725 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/msgdlg.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/msw/msgdlg.cpp b/src/msw/msgdlg.cpp index aa45cb9181..e5e4eb07bb 100644 --- a/src/msw/msgdlg.cpp +++ b/src/msw/msgdlg.cpp @@ -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; -- 2.45.2