git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36960 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2006-01-18 12:26:08 +00:00
parent 2c1957beb8
commit ff96483989

View File

@@ -113,14 +113,14 @@ IMPLEMENT_APP_NO_MAIN(MyApp)
CMainWindow::CMainWindow() CMainWindow::CMainWindow()
{ {
LoadAccelTable( "MainAccelTable" ); LoadAccelTable( _T("MainAccelTable") );
Create( NULL, "Hello Foundation Application", Create( NULL, _T("Hello Foundation Application"),
WS_OVERLAPPEDWINDOW, rectDefault, NULL, "MainMenu" ); WS_OVERLAPPEDWINDOW, rectDefault, NULL, _T("MainMenu") );
} }
void CMainWindow::OnPaint() void CMainWindow::OnPaint()
{ {
CString s = "Hello, Windows!"; CString s = _T("Hello, Windows!");
CPaintDC dc( this ); CPaintDC dc( this );
CRect rect; CRect rect;
@@ -134,13 +134,13 @@ void CMainWindow::OnPaint()
void CMainWindow::OnAbout() void CMainWindow::OnAbout()
{ {
CDialog about( "AboutBox", this ); CDialog about( _T("AboutBox"), this );
about.DoModal(); about.DoModal();
} }
void CMainWindow::OnTest() void CMainWindow::OnTest()
{ {
wxMessageBox("This is a wxWidgets message box.\nWe're about to create a new wxWidgets frame.", "wxWidgets", wxOK); wxMessageBox(_T("This is a wxWidgets message box.\nWe're about to create a new wxWidgets frame."), _T("wxWidgets"), wxOK);
wxGetApp().CreateFrame(); wxGetApp().CreateFrame();
} }
@@ -171,7 +171,7 @@ BOOL CTheApp::InitInstance()
wxSetInstance(m_hInstance); wxSetInstance(m_hInstance);
wxApp::m_nCmdShow = m_nCmdShow; wxApp::m_nCmdShow = m_nCmdShow;
int argc = 0; int argc = 0;
char **argv = NULL; wxChar **argv = NULL;
wxEntryStart(argc, argv); wxEntryStart(argc, argv);
if ( !wxTheApp || !wxTheApp->CallOnInit() ) if ( !wxTheApp || !wxTheApp->CallOnInit() )
return FALSE; return FALSE;
@@ -241,10 +241,10 @@ bool MyApp::OnInit()
wxFrame *MyApp::CreateFrame() wxFrame *MyApp::CreateFrame()
{ {
MyChild *subframe = new MyChild(NULL, "Canvas Frame", wxPoint(10, 10), wxSize(300, 300), MyChild *subframe = new MyChild(NULL, _T("Canvas Frame"), wxPoint(10, 10), wxSize(300, 300),
wxDEFAULT_FRAME_STYLE); wxDEFAULT_FRAME_STYLE);
subframe->SetTitle("wxWidgets canvas frame"); subframe->SetTitle(_T("wxWidgets canvas frame"));
// Give it a status line // Give it a status line
subframe->CreateStatusBar(); subframe->CreateStatusBar();
@@ -252,12 +252,12 @@ wxFrame *MyApp::CreateFrame()
// Make a menubar // Make a menubar
wxMenu *file_menu = new wxMenu; wxMenu *file_menu = new wxMenu;
file_menu->Append(HELLO_NEW, "&New MFC Window"); file_menu->Append(HELLO_NEW, _T("&New MFC Window"));
file_menu->Append(HELLO_QUIT, "&Close"); file_menu->Append(HELLO_QUIT, _T("&Close"));
wxMenuBar *menu_bar = new wxMenuBar; 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 // Associate the menu bar with the frame
subframe->SetMenuBar(menu_bar); subframe->SetMenuBar(menu_bar);
@@ -302,7 +302,7 @@ void MyCanvas::OnPaint(wxPaintEvent& WXUNUSED(event))
dc.DrawEllipse(250, 250, 100, 50); dc.DrawEllipse(250, 250, 100, 50);
dc.DrawLine(50, 230, 200, 230); dc.DrawLine(50, 230, 200, 230);
dc.DrawText("This is a test string", 50, 230); dc.DrawText(_T("This is a test string"), 50, 230);
} }
// This implements a tiny doodling program! Drag the mouse using // This implements a tiny doodling program! Drag the mouse using