This example sets the pointer conversion procedure of the window class, given that we have an anchor-block handle.

#define INCL_WINWINDOWMGR
#define INCL_WINTHUNKAPI
#include <OS2.H>

LONG thunkpr(LONG *p);  /* prototype definition. */
main()
{
HAB hab;
PFN pfn;
char *classname;

WinQueryClassName(hab,
                  sizeof(classname),
                  classname);

WinSetClassThunkProc(classname,
                     (PFN)thunkpr);

}

LONG thunkpr(LONG *p)
{
/* 16-bit to 32-bit pointer conversion procedure. */
}


[Back] [Next]