最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

winapi - Painting outside invalidated region from within WM_PAINT - Stack Overflow

programmeradmin1浏览0评论

My custom Win32 control invalidates (using InvalidateRect()) precisely the regions for which it knows they require repainting. The control also allows users to hook an overlay event, allowing them to draw on the paint DC while handling WM_PAINT. The control itself cannot predict where the user will draw, and thus cannot invalidate this region up front.

The problem I'm now facing is that the area painted during the overlay event gets clipped against the region of my client area which is invalidated. Attempts to remove any clipping did not work, e.g. SelectClipRgn() with a NULL HRGN.

Is there any way around this, other than always invalidating the entire client rect and thereby sacrificing performance?

发布评论

评论列表(0)

  1. 暂无评论