This example uses the WinRegisterUserMsg call to register a user-defined message and define its parameters.
#define INCL_WINMESSAGEMGR #define INCL_WINTYPES #include <OS2.H> #define WM_MY_MESSAGE WM_USER + 11 HAB hab; WinRegisterUserMessage(hab, WM_MY_MESSAGE, DTYP_BIT16, /* param1 is a USHORT */ RUM_INOUT, /* param1 is input/output */ DTYP_BIT16, /* param2 is a USHORT */ RUM_INOUT, /* param2 is input/output */ DTYP_BIT16); /* reply is a USHORT */