]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/nativdlg/nativdlg.cpp
Fixed bug that caused crashes if wxGrid::OnSize was called before grid was properly...
[wxWidgets.git] / samples / nativdlg / nativdlg.cpp
index 32d24f893cec9a0d5bfe029a95610d8c757f401f..6d16c488af55e3db7ae3beff7d5449a87d37b84b 100644 (file)
 #include "wx/wx.h"
 #endif
 
+#ifndef __WXMSW__
+#error Sorry, this sample is only appropriate under Windows.
+#endif
+
 #include "wx/resource.h"
 
 #include <ctype.h>
@@ -91,7 +95,7 @@ void MyFrame::OnQuit(wxCommandEvent& event)
 void MyFrame::OnTest1(wxCommandEvent& event)
 {
       MyDialog *dialog = new MyDialog;
-      if (dialog->LoadNativeDialog(this, dialog1))
+      if (dialog->LoadNativeDialog(this, "dialog1"))
       {
 /*
         wxTextCtrl *text = (wxTextCtrl *)wxFindWindowByName("multitext3", dialog);
@@ -104,13 +108,6 @@ void MyFrame::OnTest1(wxCommandEvent& event)
       dialog->Close(TRUE);
 }
 
-bool MyFrame::OnClose(void)
-{
-  Show(FALSE);
-
-  return TRUE;
-}
-
 BEGIN_EVENT_TABLE(MyDialog, wxDialog)
        EVT_BUTTON(wxID_OK, MyDialog::OnOk)
        EVT_BUTTON(wxID_CANCEL, MyDialog::OnCancel)