Sign in to follow this  

IMPLEMENT_DYNAMIC

This topic is 4088 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Erm... Do you know what MFC is?

Everything provided by MFC (Microsoft Foundation Class) comes in the shape of a class derived from CObject, be it a network interface, a window, a command button or the manifestation of the application itself.

If you don't know what a class is, I suggest you get yourself a good book on C++. If you don't know what run-time means, I suggest you get yourself a good book on any programming language.

Sorry if I sound sarcastic, but your question is a little obscure.

Regards
Admiral

Share this post


Link to post
Share on other sites
Quote:
Original post by TheAdmiral
Sorry if I sound sarcastic, but your question is a little obscure.


Less obscure than your answer [smile]

Runtime classes in the MFC terminology (as it doesn't really mean anything) are objects that enclose some informations that can be used to test the real underlying type of an object (providing that it inherits CObject) or to create new instances of this object given the class name as a string.

The RUNTIME_CLASS() macro is used to retrieve the hidden runtime class object from any CObject who implement that interface. It returns a CRuntimeClass instance, that can be used to feed some particular functions of the MFC (for example, CSplitterWnd::CreateView() need a CRuntimeClass object to be able to create the correct view object).

They are failry advanced stuff to use, and unless you really need them, I suggest you to just know that they exist, rely on the documentation and samples when you have to use them, and do not try to understand them right now. When you'll be more confident about your C++ skills you'll be able to understand them rather easily.

Regards,


Share this post


Link to post
Share on other sites

This topic is 4088 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this