X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e4b19d9b203f676f5dbf4e8e5260b7d3394b1a40..bcb7cc7693846151a179c6f199105c19df2c77a2:/samples/docvwmdi/view.cpp diff --git a/samples/docvwmdi/view.cpp b/samples/docvwmdi/view.cpp index 7da43c504b..5a41fff149 100644 --- a/samples/docvwmdi/view.cpp +++ b/samples/docvwmdi/view.cpp @@ -25,7 +25,7 @@ #endif #if !wxUSE_DOC_VIEW_ARCHITECTURE -#error You must set wxUSE_DOC_VIEW_ARCHITECTURE to 1 in wx_setup.h! +#error You must set wxUSE_DOC_VIEW_ARCHITECTURE to 1 in setup.h! #endif #include "docview.h" @@ -54,9 +54,10 @@ bool DrawingView::OnCreate(wxDocument *doc, long WXUNUSED(flags) ) // X seems to require a forced resize int x, y; frame->GetSize(&x, &y); - frame->SetSize(x, y); + frame->SetSize(-1, -1, x, y); #endif frame->Show(TRUE); + Activate(TRUE); return TRUE; } @@ -146,7 +147,7 @@ bool TextEditView::OnCreate(wxDocument *doc, long WXUNUSED(flags) ) // X seems to require a forced resize int x, y; frame->GetSize(&x, &y); - frame->SetSize(x, y); + frame->SetSize(-1, -1, x, y); #endif frame->Show(TRUE); @@ -188,7 +189,7 @@ BEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow) END_EVENT_TABLE() // Define a constructor for my canvas -MyCanvas::MyCanvas(wxView *v, wxFrame *frame, const wxPoint& pos, const wxSize& size, const long style): +MyCanvas::MyCanvas(wxView *v, wxFrame *frame, const wxPoint& pos, const wxSize& size, long style): wxScrolledWindow(frame, -1, pos, size, style) { view = v; @@ -255,7 +256,7 @@ void MyCanvas::OnMouseEvent(wxMouseEvent& event) } // Define a constructor for my text subwindow -MyTextWindow::MyTextWindow(wxView *v, wxFrame *frame, const wxPoint& pos, const wxSize& size, const long style): +MyTextWindow::MyTextWindow(wxView *v, wxFrame *frame, const wxPoint& pos, const wxSize& size, long style): wxTextCtrl(frame, -1, "", pos, size, style) { view = v;