Fixed compilation of some more samples in Unicode mode.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18229 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -42,7 +42,7 @@ MyData g_data;
|
||||
bool MyApp::OnInit()
|
||||
{
|
||||
// Create the main frame window
|
||||
MyFrame *frame = new MyFrame((wxFrame *) NULL, "Validation Test", 50, 50, 300, 250);
|
||||
MyFrame *frame = new MyFrame((wxFrame *) NULL, _T("Validation Test"), 50, 50, 300, 250);
|
||||
|
||||
// Show the frame
|
||||
frame->Show(TRUE);
|
||||
@@ -53,29 +53,29 @@ bool MyApp::OnInit()
|
||||
}
|
||||
|
||||
// My frame constructor
|
||||
MyFrame::MyFrame(wxFrame *frame, const char *title, int x, int y, int w, int h)
|
||||
MyFrame::MyFrame(wxFrame *frame, const wxChar *title, int x, int y, int w, int h)
|
||||
: wxFrame(frame, -1, title, wxPoint(x, y), wxSize(w, h))
|
||||
{
|
||||
// Give it an icon
|
||||
#ifdef __WXMSW__
|
||||
SetIcon(wxIcon("mondrian"));
|
||||
SetIcon(wxIcon(_T("mondrian")));
|
||||
#endif
|
||||
#ifdef __X__
|
||||
SetIcon(wxIcon("aiai.xbm"));
|
||||
SetIcon(wxIcon(_T("aiai.xbm")));
|
||||
#endif
|
||||
|
||||
// Make a menubar
|
||||
wxMenu *file_menu = new wxMenu;
|
||||
|
||||
file_menu->Append(VALIDATE_TEST_DIALOG, "&Test dialog", "Show example dialog");
|
||||
file_menu->Append(VALIDATE_SILENT, "&Bell on error", "Toggle bell on error", TRUE);
|
||||
file_menu->Append(VALIDATE_TEST_DIALOG, _T("&Test dialog"), _T("Show example dialog"));
|
||||
file_menu->Append(VALIDATE_SILENT, _T("&Bell on error"), _T("Toggle bell on error"), TRUE);
|
||||
file_menu->AppendSeparator();
|
||||
file_menu->Append(wxID_EXIT, "E&xit");
|
||||
file_menu->Append(wxID_EXIT, _T("E&xit"));
|
||||
|
||||
file_menu->Check(VALIDATE_SILENT, !wxValidator::IsSilent());
|
||||
|
||||
wxMenuBar *menu_bar = new wxMenuBar;
|
||||
menu_bar->Append(file_menu, "File");
|
||||
menu_bar->Append(file_menu, _T("File"));
|
||||
SetMenuBar(menu_bar);
|
||||
|
||||
CreateStatusBar(1);
|
||||
@@ -88,7 +88,7 @@ void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
|
||||
|
||||
void MyFrame::OnTestDialog(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
MyDialog dialog(this, "Validation test dialog", wxPoint(100, 100), wxSize(340, 170));
|
||||
MyDialog dialog(this, _T("Validation test dialog"), wxPoint(100, 100), wxSize(340, 170));
|
||||
|
||||
dialog.ShowModal();
|
||||
}
|
||||
@@ -107,10 +107,10 @@ MyDialog::MyDialog( wxWindow *parent, const wxString& title,
|
||||
const wxPoint& pos, const wxSize& size, const long WXUNUSED(style) ) :
|
||||
wxDialog(parent, VALIDATE_DIALOG_ID, title, pos, size, wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL)
|
||||
{
|
||||
wxButton *but1 = new wxButton(this, wxID_OK, "OK", wxPoint(250, 10), wxSize(80, 30));
|
||||
(void)new wxButton(this, wxID_CANCEL, "Cancel", wxPoint(250, 60), wxSize(80, 30));
|
||||
wxButton *but1 = new wxButton(this, wxID_OK, _T("OK"), wxPoint(250, 10), wxSize(80, 30));
|
||||
(void)new wxButton(this, wxID_CANCEL, _T("Cancel"), wxPoint(250, 60), wxSize(80, 30));
|
||||
|
||||
(void)new wxTextCtrl(this, VALIDATE_TEXT, "",
|
||||
(void)new wxTextCtrl(this, VALIDATE_TEXT, _T(""),
|
||||
wxPoint(10, 10), wxSize(120, -1), 0, wxTextValidator(wxFILTER_ALPHA, &g_data.m_string));
|
||||
|
||||
SetBackgroundColour(wxColour(0,0,255));
|
||||
|
Reference in New Issue
Block a user