Before working through the steps of adding OLE server support to Scribble, try out the completed application. This will help you appreciate how Scribble behaves when it is activated by an ActiveX container.
The ActiveX container application you will use is the completed Container tutorial project (you’ll build it from the source files). Before you can view Scribble (the server application) files from within Container, you must register Scribble as an OLE server application.
To install and register Scribble as an OLE server application
Build and run Scribble.exe from the sample source files for Step 7:
Running Scribble briefly as a stand-alone application registers it in the system registry as an OLE server.
Note You can find a finished example of this lesson's code in the Scribble Step7 sample source code directory.
To preview the Container project as an ActiveX container application
The Insert Object dialog box appears.
This opens a Scribble document inside the Container application. Notice how Scribble:
Notice how drawing in Scribble’s in-place window is just like drawing in the stand-alone Scribble application.
With focus taken away so the Scribble document is no longer selected, the Scribble object is redrawn inside Container’s view with the help of the Scribble server.
The rest of this lesson describes how to make Scribble an OLE server.