X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8704bf74fba8523e2e174bd5a8195b5202009cd0..06f46ad1fe42facbf80fd4d0bd3feecf03bfacd7:/samples/mdi/mdi.cpp diff --git a/samples/mdi/mdi.cpp b/samples/mdi/mdi.cpp index e52b33de8e..d47b5f2ac1 100644 --- a/samples/mdi/mdi.cpp +++ b/samples/mdi/mdi.cpp @@ -54,10 +54,10 @@ bool MyApp::OnInit(void) { // Create the main frame window - frame = new MyFrame((wxFrame *) NULL, -1, (char *) "MDI Demo", wxPoint(0, 0), wxSize(500, 400), - wxDEFAULT_FRAME | wxHSCROLL | wxVSCROLL); + frame = new MyFrame((wxFrame *) NULL, -1, (char *) "MDI Demo", wxPoint(-1, -1), wxSize(500, 400), + wxDEFAULT_FRAME_STYLE | wxHSCROLL | wxVSCROLL); - // Give it an icon (this is ignored in MDI mode: uses resources) + // Give it an icon #ifdef __WXMSW__ frame->SetIcon(wxIcon("mdi_icn")); #else @@ -190,6 +190,7 @@ END_EVENT_TABLE() MyCanvas::MyCanvas(wxWindow *parent, const wxPoint& pos, const wxSize& size): wxScrolledWindow(parent, -1, pos, size, wxSUNKEN_BORDER|wxVSCROLL|wxHSCROLL) { + SetBackgroundColour(wxColour("WHITE")); } // Define the repainting behaviour @@ -330,7 +331,7 @@ void MyFrame::InitToolBar(wxToolBar* toolBar) #endif int currentX = 5; - toolBar->AddTool(0, *(bitmaps[0]), wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, "New file"); + toolBar->AddTool( MDI_NEW_WINDOW, *(bitmaps[0]), wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, "New file"); currentX += width + 5; toolBar->AddTool(1, *bitmaps[1], wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, "Open file"); currentX += width + 5;