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
This commit is contained in:
Vadim Zeitlin
2003-07-06 22:00:28 +00:00
parent b19d494be1
commit e8e4025d1b

View 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;