WindowDCHook: Difference between revisions
Appearance
Created page with "This hook is called when a device context is allocated or freed. ==Syntax== WindowDCHook(hab, hdc, hwnd, flAssociate); ==Parameters== ;''hab'' (HAB) - input: The application anchor block. ;''hdc'' (HDC) - input: The current device-context handle. ;''hwnd'' (HWND) - input: The current window handle. ;''flAssociate'' (BOOL) - input: Association flag. :TRUE: Device context has been allocated. :FALSE: Device context has been freed. ;''rc'' (BOOL) - returns: Success indica..." |
(No difference)
|
Latest revision as of 18:43, 13 April 2025
This hook is called when a device context is allocated or freed.
Syntax
WindowDCHook(hab, hdc, hwnd, flAssociate);
Parameters
- hab (HAB) - input
- The application anchor block.
- hdc (HDC) - input
- The current device-context handle.
- hwnd (HWND) - input
- The current window handle.
- flAssociate (BOOL) - input
- Association flag.
- TRUE: Device context has been allocated.
- FALSE: Device context has been freed.
- rc (BOOL) - returns
- Success indicator.
- TRUE: Successful completion.
- FALSE: Errors occurred.
Returns
- rc (BOOL) - returns
- Success indicator.
- TRUE: Successful completion.
- FALSE: Errors occurred.
Example Code
#define INCL_WINHOOKS /* Or use INCL_WIN, INCL_PM, */ #include <os2.h> HAB hab; /* The application anchor block. */ HDC hdc; /* The current device-context handle. */ HWND hwnd; /* The current window handle. */ BOOL flAssociate; /* Association flag. */ BOOL rc; /* Success indicator. */ rc = WindowDCHook(hab, hdc, hwnd, flAssociate);