keyword:visual C++ runtime_class macro
- Accessing Run-Time Class Information
- Deriving a Class from CObject
- Specifying Levels of Functionality
- Run-time class information
- Dynamic creation support
- Serialization support
- Dynamic Object Creation
- TN017: Destroying Window Objects
- TN021: Command and Message Routing
- TN023: Standard MFC Resources
- TN024: MFC-Defined Messages and Resources
- TN025: Document, View, and Frame Creation
- TN026: DDX and DDV Routines
- TN028: Context-Sensitive Help Support
- TN029: Splitter Windows
- TN030: Customizing Printing and Print Preview
- TN031: Control Bars
- TN035: Using Multiple Resource Files and Header Files with Visual C++
- When might you want to split a project into multiple resource files and/or header files, and how you do it
- How do you share a common header .H file between two .RC files
- How do you divide project resources into multiple .RC files
- How do you (and the tools) manage build dependencies between .RC, .CPP, and .H files
- TN070: MFC Window Class Names
This article explains how to access information about the class of an object at run time...
Note::MFC does not use the Run-Time Type Information (RTTI) support introduced in Visual C++ 4.0.
If you have derived your class from CObject and used the DECLARE_DYNAMIC and IMPLEMENT_DYNAMIC, the DECLARE_DYNCREATE and IMPLEMENT_DYNCREATE, or the DECLARE_SERIAL and IMPLEMENT_SERIAL macros explained in the article Deriving a Class from CObject, the CObject class has the ability to determine the exact class of an object at run time.
This ability is most useful when extra type checking of function arguments is needed and when you must write special-purpose code based on the class of an object. However, this practice is not usually recommended because it duplicates the functionality of virtual functions.
The CObject member function IsKindOf can be used to determine if a particular object belongs to a specified class or if it is derived from a specific class. The argument to IsKindOf is a CRuntimeClass object, which you can get using the RUNTIME_CLASS macro with the name of the class.
This article describes the minimum steps necessary to derive a class from CObject. Other CObject class articles describe the steps needed to take advantage of specific CObject features, such as serialization and diagnostic debugging support..
This article describes how to add the following levels of functionality to your CObject-derived class:
This is a paragraph.
Technical Notes
This note describes the use of the CWnd::PostNcDestroy method. Use this method if you want to do customized allocation of CWnd-derived objects. This note also explains why you should use CWnd::DestroyWindow to destroy a C++ Windows object instead of the delete operator.
If you follow the guidelines in this topic, you will have few cleanup problems. These problems can result from issues such as forgetting to delete/free C++ memory, forgetting to free system resources like HWNDs, or freeing objects too many times.
This note describes the command routing and dispatch architecture as well as advanced topics in general window message routing.
Please refer to Visual C++ for general details on the architectures described here, especially the distinction between Windows messages, control notifications, and commands. This note assumes you are very familiar with the issues described in the printed documentation and only addresses very advanced topics..
This note describes the standard resources provided with and needed by the MFC library.
Standard Resources MFC offers two categories of predefined resources that you can use in your application: clip-art resources and standard framework resources.
Clip-art resources are additional resources that the framework does not depend on, but which you might want to add to your application's user interface. The following clip-art resources are contained in the MFC General sample CLIPART:.
This note describes the internal Windows messages and resource formats used by MFC. This information explains the implementation of the framework, and will assist you in debugging your application. For the adventurous, even though all this information is officially unsupported, you may use some of this information for advanced implementations..
This note describes the creation and ownership issues for WinApps, DocTemplates, Documents, Frames and Views..
This note describes the dialog data exchange (DDX) and dialog data validation (DDV) architecture. It also describes how you write a DDX_ or DDV_ procedure and how you can extend ClassWizard to use your routines.
This note describes the rules for assigning Help contexts IDs and other help issues in MFC. Context-sensitive help support requires the help compiler that is available in Visual C++..
This note describes the MFC CSplitterWnd Class, which provides window splits and manages the resizing of other pane windows.
This note describes the process of customizing printing and print preview and describes the purposes of the callback routines used in CView and the callback routines and member functions of CPreviewView..
This note describes the control bar classes in MFC: the general CControlBar, CStatusBar, CToolBar, CDialogBar, and CDockBar..
This note describes how the Visual C++ resource editor supports multiple resource files and header files shared in a single project or shared across multiple projects and how you can take advantage of that support. This note answers these questions:
MFC windows use a dynamically created class name that reflects the features of the window. MFC generates class names dynamically for frame windows, views, and popup windows produced by the application. Dialog boxes and controls produced by an MFC application have the Windows-supplied name for the class of window in question.
You can replace the dynamically provided class name by registering your own window class and using it in an override of PreCreateWindow. Their MFC-supplied class names fit one of the two following forms:.
No comments:
Post a Comment