]> git.saurik.com Git - wxWidgets.git/commitdiff
we can avoid 2-step construction now that setting wxDIALOG_EX_CONTEXTHELP after windo...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 11 Jun 2006 22:46:07 +0000 (22:46 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 11 Jun 2006 22:46:07 +0000 (22:46 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39680 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/help/demo.cpp

index fab737dec30feb439d93890923e150dbef1d327b..34fd0eb0f802f6cc099d8afe861957de41b17c41 100644 (file)
@@ -677,14 +677,12 @@ BEGIN_EVENT_TABLE(MyModalDialog, wxDialog)
 END_EVENT_TABLE()
 
 MyModalDialog::MyModalDialog(wxWindow *parent)
-             : wxDialog()
+             : wxDialog(parent, wxID_ANY, wxString(_T("Modal dialog")))
 {
-    // Add the context-sensitive help button on the caption for MSW
-#ifdef __WXMSW__
+    // Add the context-sensitive help button on the caption for the platforms
+    // which support it (currently MSW only)
     SetExtraStyle(wxDIALOG_EX_CONTEXTHELP);
-#endif
 
-    wxDialog::Create(parent, wxID_ANY, wxString(_T("Modal dialog")));
 
     wxBoxSizer *sizerTop = new wxBoxSizer(wxVERTICAL);
     wxBoxSizer *sizerRow = new wxBoxSizer(wxHORIZONTAL);