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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A dialog

Status
Not open for further replies.

atoledo

Programmer
Oct 14, 2002
16
ES
Hi!

How can I show a dialog box from a single window application. I´m triying to call the dialog box with the doModal function from the application but it gives me this error:
Debug Assertion Failed!

in the file wincore.cpp line 884

Thanks
 
hi,
Use project wizard: the code generated, will be
ready for use, and shows you what you can do manually
bye
 
Assertion Errors are often times the result of NULL pointers. Are you possibly pointing to a handle window that doesn't exist?

Assuming you've created a dialog w/ project wizard called CMyDialog...
From project wizard generated code
Code:
CMyDialog myDi
int nResponse = myDi.DoModal();

	if (nResponse == IDOK)
	{
		// TODO: Place code here to handle when the dialog is
		//  dismissed with OK
	}
	else if (nResponse == IDCANCEL)
	{
		// TODO: Place code here to handle when the dialog is
		//  dismissed with Cancel
	}

Also, what event fires your dialog? Is it an accelerator? A Button? A Menu Command? You may check your syntax in your MESSAGE_MAP and make sure that your code is doing what you want it to do.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top