Copyright (C) 1992 by ParcPlace Systems, Inc. All rights reserved. The enclosed code is an example of using the Objectkit\Smalltalk C Programming (CPOK) Release 1.0 to build an interface to the Microsoft Windows Dynamic Data Exchange Management Library (DDEML). The example illustrates: 1. CPOK programming techniques. 2. Dynamic Data Exchange with Objectworks\Smalltalk(R) running under Microsoft Windows. The files included with this example are: os-ddeml.st -- The source code for the DDEML interface. os-dl-as.st -- The source code for the Excel and Word for Windows examples. owstdde.bos -- A BOSS file containing the above two ".st" files -- used on systems that do not have a CPOK C declaration parser. Please read further for loading instructions. owstdde.doc -- A Microsoft Word 2.0 document containing predefined Tools menu items. owstdde.dot -- A Microsoft Word 2.0 '.dot' file for the preceding Word document. cpok-dde.txt -- This file. ParcPlace Systems makes no warranty, either expressed or implied, as to the fitness of this example for any particular use. This example is unsupported by ParcPlace Systems. If you are not familiar with Microsoft Corporation's Dynamic Data Exchange Management Library, we strongly recommend that you acquire the DDEML documentation and read it in conjunction with this example code. Installation Instructions ========================= 1. Load external interface support -- File in ExtLib.st from the 'external' directory that was supplied with Objectworks\Smalltalk Release 4.1. 2. Load DDEML support code -- Execute the following in a Smalltalk Workspace, substituting the full pathname of the file: ExternalInterface bossIn: 'owstdde.bos' If you have the CPOK C declaration parser, and you wish to modify the example CPOK source methods, you may additionally file-in od-ddeml.st followed by os-dl-as.st. You may also modify the BOSS'ed in version if you have the C declaration parser loaded in your system. 3. Confirm location of DDEML.DLL -- This file, supplied by Microsoft, must be either in the same directory as the Smalltalk Virtual Machine (st80.exe) or in your Windows\System directory. Microsoft Excel Demo ==================== To run the Microsoft Excel demo, start Excel and then execute the following in a Smalltalk Workspace: ExcelClient example1 A spreadsheet and a graph window will appear within the Excel application window. This information was placed into Excel via Smalltalk executing a DDE conversation with Excel. Microsoft Word 2.0 Demo ======================= To run the Microsoft Word 2.0 demo, execute the following in a Smalltalk Workspace: SmalltalkServer new inspect. You must make sure that the SmalltalkServer instance is not garbage collected while the conversation between Microsoft Word and Smalltalk is in progress. Either keep an inspector window open on the instance or assign it to a global variable. Start Microsoft Word 2.0 and open the document 'owstdde.doc'. There should be three menu entries under the menu Tools called 'Smalltalk Print It', 'Smalltalk Do It' and 'Smalltalk Inspect It'. You can select text in the Word document and perform the stated operations on the selected text. This text will be sent to Smalltalk for evaluation.