1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
//mainframe.cpp
BEGIN_EVENT_TABLE(CMainFrame, wxFrame)
EVT_MENU(MENU_OPEN,CMainFrame::OnOpen)
END_EVENT_TABLE()
void CMainFrame::OnOpen(wxCommandEvent& event) {
OpenDialog open(this,-1,"Open");
open.ShowModal();
}
//dialogs.cpp
BEGIN_EVENT_TABLE(OpenDialog, wxDialog)
END_EVENT_TABLE()
OpenDialog::OpenDialog(wxWindow *parent, wxWindowID id,const wxString &title) :wxDialog( parent, id, title) {
wxFileDialog *open = new wxFileDialog(this,"Selectionner un fichier","","","*.los",wxFD_OPEN,wxDefaultPosition,wxDefaultSize);
} |
Partager