EVT_MENU(MDI_QUIT, MyFrame::OnQuit)
EVT_CLOSE(MyFrame::OnClose)
-
+ EVT_ICONIZE(MyFrame::OnIconize)
EVT_SIZE(MyFrame::OnSize)
END_EVENT_TABLE()
// Associate the menu bar with the frame
frame->SetMenuBar(menu_bar);
+#if wxUSE_STATUSBAR
frame->CreateStatusBar();
+#endif // wxUSE_STATUSBAR
frame->Show(true);
// Associate the menu bar with the frame
subframe->SetMenuBar(menu_bar);
+#if wxUSE_STATUSBAR
subframe->CreateStatusBar();
subframe->SetStatusText(title);
+#endif // wxUSE_STATUSBAR
int width, height;
subframe->GetClientSize(&width, &height);
#endif
}
+void MyFrame::OnIconize(wxIconizeEvent& event)
+{
+ wxSizeEvent e;
+ OnSize (e) ;
+}
+
#if wxUSE_TOOLBAR
void MyFrame::InitToolBar(wxToolBar* toolBar)
{
int width = 24;
int currentX = 5;
- toolBar->AddTool( MDI_NEW_WINDOW, *(bitmaps[0]), wxNullBitmap, false, currentX, wxDefaultPosition.y, (wxObject *) NULL, _T("New file"));
+ toolBar->AddTool( MDI_NEW_WINDOW, *(bitmaps[0]), wxNullBitmap, false, currentX, wxDefaultCoord, (wxObject *) NULL, _T("New file"));
currentX += width + 5;
- toolBar->AddTool(1, *bitmaps[1], wxNullBitmap, false, currentX, wxDefaultPosition.y, (wxObject *) NULL, _T("Open file"));
+ toolBar->AddTool(1, *bitmaps[1], wxNullBitmap, false, currentX, wxDefaultCoord, (wxObject *) NULL, _T("Open file"));
currentX += width + 5;
- toolBar->AddTool(2, *bitmaps[2], wxNullBitmap, false, currentX, wxDefaultPosition.y, (wxObject *) NULL, _T("Save file"));
+ toolBar->AddTool(2, *bitmaps[2], wxNullBitmap, false, currentX, wxDefaultCoord, (wxObject *) NULL, _T("Save file"));
currentX += width + 5;
toolBar->AddSeparator();
- toolBar->AddTool(3, *bitmaps[3], wxNullBitmap, false, currentX, wxDefaultPosition.y, (wxObject *) NULL, _T("Copy"));
+ toolBar->AddTool(3, *bitmaps[3], wxNullBitmap, false, currentX, wxDefaultCoord, (wxObject *) NULL, _T("Copy"));
currentX += width + 5;
- toolBar->AddTool(4, *bitmaps[4], wxNullBitmap, false, currentX, wxDefaultPosition.y, (wxObject *) NULL, _T("Cut"));
+ toolBar->AddTool(4, *bitmaps[4], wxNullBitmap, false, currentX, wxDefaultCoord, (wxObject *) NULL, _T("Cut"));
currentX += width + 5;
- toolBar->AddTool(5, *bitmaps[5], wxNullBitmap, false, currentX, wxDefaultPosition.y, (wxObject *) NULL, _T("Paste"));
+ toolBar->AddTool(5, *bitmaps[5], wxNullBitmap, false, currentX, wxDefaultCoord, (wxObject *) NULL, _T("Paste"));
currentX += width + 5;
toolBar->AddSeparator();
- toolBar->AddTool(6, *bitmaps[6], wxNullBitmap, false, currentX, wxDefaultPosition.y, (wxObject *) NULL, _T("Print"));
+ toolBar->AddTool(6, *bitmaps[6], wxNullBitmap, false, currentX, wxDefaultCoord, (wxObject *) NULL, _T("Print"));
currentX += width + 5;
toolBar->AddSeparator();
- toolBar->AddTool( MDI_ABOUT, *bitmaps[7], wxNullBitmap, true, currentX, wxDefaultPosition.y, (wxObject *) NULL, _T("Help"));
+ toolBar->AddTool( MDI_ABOUT, *bitmaps[7], wxNullBitmap, true, currentX, wxDefaultCoord, (wxObject *) NULL, _T("Help"));
toolBar->Realize();