Jump to content

WinQueryAnchorBlock

From EDM2
Revision as of 23:00, 6 August 2023 by Martini (talk | contribs) (Created page with " This function returns the anchor block handle of the caller. ==Syntax== WinQueryAnchorBlock(hwnd) ==Parameters== ;hwnd (HWND) - input :Window handle. ==Returns== ;hab (...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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);