Creating windows in 1C:Enterprise environment





Add-ins can create windows (dialog boxes) for displaying data using the IExtWndsSupport interface. Add-ins can create both modal and nonmodal dialog boxes.

Modal dialog boxes

Modal dialog boxes are created by the add-in itself. A modal dialog box requires specifying the parent window returned by the GetAppMainFrame() method (otherwise the operating system will treat the dialog box as a standalone task with its own taskbar button). 1C:Enterprise functioning is paused until the dialog box is closed.

Nonmodal dialog boxes

Nonmodal dialog boxes are also created by the add-in itself. A nonmodal dialog box requires specifying the parent window returned by the GetAppMDIFrame() method (otherwise the operating system will treat the dialog box as a standalone task with its own taskbar button). The dialog box does not pause 1C:Enterprise functioning and is similar to 1C:Enterprise forms. However, the dialog box is not added to the list of open 1C:Enterprise windows or to the open items panel, and therefore we do not recommend using such dialog boxes (use 1C:Enterprise forms instead).

In 1C:Enterprise, dialog box creation is supported with some limitations for compatibility with existing add-ins. We recommend that you use forms with ActiveX or ActiveDocument controls for displaying custom data in 1C:Enterprise windows. The IExtWndsSupport interface methods are listed below.

Warning! The web client does not support opening windows.

GetAppMainFrame

Description:

Returns the descriptor of the main 1C:Enterprise window.

Syntax:

HRESULT GetAppMainFrame(HWND* pHWnd);

Parameters:

pHWnd

Type: HWND*. Pointer to the window descriptor.

Return value:

  • S_OK

GetAppMDIFrame

Description:

Returns the descriptor of the active 1C:Enterprise window.

Syntax:

HRESULT GetAppMDIFrame(HWND* pHWnd);

Parameters:

pHWnd

Type: HWND*. Pointer to the window descriptor.

Return value:

  • S_OK


Comments
0
Add comment