3.1.1 Client and Server Applications

The OLE process requires a dialog between the client and server application. In addition to the changes in functionality, there are several key differences in the interface of client and server applications:

Client applications add four commands to the Edit menu below the Paste command: Paste Special (and/or Paste Link), Links, Object, and Insert Object.

If there is an Insert menu, the Insert Object command may be placed there as Object instead. The Paste Link command is optional if your application already has the preferred Paste Special... command, as discussed in "Selectively Inserting Objects with the Paste Special ... Command," later in this chapter.

There are two types of servers: full servers and mini servers. The title bar for both server types should read as follows and in Figure 9:

<Server> <Descriptive-Class-Name> in <Container-Document>

An object class name must always be presented to the user (in window titles, list panes, dialogs, and so on) in the human-readable format provided by the registration database. The client application must supply an appropriate <Container-Document> string to the server application. Because link servers open the source document, their title bars display the standard information:

<Server> - <Source-Document>

3.1.1.1 Mini Servers

A mini server application uses a dialog box to communicate with the user and requires three command buttons: OK, Cancel, and Help. (The example mini server in Figure 9 includes an optional Apply button.)

Figure 9. Mini server interface

3.1.1.2 Full Servers

A full server is a stand-alone application with a full set of menus. In a full server application (or in a server window in an MDI application), the File menu should be modified as follows and as shown in Figure 10. (The client application must supply the appropriate <Container-Document> string to the server application.)

The Save command should be replaced by Update <Container-Document>.

The Close command (MDI applications) should be replaced by Close & Return to <Container-Document>.

The Save As command should be changed to Save Copy As.

The Exit command should be replaced by Exit & Return to <Container-Document>.

Figure 10. Full server application interface changes

If the user attempts to launch a server (for example, a mini server) that cannot be run as a stand-alone application, the server application should display the error message shown in Figure 11.

Figure 11. Stand-alone warning message

Note SDI (Single Document Interface) applications should not implement File New and File Open when running as servers. It is recommended that these commands be replaced by the Import command, which allows the loading of an existing file without severing the connection with the client application. (See the section, "Updating Objects from SDI Server Applications," later in this chapter.)