|
-
August 29th, 2011, 12:05 PM
#7
Re: GetDC not calculating toolbar offset
 Originally Posted by Skizmo
OnDraw for views, instead of OnPaint for dialogs. The OnDraw function gives you the drawing DC as a parameter of the function, so my question stands, why the GetDC ().
Yes. A window (or view) has only 1 paint function that is doing all the work. If you draw something in another function the OnPaint/OnDraw function automatically overrules that by refreshing the window.
I don't use view that much so I don't know the UpdateDialog call, but your own drawing stuff can be done in the OnDraw itself.
Okay, so I'm beginning to get this. I was drawing outside of OnDraw / UpdateDialog. It just seemed like I was creating (and setting) a ton of global flags for what should be drawn in UpdateDialog. But, that's the only way to do it.
Thanks for setting me straight!
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|