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


I created a control inherited from CWnd. I do custom painting on it, but the control behaves differently in debug and release version, why?
1 Solution
Tommy HuiEngineerCommented:
Typically, this means that you have code that is compiled differently.

For example, don't put anything in sections of

#if defined(_DEBUG)

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.
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

Train for your Pen Testing Engineer Certification

Enroll today in this bundle of courses to gain experience in the logistics of pen testing, Linux fundamentals, vulnerability assessments, detecting live systems, and more! This series, valued at $3,000, is free for Premium members, Team Accounts, and Qualified Experts.

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