Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HELP !!!!! Debug Assertation Failed

Status
Not open for further replies.

chriscorran

Programmer
Oct 20, 2002
15
GB
Hi,

Why am I recieving the error message below when my program has no errors or warnings?

Debug Assertation Failed
Afxcmn.ini

I am learning the basics of VC6++ and the program in question uses a slider, a spin control and an edit box. The actual program runs and works but only after clicking the ignore button for the debug assertation error.

Any help would be great,

Chris
 
Maybe when clicking on the ignore button it's being calling an object that you haven't previously create.

i.e:
myObject.goOn();
but first you haven't done :
CMyObject myObject;

 
Hi,

This is the bit that is causing the problem, but why??????????


void CCommonControlsDlg::OnChangeEdit1()
{
m_slider1.SetPos(m_spin1.GetPos());

}
 
Instead of hitting ignore, press retry... it will bring you into the code. Right Click on the main window of VC++ and make sure you are showing the call stack... You can trace back to see what is going on. If the assert is down in the mfc code, you most likely have not ininatilzed or destroyed what is being accessed. See where retry takes you, it may help you answer the question easier.

My guess is m_spin1 or m_slider1 is not initalized, visable, destroyed, etc.

Matt
 
Hi and thanks by the way,

The thing is I tried the actual sourcecode from a book and that gave me the same message.

m_spin1 and m_slider1 are initialized. By that I mean that they have their ranges set in the oninitDialog section,

ie.

m_spin1.SetRange(0,10);
m_slider1.SetRange(0,10,TRUE);

!!!!!!!!!! It's really mental
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top