user325873
user325873

Reputation: 1

RePaint area (region) in sdi view MFC

I want to ask you one question about SDI MFC application. How can I repaint some area (region) on the view in SDI MFC application but without repaint complete view?

Upvotes: 0

Views: 959

Answers (2)

Roel
Roel

Reputation: 19642

Use ::InvalidateRect() and/or CWnd::InvalidateRect().

Upvotes: 1

foraidt
foraidt

Reputation: 5709

Have a look at the Invalidate functionality. You can invalidate a rectangle, a region or the while window.

An invalidated region will be repainted with the next WM_PAINT message. In your OnPaint() method you can query the clipping region from the CDC object. If the object in question is not withing the region/rectangle, you can skip drawing it.

Upvotes: 0

Related Questions