This example obtains a pointer to the window procedure of the window class, given that we know the window handle.

#define INCL_WINWINDOWMGR

#include <OS2.H>

HAB       hab;
HWND      hwnd;
CLASSINFO classinfo;
PFNWP     pWindowProc;
char      *classname;

WinQueryClassName(hwnd,
                  sizeof(classname),
                  classname);

WinQueryClassInfo(hwnd,
                  classname,
                  &classinfo);

pWindowProc = classinfo.pfnWindowProc;


[Back] [Next]