Home | Overview | How Do I | Sample | Tutorial
Creating an OLE Container in Tutorials describes the implementation of a simple visual editing container, CONTAINER, explaining each step in detail. This article summarizes the tutorial procedure and points you to other articles that provide more detailed explanations about implementing containers. It also lists some optional OLE features you may want to implement and the articles describing these features.
To prepare your CWinApp-derived class
These features are provided for you automatically when you use AppWizard to create a container application. See the article The MFC AppWizard (EXE version): Step-by-Step.
To prepare your view class
Because the implementation of these features varies dramatically from one application to the next, AppWizard provides only a basic implementation. You will likely have to customize these functions to get your application to function properly. For a more detailed explanation and an example of this, see the "Refining Active Container Functionality" section of Creating an OLE Container in Tutorials, and see the MFC Tutorial sample CONTAINER.
To handle embedded and linked items
AppWizard will derive the class for you, but you will likely need to override OnChange and the other functions listed with it in step 2 in the preceding procedure. The skeleton implementations need to be customized for most applications, because these functions are implemented differently from one application to the next. For more information about this, see step 2 of the container tutorial (called "Refining Active Container Functionality") in Tutorials and the MFC OLE sample DRAWCLI.
You must add a number of items to the container application’s menu structure to support OLE. For more information on these, see the article Menus and Resources: Container Additions.
You may also want to support some of the following features in your container application:
For more information, see the article Activation.
For more information, see the article Drag and Drop (OLE).
For more information, see the article Containers: Advanced Features.
See Also Containers: Client Items