The Edit Menu

Chapter 25 - Getting Started with OLE

Visual C++ 6: The Complete Reference
Chris H. Pappas and William H. Murray, III
  Copyright 1998 The McGraw-Hill Companies

Testing the Container Application
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.

Books24x7.com, Inc 2000 –  


Visual C++ 6(c) The Complete Reference
Visual Studio 6: The Complete Reference
ISBN: B00007FYGA
EAN: N/A
Year: 1998
Pages: 207

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net