Jump to content

WinSetWindowThunkProc

From EDM2
Revision as of 20:41, 27 November 2023 by Ak120 (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This function associates a pointer-conversion procedure with a window.

Syntax

WinSetWindowThunkProc(hwnd, pthunkpr)

Parameters

hwnd (HWND) - input
Window handle.
pthunkpr (PFN) - input
Pointer-conversion procedure identifier.
NULL
Any existing pointer-conversion procedure is dissociated from this window.
Other
The pointer-conversion procedure to be associated with this window.

Returns

rc (BOOL) - returns
Success indicator.
TRUE
Successful completion
FALSE
An error occurred.

Example Code

In this example, any thunking procedure is dissociated from the window.

#define INCL_WINTHUNKAPI
#include <os2.h>

HWND hwnd;

WinSetWindowThunkProc(hwnd, NULL);

Definition

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

HWND    hwnd;      /*  Window handle. */
PFN     pthunkpr;  /*  Pointer-conversion procedure identifier. */
BOOL    rc;        /*  Success indicator. */

rc = WinSetWindowThunkProc(hwnd, pthunkpr);

Related Functions