User Tools

Site Tools


ole_overview.htm
Navigation:  Language Reference > App A - DDE, OLE, and OCX > Object Linking and Embedding >====== OLE Overview ====== Previous pageReturn to chapter overviewNext page

Object Linking and Embedding (OLE) allows “objects” from one application to be linked or embedded into a “document” (data structure) of another application. The application that creates and maintains the object is an OLE Server application, while the application that contains the object is an OLE Controller application (sometimes referred to as an OLE Client application). OLE “objects” are data structures appropriate to the OLE Server application (such as a chart from a spreadsheet, or an image from a paint or drawing application). The object is placed in a “container window” in the Controller application. In Clarion for Windows, “container windows” are OLE controls.

Clarion's implementation of OLE allows a Clarion for Windows application to serve as an OLE Controller application, linking or embedding objects from any OLE Server application. Clarion also supports OLE Automation, which gives an OLE Controller application dynamic control of the OLE Server application, using the OLE Server's macro language.

Object Linking

Object Linking generally means the OLE Controller application stores “pointer” information to the object, whether that object is the entire data structure (like a spreadsheet file) or a component of the data structure (like a range of cells in a spreadsheet). When an Object is linked into the OLE Controller application the OLE Controller application contains only the information necessary to reference the linked data. This can be stored in either a BLOB or an OLE Compound Storage file.

Object Embedding

Object Embedding generally means the OLE Controller application stores the entire object, independently of the OLE Server application. An Object embedded into the OLE Controller application does not exist as a separate data file which the OLE Server application may access. The OLE Controller application completely contains the active object, which can be stored in either a BLOB or an OLE Compound Storage file.

Maintaining the OLE Object

Any object in the OLE Controller application, whether linked or embedded, is maintained by the OLE Server application which created it, not the OLE Controller application. This means that when the user wants to change the object, the OLE Controller application activates the OLE Server application to make the changes. There are two ways to activate an OLE Server: “in-place activation” and “open-mode.”

In-place activation

In-place activation means the user seems to stay in the OLE Controller application, but the OLE Server's menus and toolbar merge into the OLE Controller 's menus and toolbar and the OLE Server is the currently executing application. The Object being edited has a “hash-mark” border to indicate that it is in edit-mode.

If the OLE Server application has one or more toolbars then the toolbars will appear either as pop-up toolbars or as toolbars attached to one of the edges of the frame, or a combination of both. This can appear to “push down” the controls on your window, so take care designing your window.

Open-mode activation

Open-mode activation means the user is switched into the OLE Server application executing in a separate window. The Object being edited is in the Server application and ready to edit, while the Object in the OLE Controller application has “hash-marks” completely covering it to indicate a separate window is editing the object.

ole_overview.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1