fixed animate in Unicode mode and removed use of deprecated methods
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21765 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -65,7 +65,7 @@ bool MyApp::OnInit()
|
||||
{
|
||||
// Create the main frame window
|
||||
|
||||
MyFrame* frame = new MyFrame((wxFrame *)NULL, -1, "Animation Demo",
|
||||
MyFrame* frame = new MyFrame((wxFrame *)NULL, -1, _T("Animation Demo"),
|
||||
wxPoint(-1, -1), wxSize(500, 400),
|
||||
wxDEFAULT_FRAME_STYLE);
|
||||
|
||||
@@ -79,16 +79,16 @@ bool MyApp::OnInit()
|
||||
// Make a menubar
|
||||
wxMenu *file_menu = new wxMenu;
|
||||
|
||||
file_menu->Append(ANITEST_OPEN, "&Open Animation...\tCtrl+O", "Open a GIF animation");
|
||||
file_menu->Append(ANITEST_QUIT, "&Exit\tAlt+X", "Quit the program");
|
||||
file_menu->Append(ANITEST_OPEN, _T("&Open Animation...\tCtrl+O"), _T("Open a GIF animation"));
|
||||
file_menu->Append(ANITEST_QUIT, _T("&Exit\tAlt+X"), _T("Quit the program"));
|
||||
|
||||
wxMenu *help_menu = new wxMenu;
|
||||
help_menu->Append(ANITEST_ABOUT, "&About\tF1");
|
||||
help_menu->Append(ANITEST_ABOUT, _T("&About\tF1"));
|
||||
|
||||
wxMenuBar *menu_bar = new wxMenuBar;
|
||||
|
||||
menu_bar->Append(file_menu, "&File");
|
||||
menu_bar->Append(help_menu, "&Help");
|
||||
menu_bar->Append(file_menu, _T("&File"));
|
||||
menu_bar->Append(help_menu, _T("&Help"));
|
||||
|
||||
// Associate the menu bar with the frame
|
||||
frame->SetMenuBar(menu_bar);
|
||||
@@ -139,14 +139,14 @@ void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
|
||||
|
||||
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event) )
|
||||
{
|
||||
(void)wxMessageBox("wxWindows 2 Animation Demo\n"
|
||||
"Author: Julian Smart (c) 2001\n",
|
||||
"About Animation Demo");
|
||||
(void)wxMessageBox(_T("wxWindows 2 Animation Demo\n")
|
||||
_T("Author: Julian Smart (c) 2001\n"),
|
||||
_T("About Animation Demo"));
|
||||
}
|
||||
|
||||
void MyFrame::OnOpen(wxCommandEvent& event)
|
||||
{
|
||||
wxFileDialog dialog(this, wxT("Please choose an animated GIF"),
|
||||
wxFileDialog dialog(this, _T("Please choose an animated GIF"),
|
||||
wxEmptyString, wxEmptyString, wxT("*.gif"), wxOPEN);
|
||||
if (dialog.ShowModal() == wxID_OK)
|
||||
{
|
||||
@@ -159,7 +159,7 @@ void MyFrame::OnOpen(wxCommandEvent& event)
|
||||
}
|
||||
else
|
||||
{
|
||||
wxMessageBox("Sorry, this animation was not a valid animated GIF.");
|
||||
wxMessageBox(_T("Sorry, this animation was not a valid animated GIF."));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user