GetIMLPlusWindowOwner

Prototype

void GetIMLPlusWindowOwner( long[] alHandle )

Parameters

long[] alHandle
Upon return, the first element of this array will contain the operating system window handle of the program's IMLPlus Window Owner. See Remarks for details.

Remarks

For each IMLPlus program, IML Studio creates a special, invisible window called the IMLPlus Window Owner. This module retrieves the operating system window handle of the program's IMLPlus Window Owner. If an IMLPlus program calls a DLL function that creates a new window, the new window must have its owner set to the program's IMLPlus Window Owner. IML Studio uses the IMLPlus Window Owner to control the windows created by the IMLPlus program.

Be aware that IML Studio only allows popup windows to have their owner set to the program's IMLPlus Window Owner. Do not attempt to create child windows whose parent is the program's IMLPlus Window Owner. In Windows, popup windows use the window style bit WS_POPUP and child windows use the window style bit WS_CHILD.

An alternative to calling this module and passing the window handle of the IMLPlus Window Owner to the DLL function is to have the DLL function call IMLStudio.exe directly to obtain the window handle. The C language prototype for the function exported from IMLStudio.exe is:

HWND IMLStudioGetIMLPlusWindowOwner();

This function must be called by the thread that called the user's DLL function and not by another thread created by the DLL function.

Example
declare long[] alHandle = new long[1];
run GetIMLPlusWindowOwner( alHandle );
print (alHandle[0])[format=HEX8.];