paint clipping region. This fixes severe refresh problems on WinCE
when clipping regions are used, and is experimental on desktop wxMSW
but so far works fine.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37777
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
if (m_clipping && m_hDC)
{
if (m_clipping && m_hDC)
{
+#if 1
+ // On a PocketPC device (not necessarily emulator), resetting
+ // the clip region as per the old method causes bad display
+ // problems. In fact setting a null region is probably OK
+ // on desktop WIN32 also, since the WIN32 docs imply that the user
+ // clipping region is independent from the paint clipping region.
+ ::SelectClipRgn(GetHdc(), 0);
+#else
// TODO: this should restore the previous clipping region,
// so that OnPaint processing works correctly, and the update
// clipping region doesn't get destroyed after the first
// TODO: this should restore the previous clipping region,
// so that OnPaint processing works correctly, and the update
// clipping region doesn't get destroyed after the first
HRGN rgn = CreateRectRgn(0, 0, 32000, 32000);
::SelectClipRgn(GetHdc(), rgn);
::DeleteObject(rgn);
HRGN rgn = CreateRectRgn(0, 0, 32000, 32000);
::SelectClipRgn(GetHdc(), rgn);
::DeleteObject(rgn);
}
wxDCBase::DestroyClippingRegion();
}
wxDCBase::DestroyClippingRegion();