Added wxAcceleratorTable, wxFrame::SetAcceleratorTable and additions to process it under wxMSW.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@406 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
1998-07-31 13:01:34 +00:00
parent bd0df01f3f
commit 57a7b7c148
16 changed files with 103 additions and 23 deletions

View File

@@ -100,6 +100,16 @@ MyFrame::MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title, c
CreateToolBar(wxNO_BORDER|wxTB_FLAT|wxTB_HORIZONTAL);
InitToolBar(GetToolBar());
#ifdef __WXMSW__
// Accelerators
wxAcceleratorEntry entries[3];
entries[0].Set(wxACCEL_CTRL, (int) 'N', MDI_NEW_WINDOW);
entries[1].Set(wxACCEL_CTRL, (int) 'X', MDI_QUIT);
entries[2].Set(wxACCEL_CTRL, (int) 'A', MDI_ABOUT);
wxAcceleratorTable accel(3, entries);
SetAcceleratorTable(accel);
#endif
}
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event) )