X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/54ca0d120a10e57b7f2c75269a136e4a68508447..0cd121f9e106c73a5e1d0e889b4973de7c967cc3:/src/msw/window.cpp diff --git a/src/msw/window.cpp b/src/msw/window.cpp index c238a8b21c..98979b0466 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -2766,11 +2766,9 @@ bool wxWindow::HandleSetCursor(WXHWND hWnd, // cursor set, stop here return TRUE; } - else - { - // pass up the window chain - return FALSE; - } + + // pass up the window chain + return FALSE; } // --------------------------------------------------------------------------- @@ -2952,6 +2950,16 @@ bool wxWindow::HandlePaint() return GetEventHandler()->ProcessEvent(event); } +// Can be called from an application's OnPaint handler +void wxWindow::OnPaint(wxPaintEvent& event) +{ + HDC hDC = (HDC) wxPaintDC::FindDCInCache((wxWindow*) event.GetEventObject()); + if (hDC != 0) + { + MSWDefWindowProc(WM_PAINT, (WPARAM) hDC, 0); + } +} + bool wxWindow::HandleEraseBkgnd(WXHDC hdc) { // Prevents flicker when dragging