Archived

This topic is now archived and is closed to further replies.

GekkoCube

Dynamically refreshing/updating MFC toolbars !

Recommended Posts

Hey. I need to somehow update/refresh my toolbar (which displays icons/images) dynamically on-the-spot. Essentially, i can add or delete new icons to this toolbar by means of the menu bar. But when i add new things to the toolbar, it doesnt reflect the newly added image by displaying. It will only update the toolbar if I minimize and/or resize the window itself. this seems rather easy - but no luck so far. ~ I''''m a wannabe programmer ~

Share this post


Link to post
Share on other sites
quote:
Original post by GekkoCube
what does InvalidateRect do?


It tells Windows that the contents of a rectangle in a window (possibly an entire window) is invalid and must be redrawn. Windows will then send a WM_PAINT message to the window to make it redraw its contents in the invalidated rectangle.

If things are still unclear, look up InvalidateRect at msdn.microsoft.com

Share this post


Link to post
Share on other sites