SpQueryWindow

Returns the window handle of a window that has a specified relationship to a specified window.

Syntax: hwndRelated = spQueryWindow ( hwnd, relation ) Parameters:
 * hwnd – Handle of window to be queried.
 * relation – Type of window information to be returned.

Returns: Handle of window related to hwnd.

Example code: (part of spIsWindow example code)

/* wininfo.cmd (spUtils Example Code) */ [...] hwnd=spQueryFocus CALL ShowInfo 'Focus window',hwnd CALL ShowInfo 'Parent window',spQueryWindow(hwnd,'QW_PARENT') CALL ShowInfo 'Owner window',spQueryWindow(hwnd,'QW_OWNER') CALL ShowInfo 'Frame owner',spQueryWindow(hwnd,'QW_FRAMEOWNER') [...]