OnPaint

I created a control inherited from CWnd. I do custom painting on it, but the control behaves differently in debug and release version, why?
fmichaud061597Asked:
Who is Participating?
 
Tommy HuiConnect With a Mentor EngineerCommented:
Typically, this means that you have code that is compiled differently.

For example, don't put anything in sections of

#if defined(_DEBUG)
#endif

or use the VERIFY() macro. Look for something like that in your program. Another thing to check is to make sure you are initializing every single variable to a known value. Otherwise, you may have garbage in them. This is especially true for pointers.
0
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.

All Courses

From novice to tech pro — start learning today.