|
-
December 14th, 2010, 06:09 AM
#9
Re: Dialog Box WM_PAINT problem
 Originally Posted by VictorN
You create HFONT hfont0 every time the toolboxProc is called...
But you never delete it! Why???
Why not create it only once and save in some global variable?
Thank You! This is why my app kept freezing. I saved the font as a global variable now and it works. By the way, what is the most appropriate way of declaring variables that I want to be accessible in both callback functions (WinProc and DialogProc) or both in WinMain and WinProc? Should I always use global variables in these cases or perhaps make a class in the header and put them there as static? How do professionals do this?
Thank you again for your help.
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
|