// Created: 04/01/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart and Markus Holzem
-// Licence: wxWindows license
+// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#include "wx/wx.h"
#endif
+#ifndef __WXMSW__
+#error Sorry, this sample is only appropriate under Windows.
+#endif
+
#include "wx/resource.h"
#include <ctype.h>
}
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
- EVT_MENU(RESOURCE_QUIT, MyFrame::OnQuit)
- EVT_MENU(RESOURCE_TEST1, MyFrame::OnTest1)
+ EVT_MENU(RESOURCE_QUIT, MyFrame::OnQuit)
+ EVT_MENU(RESOURCE_TEST1, MyFrame::OnTest1)
END_EVENT_TABLE()
// Define my frame constructor
void MyFrame::OnQuit(wxCommandEvent& event)
{
- Close(TRUE);
+ Close(TRUE);
}
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);
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)
+ EVT_BUTTON(wxID_OK, MyDialog::OnOk)
+ EVT_BUTTON(wxID_CANCEL, MyDialog::OnCancel)
END_EVENT_TABLE()