X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/67a9999283b942053259fa418fe994eab8dd0b3b..2458d90b1d5a26dc667c2deac63e499570744f5f:/demos/dbbrowse/dbbrowse.cpp diff --git a/demos/dbbrowse/dbbrowse.cpp b/demos/dbbrowse/dbbrowse.cpp index 28eafd9a98..dba13513bb 100644 --- a/demos/dbbrowse/dbbrowse.cpp +++ b/demos/dbbrowse/dbbrowse.cpp @@ -26,6 +26,8 @@ #ifndef WX_PRECOMP #include "wx/wx.h" #endif + +#include "wx/stockitem.h" //---------------------------------------------------------------------------------------- #ifndef __WXMSW__ #include "bitmaps/logo.xpm" @@ -39,9 +41,9 @@ //-- Some Global Vars for this file ------------------------------------------------------ //---------------------------------------------------------------------------------------- BEGIN_EVENT_TABLE(MainFrame, wxFrame) - EVT_MENU(QUIT, MainFrame::OnQuit) // Program End - EVT_MENU(ABOUT, MainFrame::OnAbout) // Program Discription - EVT_MENU(HELP, MainFrame::OnHelp) // Program Help + EVT_MENU(wxID_EXIT, MainFrame::OnQuit) // Program End + EVT_MENU(wxID_ABOUT, MainFrame::OnAbout) // Program Discription + EVT_MENU(wxID_HELP, MainFrame::OnHelp) // Program Help END_EVENT_TABLE() //---------------------------------------------------------------------------------------- @@ -97,14 +99,14 @@ bool MainApp::OnInit(void) // Does everything needed for a program start // Win-Registry : Workplace\HKEY_CURRENT_USERS\Software\%GetVendorName()\%GetAppName() //--------------------------------------------------------------------------------------- SetVendorName(_T("mj10777")); // Needed to get Configuration Information - SetAppName(_T("DBBrowse")); // "" , also needed for s_LangHelp + SetAppName(_T("DBBrowse")); // "" , also needed for s_LangHelp //--------------------------------------------------------------------------------------- // we're using wxConfig's "create-on-demand" feature: it will create the // config object when it's used for the first time. It has a number of // advantages compared with explicitly creating our wxConfig: // 1) we don't pay for it if we don't use it // 2) there is no danger to create it twice - + // application and vendor name are used by wxConfig to construct the name // 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 @@ -120,7 +122,7 @@ bool MainApp::OnInit(void) // Does everything needed for a program start { Temp0.Empty(); p_ProgramCfg->Read(_T("/Local/langid"),&Temp0); // >const char *langid< can't be used here - if (Temp0 == _T("")) + if (Temp0.empty()) langid = _T("std"); // Standard language is "std" = english else langid = Temp0; @@ -185,7 +187,7 @@ bool MainApp::OnInit(void) // Does everything needed for a program start Temp0.Printf(_T("%s - %s"),GetAppName().c_str(),GetVendorName().c_str()); frame = new MainFrame((wxFrame *) NULL,(wxChar *) Temp0.c_str(),wxPoint(x,y),wxSize(w,h)); //--------------------------------------------------------------------------------------- - // Set the Backgroundcolour (only need if your are NOT using wxSYS_COLOUR_BACKGROUND) + // Set the Backgroundcolour (only needed if you are NOT using wxSYS_COLOUR_BACKGROUND) frame->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_BACKGROUND)); // frame->SetBackgroundColour(wxColour(255, 255, 255)); // frame->SetBackgroundColour(* wxWHITE); @@ -206,12 +208,12 @@ bool MainApp::OnInit(void) // Does everything needed for a program start // Make a menubar wxMenu *file_menu = new wxMenu; wxMenu *help_menu = new wxMenu; - - help_menu->Append(HELP, _("&Help")); + + help_menu->Append(wxID_HELP, wxGetStockLabel(wxID_HELP)); help_menu->AppendSeparator(); - help_menu->Append(ABOUT, _("&About")); - file_menu->Append(QUIT, _("E&xit")); - + help_menu->Append(wxID_ABOUT, _("&About")); + file_menu->Append(wxID_EXIT, wxGetStockLabel(wxID_EXIT)); + wxMenuBar *menu_bar = new wxMenuBar; menu_bar->Append(file_menu, _("&File")); menu_bar->Append(help_menu, _("&Help"));