Jump to content

WinSetWindowThunkProc: Difference between revisions

From EDM2
Created page with "This function associates a pointer-conversion procedure with a window. ==Syntax== WinSetWindowThunkProc(hwnd, pthunkpr) ==Parameters== ;hwnd (HWND) - input :Window handle...."
 
Ak120 (talk | contribs)
mNo edit summary
 
Line 1: Line 1:
This function associates a pointer-conversion procedure with a window.  
This function associates a pointer-conversion procedure with a window.


==Syntax==
==Syntax==
Line 5: Line 5:


==Parameters==
==Parameters==
;hwnd (HWND) - input
;hwnd (HWND) - input:Window handle.
:Window handle.  
;pthunkpr (PFN) - input:Pointer-conversion procedure identifier.
 
:;NULL:Any existing pointer-conversion procedure is dissociated from this window.  
;pthunkpr (PFN) - input
:;Other:The pointer-conversion procedure to be associated with this window.
: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==
==Returns==
;rc (BOOL) - returns
;rc (BOOL) - returns:Success indicator.
:Success indicator.
:;TRUE:Successful completion  
:;TRUE
:;FALSE:An error occurred.
::Successful completion  
:;FALSE
::An error occurred.


==Example Code==
==Example Code==
Line 27: Line 19:
<pre>
<pre>
#define INCL_WINTHUNKAPI
#define INCL_WINTHUNKAPI
#include <OS2.H>
#include <os2.h>


HWND hwnd;
HWND hwnd;


WinSetWindowThunkProc(hwnd, NULL);
WinSetWindowThunkProc(hwnd, NULL);
</pre>
</pre>


Line 52: Line 43:
* [[WinQueryWindowThunkProc]]
* [[WinQueryWindowThunkProc]]
* [[WinSetClassThunkProc]]
* [[WinSetClassThunkProc]]
[[Category:Win]]
[[Category:Win]]

Latest revision as of 20:41, 27 November 2023

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