Hi all,
Can anyone tell me why I get a "Debug Assurtion Failure" when I make a Control-Variable of an editbox???? I doesn't make any sense.
Student Flanders Language Valley
Programmer
Printable View
Hi all,
Can anyone tell me why I get a "Debug Assurtion Failure" when I make a Control-Variable of an editbox???? I doesn't make any sense.
Student Flanders Language Valley
Programmer
Debug assertion failures can occur for several reasons. The assertion failures only mean that some pre-requisite condition had been "asserted" which failed the test. But in your case of a control variable, the most common times when an assertion failure occurs is that the control variable's window has not been attached. That is, you're trying to use the control variable before MFC code attaches the actual window handle to the variable (m_hWnd). Try this out: Run the program (don't execute it - press F5) at the time of the assertion failure, select "retry" again. Check the value of your edit control's m_hWnd variable. If it is 0 then you're using the control variable before MFC can attach the handle.
Hope you found this helpful :-)
Cheers!
DP