]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/msgdlgg.cpp
Fixed crash caused by A=B?C:D used for returning wxObject derived type.
[wxWidgets.git] / src / generic / msgdlgg.cpp
index 1c498768e16abd7d92ce8aff04df5821561129ea..f63df3e469f0d4cf3f5944e25864d288920ea9b5 100644 (file)
@@ -9,10 +9,6 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma implementation "msgdlgg.h"
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
     #include "wx/icon.h"
     #include "wx/sizer.h"
     #include "wx/app.h"
+    #include "wx/settings.h"
 #endif
 
 #include <stdio.h>
 #include <string.h>
 
-#include "wx/generic/msgdlgg.h"
+#define __WX_COMPILING_MSGDLGG_CPP__ 1
+#include "wx/msgdlg.h"
 #include "wx/artprov.h"
-#include "wx/settings.h"
 
 #if wxUSE_STATLINE
-  #include "wx/statline.h"
+    #include "wx/statline.h"
 #endif
 
 // ----------------------------------------------------------------------------
@@ -73,6 +70,7 @@ wxGenericMessageDialog::wxGenericMessageDialog( wxWindow *parent,
 
     wxBoxSizer *icon_text = new wxBoxSizer( wxHORIZONTAL );
 
+#if wxUSE_STATBMP
     // 1) icon
     if (style & wxICON_MASK)
     {
@@ -105,11 +103,14 @@ wxGenericMessageDialog::wxGenericMessageDialog( wxWindow *parent,
         else
             icon_text->Add( icon, 0, wxCENTER );
     }
+#endif // wxUSE_STATBMP
 
+#if wxUSE_STATTEXT
     // 2) text
     icon_text->Add( CreateTextSizer( message ), 0, wxALIGN_CENTER | wxLEFT, 10 );
 
     topsizer->Add( icon_text, 1, wxCENTER | wxLEFT|wxRIGHT|wxTOP, 10 );
+#endif // wxUSE_STATTEXT
 
 #if wxUSE_STATLINE
     // 3) static line
@@ -159,4 +160,3 @@ void wxGenericMessageDialog::OnCancel(wxCommandEvent& WXUNUSED(event))
 }
 
 #endif // wxUSE_MSGDLG && !defined(__WXGTK20__)
-