X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/82e3664e59cf70c3a4fb85bd2ea57cac4f192a69..5f7348ce627157e21bec507623ebd31c1e9dc762:/src/msw/window.cpp diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 766ca6ea38..315f7bdd6d 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -820,7 +820,7 @@ inline int GetScrollPosition(HWND hWnd, int wOrient) wOrient, &scrollInfo) ) { - // Not neccessarily an error, if there are no scrollbars yet. + // Not necessarily an error, if there are no scrollbars yet. // wxLogLastError(_T("GetScrollInfo")); } return scrollInfo.nPos; @@ -1659,7 +1659,7 @@ void wxWindowMSW::DoSetSize(int x, int y, int width, int height, int sizeFlags) // save the pending dimensions or not. This isn't done in DoMoveWindow // (where the hdwp is used) because some controls have thier own // DoMoveWindow so it is easier to catch it here. - wxWindowMSW *parent = wxDynamicCast(GetParent(), wxWindowMSW); + wxWindowMSW *parent = GetParent(); HDWP hdwp = parent && !IsTopLevel() ? (HDWP)parent->m_hDWP : NULL; if (hdwp) { @@ -4150,6 +4150,11 @@ bool wxWindowMSW::HandlePrintClient(WXHDC hDC) if ( IsTopLevel() || InheritsBackgroundColour() ) return false; + // sometimes we don't want the parent to handle it at all, instead + // return whatever value this window wants + if ( !MSWShouldPropagatePrintChild() ) + return MSWPrintChild(hDC, (wxWindow *)this); + for ( wxWindow *win = GetParent(); win; win = win->GetParent() ) { if ( win->MSWPrintChild(hDC, (wxWindow *)this) ) @@ -5047,7 +5052,7 @@ bool wxWindowMSW::MSWOnScroll(int orientation, WXWORD wParam, : SB_VERT, &scrollInfo) ) { - // Not neccessarily an error, if there are no scrollbars yet. + // Not necessarily an error, if there are no scrollbars yet. // wxLogLastError(_T("GetScrollInfo")); }