The container application can now be tested. Remember that the container application was produced as a template, without additional functionality added. However, what you will see in the next few pages is a very complete and functioning application.
The container application can be started by typing Cnt at the command line or run directly from the integrated environment of the Visual C++ compiler. Figure 25-10 shows the initial container window.
Figure 25-10: The initial window for the Cnt container application
This container can use objects from any server. For this example we’ll insert an Excel spreadsheet into the container. To select Excel as the server, open the container’s Edit menu and use the Insert New Object… menu option. This will open the Insert Object dialog box, as shown in Figure 25-11.
Figure 25-11: The Insert Object dialog box allows the selection of an Excel worksheet
From the Insert Object dialog box, choose Microsoft Excel Worksheet as the object to embed in the container.
Figure 25-12 shows the initial insertion of the object into the container document with data entered in various cells.
Figure 25-12: The Excel worksheet is inserted into the Cnt container
Don’t forget, you gained all of this functionality without writing one line of code. The AppWizard has made it very easy to develop OLE container and server applications. As a little project, why not create your own server application. Then, to test your skills further, insert a server object from this application into the Cnt container.