WinQueryAnchorBlock: Difference between revisions
Appearance
Created page with " This function returns the anchor block handle of the caller. ==Syntax== WinQueryAnchorBlock(hwnd) ==Parameters== ;hwnd (HWND) - input :Window handle. ==Returns== ;hab (..." |
mNo edit summary |
||
Line 1: | Line 1: | ||
This function returns the anchor block handle of the caller. | |||
==Syntax== | ==Syntax== | ||
WinQueryAnchorBlock(hwnd) | WinQueryAnchorBlock(hwnd) | ||
==Parameters== | ==Parameters== | ||
;hwnd (HWND) - input | ;hwnd (HWND) - input:Window handle. | ||
:Window handle. | |||
==Returns== | ==Returns== | ||
;hab (HAB) - returns | ;hab (HAB) - returns:Anchor block handle. | ||
:Anchor block handle. | :;NULLHANDLE:Invalid hwnd parameter | ||
:;NULLHANDLE | :;Other:Anchor block handle. | ||
:;Other | |||
==Errors== | ==Errors== | ||
Possible returns from WinGetLastError | Possible returns from WinGetLastError | ||
;PMERR_INVALID_HWND (0x1001) | ;PMERR_INVALID_HWND (0x1001):An invalid window handle was specified. | ||
:An invalid window handle was specified. | |||
==Example Code== | ==Example Code== | ||
Line 32: | Line 26: | ||
hab = WinQueryAnchorBlock(hwnd); | hab = WinQueryAnchorBlock(hwnd); | ||
</pre> | </pre> | ||
Line 45: | Line 38: | ||
hab = WinQueryAnchorBlock(hwnd); | hab = WinQueryAnchorBlock(hwnd); | ||
</pre> | </pre> | ||
[[Category:Win]] | [[Category:Win]] |
Latest revision as of 14:16, 4 October 2023
This function returns the anchor block handle of the caller.
Syntax
WinQueryAnchorBlock(hwnd)
Parameters
- hwnd (HWND) - input
- Window handle.
Returns
- hab (HAB) - returns
- Anchor block handle.
- NULLHANDLE
- Invalid hwnd parameter
- Other
- Anchor block handle.
Errors
Possible returns from WinGetLastError
- PMERR_INVALID_HWND (0x1001)
- An invalid window handle was specified.
Example Code
This function obtains the anchor block handle of the caller.
#define INCL_WINWINDOWMGR #include <OS2.H> HAB hab; HWND hwnd; hab = WinQueryAnchorBlock(hwnd);
Definition
#define INCL_WINWINDOWMGR /* Or use INCL_WIN, INCL_PM, Also in COMMON section */ #include <os2.h> HWND hwnd; /* Window handle. */ HAB hab; /* Anchor block handle. */ hab = WinQueryAnchorBlock(hwnd);