Customizer's Guide > Working with ActiveX Controls > Running Arbortext Editor in an ActiveX Control > show Method
  
show Method
Opens an existing resource based on its ACL document ID as a Arbortext Editor document and displays it in the ActiveX embedded Arbortext Editor window. In contrast to the open method, the show method enables you to dynamically create an in-memory document that might not have been saved at all and display it in the ActiveX embedded window.
This method first closes the current document (if any) and prompts the user to save it (if modified). Note that at the Save prompt, the user might Cancel the operation. In this case, the current document is left intact and this method returns an error.
If you do not want the user to see a Save prompt, then you can call the close method to close the current document explicitly before calling the show method.
show(documentId [, windowFlags [, xuiPath]] )
Parameters
StringdocumentId
Represents the ACL document identifier for an already document.
intwindowFlags
[optional] Defaults to 0. A bitmask that specifies window options.
Constructed by ORing the bits from the following enumeration:
0x00001 - Supply vertical scrollbar (pane).
0x00002 - Supply menu bar. If this is set then the Menu toolbar button will be shown. If this is not set, the Menu toolbar button is not shown and there will be no way to bring up menus.
The menu bar is part of the Edit toolbar (Toolbar 1) — 0x00020. Toolbar 1 must be supplied to enable the display of the menu bar.
0x00004 - Supply command subwindow.
0x00008 -Supply message footer subwindow.
0x00010 - Automatically call ADocument.close() on the attached document when the window is destroyed. (pane).
0x00020 -Supply the Edit toolbar (that is, Toolbar 1) (pane).
0x00080 - Supply horizontal scrollbar (pane).
0x00100 - Do edit command intializations, include reading the document type instance command files ( instance.acl and instance.js) and document command files (docname.acl and docname .js) if they exist, and calling the ACL editfilehook when a document is attached to the window. This bit applies only to edit class windows (pane).
0x01000 - Supply a table column width ruler (pane).
0x02000 - Supply a table row height ruler (pane).
0x04000 - Supply the Markup toolbar (that is, Toolbar 2).
0x08000 - Supply the Table toolbar (that is, Toolbar 3).
0x10000 - Supply the Application toolbar (that is, Toolbar 4).
If a menu bar is requested, it must be initialized using the menu_load or menu_add ACL commands before the window is first displayed.
If a message footer is created, error messages and output from the message ACL command are displayed in the left part of the footer if the message is short enough (otherwise a popup dialog box is used). Any messages directed to the message footer are considered transient and are erased on the next key or button event received in the window.
If this parameter is omitted or zero, it behaves as if the following value were given: 0x9F9FF. This corresponds to the internal ACL constants (h::winMaskMain | h::winMaskEditStyle) which are used to create default “edit” windows. Over time, these constant might change, so this ensures the latest defaults are used.
Regardless of the value given, the following bits will be forcibly set:0x80850. This ensures that some window properties are set that are absolutely required for the control to work properly.
To cause the document to be shown with an absolute minimum of window artifacts (toolbars, scroll bars, status bar, etc..), any non-empty subset of 0x80850 can be used. For example: 0x00040.
* 
If a 0 value is given, the 0x9F9FF value is used. this value includes the 0x00010 bit, which causes the document to be closed when the user closes the Embedded Frame window.
If you want the given document to remain open after the Embedded Frame window is closed, then don't use a 0 value for the windowFlags. Instead, use a non-zero bitmask that does not have the 0x00010 bit set.
StringxuiPath
[optional] Defaults to an empty string. An optional parameter used to supply an alternative XUI file to define the toolbars used by the edit window. If xuiPath is not supplied (or empty), then Arbortext-path\lib\dialogs\editwindow.xml is used.
Returns
The ACL ID of the possibly new window that was loaded as a result of this call.
A value of –1 can be returned if a documentId parameter value of -1 was given.
Throws
A COM error will be returned to the caller for the following cases:
User canceled at the save prompt or at some prompt while opening the requested document. In this case, returns an HRESULT value of 0x800704C7 which enables the caller to distinguish this case from other types of failures.
This represents a FACILITY of FACILITY_WIN32 and a WIN32 error code of ERROR_CANCELLED.
An invalid documentId was provided. In this case. the HRESULT will be E_FAIL