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 functioning of DIalodDataXchange ..?

0 Answers  


What function is used to disable a control at runtime?

7 Answers  


What is the difference between the SDI and MDI

3 Answers   Invensys,


What function is used to retrieve the currently selected index in a list box?

2 Answers  


Name the Synchronization objects?

2 Answers  


What is the difference between GetMessage and PeekMessage ?

3 Answers  


What is the command routing in MFC framework?

3 Answers  


Difference between Cclint DC & Cpaint Dc

6 Answers   E Logic,


What?s the difference between Modal and Modeless Dialog?

12 Answers   Jekson, Usl India,


what are the feauters of CObject

4 Answers   Siemens, Wipro,


Tell me the different controls in MFC ?

5 Answers  


Which MFC function is used to display output?

9 Answers   TCS,


Categories