This is a window procedure that automatically subclasses each instance of a dialog box.
#define INCL_WINDIALOGS /* Or use INCL_WIN, INCL_PM, Also in COMMON section */
#include <os2.h>
HWND hwnd; /* Handle of the window to which the message applies. */
USHORT usmsg; /* Message identity. */
MPARAM mpParam1; /* Message parameter 1. */
MPARAM mpParam2; /* Message parameter 2. */
MRESULT mresReply; /* Message-return data. */
mresReply = DialogProc(hwnd, usmsg, mpParam1,
mpParam2);