Jump to content

DestroyWindowHook

From EDM2
Revision as of 04:52, 13 April 2025 by Martini (talk | contribs) (Created page with "This hook is called whenever a window is destroyed. ==Syntax== DestroyWindowHook(hab, hwnd, ulReserved); ==Parameters== ;''hab'' (HAB) - input: Anchor-block handle. ;''hwnd'' (HWND) - input: The handle of the window being destroyed. ;''ulReserved'' (ULONG) - input: Reserved. ==Returns== ;''rc'' (BOOL) - returns: Success indicator. :TRUE: Successful completion :FALSE: Error occurred. ==Remarks== This hook is sent after the WM_DESTROY message has been sent and jus...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This hook is called whenever a window is destroyed.

Syntax

DestroyWindowHook(hab, hwnd, ulReserved);

Parameters

hab (HAB) - input
Anchor-block handle.
hwnd (HWND) - input
The handle of the window being destroyed.
ulReserved (ULONG) - input
Reserved.

Returns

rc (BOOL) - returns
Success indicator.
TRUE: Successful completion
FALSE: Error occurred.

Remarks

This hook is sent after the WM_DESTROY message has been sent and just before the window becomes invalid.

Related Messages

Example Code

#define INCL_WINHOOKS /* Or use INCL_WIN, INCL_PM, */
#include <os2.h>

HAB     hab;        /* Anchor-block handle. */
HWND    hwnd;       /* The handle of the window being destroyed. */
ULONG   ulReserved; /* Reserved. */
BOOL    rc;         /* Success indicator. */

rc = DestroyWindowHook(hab, hwnd, ulReserved);