IIRC, first store the current clip region using GetClipRgn
, and after you're done, SelectClipRgn
the stored region again.
Looking at your code, it should be enough to SelectClipRgn
your RGN
again, because:
The IntersectClipRect function creates a new clipping region from the intersection of the current clipping region and the specified rectangle.