]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/dialogs/dialogs.cpp
Added WXDLLEXPORT symbol for DynLib classes
[wxWidgets.git] / samples / dialogs / dialogs.cpp
index f1ae34272a92a253909dfdb48f6b918f92831d1e..2f194b38be18f2f3ea40541c7807964fbab21c5f 100644 (file)
@@ -242,9 +242,15 @@ void MyFrame::ChooseFontGeneric(wxCommandEvent& WXUNUSED(event) )
 
 void MyFrame::LogDialog(wxCommandEvent& event)
 {
-    wxLogMessage("This is some message - everything is ok so far.");
-    wxLogMessage("Another message...\n... this one is on multiple lines");
-    wxLogWarning("And then something went wrong!");
+    // calling wxYield() (as ~wxBusyCursor does) shouldn't result in messages
+    // being flushed -- test it
+    {
+        wxBusyCursor bc;
+        wxLogMessage("This is some message - everything is ok so far.");
+        wxLogMessage("Another message...\n... this one is on multiple lines");
+        wxLogWarning("And then something went wrong!");
+    }
+
     wxLogError("Intermediary error handler decided to abort.");
     wxLogError("The top level caller detected an unrecoverable error.");
 
@@ -531,9 +537,20 @@ void MyCanvas::OnPaint(wxPaintEvent& WXUNUSED(event) )
 MyModelessDialog::MyModelessDialog(wxWindow *parent)
                 : wxDialog(parent, -1, wxString("Modeless dialog"))
 {
-    (void)new wxButton(this, DIALOGS_MODELESS_BTN, "Press me");
-    Fit();
-    Centre();
+    wxBoxSizer *sizerTop = new wxBoxSizer(wxVERTICAL);
+
+    wxButton *btn = new wxButton(this, DIALOGS_MODELESS_BTN, "Press me");
+    wxCheckBox *check = new wxCheckBox(this, -1, "Should be disabled");
+    check->Disable();
+
+    sizerTop->Add(btn, 1, wxEXPAND | wxALL, 5);
+    sizerTop->Add(check, 1, wxEXPAND | wxALL, 5);
+
+    SetAutoLayout(TRUE);
+    SetSizer(sizerTop);
+
+    sizerTop->SetSizeHints(this);
+    sizerTop->Fit(this);
 }
 
 void MyModelessDialog::OnClose(wxCloseEvent& event)