X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b412f9be504e07559a98ae234f30bb1bd0b2aa1f..015e69f36dfbc469eef59456f973d0567e865d70:/samples/docvwmdi/view.cpp diff --git a/samples/docvwmdi/view.cpp b/samples/docvwmdi/view.cpp index ea08110776..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" @@ -57,6 +57,7 @@ bool DrawingView::OnCreate(wxDocument *doc, long WXUNUSED(flags) ) frame->SetSize(-1, -1, x, y); #endif frame->Show(TRUE); + Activate(TRUE); return 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;