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

print preview assertion error

Status
Not open for further replies.

noaaprogrammer

Programmer
May 4, 2001
36
US
When I select print preview in my application, I get an assertion error. When I debug, it gives me this code as the source of the problem:

Code:
#ifdef _DEBUG
CObject* AFX_CDECL AfxStaticDownCast(CRuntimeClass* pClass, CObject* pObject)
{
	ASSERT(pObject == NULL || pObject->IsKindOf(pClass));
	return pObject;
}
#endif

For some reason, this assertion is being set off. Any ideas on how to fix this???
 
Obviously, this assertion means that you call the member function without initializing the objet (test pObject, it will be NULL), or by casting a pointer to an object into an incompatible class (IsKindOf failure).

I suggest you take a look on the call stack to really found the incorrect code. This code you give us assert for an error in the calling method.

Regards,

David.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top