SpQueryWindow: Difference between revisions
Appearance
Created page with "Returns the window handle of a window that has a specified relationship to a specified window. '''Syntax:''' hwndRelated = spQueryWindow ( hwnd , relation ) '''Parameters:'''..." |
No edit summary |
||
| Line 44: | Line 44: | ||
CALL ShowInfo 'Frame owner',spQueryWindow(hwnd,'QW_FRAMEOWNER') | CALL ShowInfo 'Frame owner',spQueryWindow(hwnd,'QW_FRAMEOWNER') | ||
[...] | [...] | ||
[[Category:The OS/2 API Project]] | |||
Revision as of 02:40, 6 April 2015
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.
| relation code | description |
|---|---|
| QW_NEXT | Next window in z-order (window below). |
| QW_PREV | Previous window in z-order (window above). |
| QW_TOP | Topmost child window. |
| QW_BOTTOM | Bottommost child window. |
| QW_OWNER | Owner of a window. |
| QW_PARENT | Parent of a window. |
| QW_NEXTTOP | Next window of the owner window hierarchy subject to their z-ordering. |
| QW_PREVTOP | Previous main window. |
| QW_FRAMEOWNER | Owner of hwnd mormalized so that it shares the same parent as hwnd. |
Table 5 Relation codes for spQueryWindow
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') [...]