Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How to handle RTTI in MFC ?



How to handle RTTI in MFC ?..

Answer / n.venkateshwara rao.

RTTI (Run Time Type Identification) in MFC can be handled
by using the class CRunTimeClass.

But CRunTimeClass can be use to identify the type of the
class which are derived from CObject.

For eg -

void MyFunction()
{
CObject *mObject = new MyClass;
if(mObject->IsKindOf(RUNTIME_CLASS( MyClass) ) )
{
printf("Class is of type MyClass\n");
}
else
{
printf("Class is of type someotherclass\n");
}
}

We can use "type_info" for other type of classes which are
not derived from CObject.

Is This Answer Correct ?    15 Yes 1 No

Post New Answer

More MFC Interview Questions

What is Multithreading

1 Answers   Invensys,


What is the use of message map ?

5 Answers   TCS,


Which MFC function is used to display output?

9 Answers   TCS,


how does conditionally close the Dialog Box ?

2 Answers   Infotech,


1)To Remove WS_MINIMIZEBOX in a Frame ?

1 Answers  


Have you ever used win32 APIs ?

4 Answers   Microsoft,


visual Pogramming c++ coding for create a paint application.. (Please someone help me)

2 Answers  


what message is sent to an application when the user presses the primary button?

0 Answers   University Exams,


What is subclassing?

2 Answers  


is there any class which is not derived from Cobject

11 Answers   Patni,


What is CArchive class dowes?

4 Answers  


What is the base class for MFC Framework ?

2 Answers   Mphasis,


Categories