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

1)How to change the size of a button at run time ?

1 Answers  


What is the difference between Extension DLL and Regular DLL?

6 Answers   GE,


1)set the Title for The File DialogBox, in MFC?

1 Answers  


What is document-view architecture ? Give me one real time example for SDI ?

2 Answers  


Difference between Cclint DC & Cpaint Dc

6 Answers   E Logic,


Explain about MDI and CMultiDocTemplate ?

2 Answers  


List out the basic features of MFC.

4 Answers   Mphasis,


If application hangs while SendMessage is waiting for the result, how you handle it?

2 Answers  


What are the differences between MFC Exception macros and C++ exception keywords?

2 Answers  


Does the application have more than one object? If Yes, Briefly explain.

2 Answers   Soltius Infotech,


I can i set size of integer variable should be fixed for different operating systems(Ex i want integer size is 2bytes in OS)

2 Answers   Invensys,


What types of threads are supported by MFC framework?

2 Answers  


Categories