Jump to content

SpQueryWindow: Difference between revisions

From EDM2
Ak120 (talk | contribs)
mNo edit summary
Line 6: Line 6:
* relation – Type of window information to be returned.
* relation – Type of window information to be returned.


{| border="1"
{|class="wikitable"
|-
|+Table 5 Relation codes for spQueryWindow
!relation code !!description
!relation code !!description
|-
|-
Line 27: Line 27:
|-
|-
|QW_FRAMEOWNER|| Owner of hwnd mormalized so that it shares the same parent as hwnd.
|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.
'''Returns:''' Handle of window related to hwnd.
Line 45: Line 42:
  [...]
  [...]


[[Category:The OS/2 API Project]]
[[Category:SpUtils]]

Revision as of 23:55, 26 February 2017

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.
Table 5 Relation codes for spQueryWindow
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.

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')
[...]