Previewing the Container Application

To preview Container

  1. Run Contain.exe Step 2 directly; or build and run Contain.exe from the sample source files for Step 2.

  2. On the Edit menu, click Insert New Object.

  3. In the Insert Object dialog box, select Scribb Document from the Object Type box.

  4. Click OK.

    A blank Scribble document is opened inside the Container document.

    • Notice the tracker rectangle with resize handles and dashed border that appears in the upper-left corner of the Container document. Container negotiates with the server (Scribble) to determine where to place the initial rectangle and what size to make it.

    • Notice how Container’s menu has been merged with Scribble’s (for example, notice the Pen menu) and how Container’s toolbar is replaced by one provided by Scribble (notice the Pen toolbar button). This is menu merging, a feature that enables you to edit the document within the container application.
  5. Use the mouse to draw within the rectangle provided by the server running within the Container document.

  6. Try out Scribble’s menu and toolbar commands in place; for example, change the pen width.

  7. Click outside the Scribble object, somewhere else in the Container document.

    Notice how the Scribble server is deactivated; the dashed border and resize handles are removed.

  8. Click the Scribble object to select it.

    The selection rectangle and resize handles are drawn again to indicate that this object has been selected. Notice that the cursor changes to a four-way arrow when it is over the structure.

  9. Drag the Scribble object around and resize it.

  10. On the Edit menu, click Insert New Object to add additional embedded objects.

  11. Run HIERSVR stand-alone. Copy an object from HIERSVR.

  12. Paste the object into the Container document.

    You have now seen two ways to initiate an embedded object: You can use the Insert New Object command on the Edit menu, or you can copy an object from the component and paste it into the container, as shown in steps 11 and 12.

  13. Close HIERSVR and Container.