This function sends a message with identity ulMsgid to hwnd, passing mpParam1 and mpParam2 as the parameters to the window.
#define INCL_WINMESSAGEMGR /* Or use INCL_WIN, INCL_PM, Also in COMMON section */ #include <os2.h> HWND hwnd; /* Window handle. */ ULONG ulMsgid; /* Message identity. */ MPARAM mpParam1; /* Parameter 1. */ MPARAM mpParam2; /* Parameter 2. */ MRESULT mresReply; /* Message-return data. */ mresReply = WinSendMsg(hwnd, ulMsgid, mpParam1, mpParam2);