X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e306597309a120f2ae91385c731a5cb2722c52aa..aede4ebb265b6537038e26131ebf07592ade460d:/samples/nativdlg/nativdlg.cpp diff --git a/samples/nativdlg/nativdlg.cpp b/samples/nativdlg/nativdlg.cpp index 6d16c488af..6ff49b5b0f 100644 --- a/samples/nativdlg/nativdlg.cpp +++ b/samples/nativdlg/nativdlg.cpp @@ -5,8 +5,8 @@ // Modified by: // Created: 04/01/98 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// #ifdef __GNUG__ @@ -28,8 +28,6 @@ #error Sorry, this sample is only appropriate under Windows. #endif -#include "wx/resource.h" - #include #include "nativdlg.h" #include "resource.h" @@ -47,7 +45,7 @@ MyApp::MyApp() bool MyApp::OnInit(void) { // Create the main frame window - frame = new MyFrame(NULL, -1, "wxWindows Native Dialog Sample", wxPoint(0, 0), wxSize(300, 250)); + frame = new MyFrame(NULL, -1, _T("wxWindows Native Dialog Sample"), wxPoint(0, 0), wxSize(300, 250)); // Give it a status line frame->CreateStatusBar(2); @@ -55,18 +53,18 @@ bool MyApp::OnInit(void) // Make a menubar wxMenu *file_menu = new wxMenu; - file_menu->Append(RESOURCE_TEST1, "&Dialog box test", "Test dialog box resource"); - file_menu->Append(RESOURCE_QUIT, "E&xit", "Quit program"); + file_menu->Append(RESOURCE_TEST1, _T("&Dialog box test"), _T("Test dialog box resource")); + file_menu->Append(RESOURCE_QUIT, _T("E&xit"), _T("Quit program")); wxMenuBar *menu_bar = new wxMenuBar; - menu_bar->Append(file_menu, "&File"); + menu_bar->Append(file_menu, _T("&File")); // Associate the menu bar with the frame frame->SetMenuBar(menu_bar); // Make a panel - frame->panel = new wxWindow(frame, -1, wxPoint(0, 0), wxSize(400, 400), 0, "MyMainFrame"); + frame->panel = new wxWindow(frame, -1, wxPoint(0, 0), wxSize(400, 400), 0, _T("MyMainFrame")); frame->Show(TRUE); // Return the main frame window @@ -76,8 +74,8 @@ bool MyApp::OnInit(void) } 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 @@ -89,19 +87,14 @@ MyFrame::MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title, c 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, _T("dialog1"))) { -/* - wxTextCtrl *text = (wxTextCtrl *)wxFindWindowByName("multitext3", dialog); - if (text) - text->SetValue("wxWindows resource demo"); -*/ dialog->SetModal(TRUE); dialog->ShowModal(); } @@ -109,8 +102,8 @@ void MyFrame::OnTest1(wxCommandEvent& event) } 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()