• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 552
  • Last Modified:

MFC: When drawing in a view by overloading OnDraw(CDC* pDC), how can the view be explicitly redrawn?


I'm drawing on an MFC view in the usual manner - by overloading OnDraw(CDC* pDC). When I change some setting which will cause the view to be drawn in a different way then it was previously drawn (in my case, change the "page" of the view, an int, which will cause my OnDraw to draw another area), there is no way that I'm aware of to tell the view to redraw - I must resize the window or something.

How can the view be explicitly redrawn?

1 Solution
You must call pView->Invalidate();
sternoceraAuthor Commented:
Great, thanks alb66.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now