ContentsIndexPreviousNext

6.10.13 Qualified ActiveX Control and Object Names

In a screen section item, Format 14 DISPLAY statement, and a CREATE statement, 'control-type-name' or 'object-name' can be a qualified or unqualified name of an ActiveX control or OLE object. ActiveX control and OLE object names are defined in the SPECIAL-NAMES paragraph. The screen designer or AxDefGen generates a copybook for each ActiveX control or OLE object type. You should copy this copybook into the SPECIAL-NAMES paragraph. In rare cases, two different ActiveX controls or OLE objects may have the same name. To use both in a single COBOL source file, you must qualify the names using "IN" or "OF" followed by the name of the "root" object. The "root" object name is defined in the ActiveX copybook following the word "OBJECT".

For example, if a single COBOL source file invokes methods in the "Application" object of both Microsoft Word and Microsoft Excel, it must qualify the "Application" object name as in the following two CREATE statements:

CREATE Application OF Word HANDLE IN WORD-HANDLE.
CREATE Application OF Excel HANDLE IN EXCEL-HANDLE.