X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9f855638c382770ac416068d1c4dcd356150f293..74a8f67d96591cec101def2a7d47c64072aff7fd:/src/msw/notebook.cpp diff --git a/src/msw/notebook.cpp b/src/msw/notebook.cpp index bfedadbffb..1879bb2ba3 100644 --- a/src/msw/notebook.cpp +++ b/src/msw/notebook.cpp @@ -127,13 +127,6 @@ BEGIN_EVENT_TABLE(wxNotebook, wxBookCtrlBase) #endif // USE_NOTEBOOK_ANTIFLICKER END_EVENT_TABLE() -#if wxUSE_EXTENDED_RTTI - -#else -IMPLEMENT_DYNAMIC_CLASS(wxNotebook, wxBookCtrlBase) -IMPLEMENT_DYNAMIC_CLASS(wxNotebookPageInfo, wxObject ) -#endif - // ============================================================================ // implementation // ============================================================================ @@ -1153,28 +1146,6 @@ void wxNotebook::UpdateBgBrush() } } -WXHBRUSH wxNotebook::MSWGetBgBrushForChild(WXHDC hDC, wxWindow *child) -{ - if ( m_hbrBackground ) - { - // before drawing with the background brush, we need to position it - // correctly - RECT rc; - ::GetWindowRect(GetHwndOf(child), &rc); - - ::MapWindowPoints(NULL, GetHwnd(), (POINT *)&rc, 1); - - if ( !::SetBrushOrgEx((HDC)hDC, -rc.left, -rc.top, NULL) ) - { - wxLogLastError(wxT("SetBrushOrgEx(notebook bg brush)")); - } - - return m_hbrBackground; - } - - return wxNotebookBase::MSWGetBgBrushForChild(hDC, child); -} - bool wxNotebook::MSWPrintChild(WXHDC hDC, wxWindow *child) { // solid background colour overrides themed background drawing @@ -1343,10 +1314,12 @@ bool wxNotebook::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM* result) event.SetEventObject(this); event.SetInt(idCtrl); - bool processed = HandleWindowEvent(event); + // Change the selection before generating the event as its handler should + // already see the new page selected. if ( hdr->code == TCN_SELCHANGE ) UpdateSelection(event.GetSelection()); + bool processed = HandleWindowEvent(event); *result = !event.IsAllowed(); return processed; }