Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Type Casting of MFC Class Objects 

Type casting macros provide a way to cast a given pointer to a pointer that points to an object of specific class, with or without checking that the cast is legal.

The following table lists the MFC type casting macros.

Macros That Cast Pointers to MFC Class Objects


Casts a pointer to a pointer to a class object while checking to see if the cast is legal.


Casts a pointer to an object from one class to a pointer of a related type. In a debug build, causes an ASSERT if the object is not a "kind of" the target type.

See Also

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2014 Microsoft. All rights reserved.