X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9f84eccdeaf8e3706f7861ce19da3a256814d83e..7a0a389e1910d16d39b638a2257d19fca5ec1f15:/samples/config/conftest.cpp diff --git a/samples/config/conftest.cpp b/samples/config/conftest.cpp index 0b8679bade..112e79056d 100644 --- a/samples/config/conftest.cpp +++ b/samples/config/conftest.cpp @@ -95,7 +95,7 @@ bool MyApp::OnInit() // of the config file/registry key and must be set before the first call // to Get() if you want to override the default values (the application // name is the name of the executable and the vendor name is the same) - SetVendorName(_T("wxWindows")); + SetVendorName(_T("wxWidgets")); SetAppName(_T("conftest")); // not needed, it's the default value wxConfigBase *pConfig = wxConfigBase::Get(); @@ -114,7 +114,7 @@ bool MyApp::OnInit() // create the main program window MyFrame *frame = new MyFrame; - frame->Show(TRUE); + frame->Show(true); SetTopWindow(frame); // use our config object... @@ -126,7 +126,7 @@ bool MyApp::OnInit() wxICON_INFORMATION | wxOK); } - return TRUE; + return true; } int MyApp::OnExit() @@ -145,7 +145,7 @@ int MyApp::OnExit() // main frame ctor MyFrame::MyFrame() - : wxFrame((wxFrame *) NULL, -1, _T("wxConfig Demo")) + : wxFrame((wxFrame *) NULL, wxID_ANY, _T("wxConfig Demo")) { // menu wxMenu *file_menu = new wxMenu; @@ -159,14 +159,16 @@ MyFrame::MyFrame() menu_bar->Append(file_menu, _T("&File")); SetMenuBar(menu_bar); +#if wxUSE_STATUSBAR CreateStatusBar(); +#endif // wxUSE_STATUSBAR // child controls wxPanel *panel = new wxPanel(this); - (void)new wxStaticText(panel, -1, _T("These controls remember their values!"), + (void)new wxStaticText(panel, wxID_ANY, _T("These controls remember their values!"), wxPoint(10, 10), wxSize(300, 20)); - m_text = new wxTextCtrl(panel, -1, _T(""), wxPoint(10, 40), wxSize(300, 20)); - m_check = new wxCheckBox(panel, -1, _T("show welcome message box at startup"), + m_text = new wxTextCtrl(panel, wxID_ANY, _T(""), wxPoint(10, 40), wxSize(300, 20)); + m_check = new wxCheckBox(panel, wxID_ANY, _T("show welcome message box at startup"), wxPoint(10, 70), wxSize(300, 20)); // restore the control's values from the config @@ -209,12 +211,12 @@ MyFrame::MyFrame() void MyFrame::OnQuit(wxCommandEvent&) { - Close(TRUE); + Close(true); } void MyFrame::OnAbout(wxCommandEvent&) { - wxMessageBox(_T("wxConfig demo\n© 1998-2001 Vadim Zeitlin"), _T("About"), + wxMessageBox(_T("wxConfig demo\n(c) 1998-2001 Vadim Zeitlin"), _T("About"), wxICON_INFORMATION | wxOK); }