AppWizard provides a starter OLE container application that already has a lot of the underlying architecture that most OLE container applications need. Build this new AppWizard-provided application and try it out.
To build the starter OLE container application
This builds the default version of the container application, producing the file Container.exe under your project directory.
At this point, Container already has many of the features you saw in the preview of the completed Container application, but it is missing several capabilities, such as:
You will add this and other functionality during this lesson. First see for yourself the built-in capabilities of the starter Container application.
Note Before you can preview the Container application using Scribble, you need to register Scribble as described in Registering an OLE Component Application earlier in this lesson.
To create a new Scribble drawing within Container
A new Scribble object is activated in place. No additional code is required to implement the Insert New Object command on the Edit menu.
Notice how Container’s menu is merged with Scribble’s and how Container’s toolbar is replaced by one provided by Scribble. Again, this is already working so no additional code is required here.
To edit the in-place activated object
Notice that the user interface (ESC) for canceling in-place editing mode for the selected object is already incorporated into the starter AppWizard-created application.
Edit activates the object in place inside the container. (Open fully opens the Scribble server in its own window.)
Note that the Scribble server provides the tracker rectangle; Container provides the tracker only when the object is not activated in place.
The AppWizard-provided container application already has a lot of OLE container functionality, but it is still missing some basics that are implemented in the remainder of this tutorial.