This example uses the WinUpdateWindow call to send a WM_PAINT message to a window procedure.
#define INCL_WINWINDOWMGR #include <OS2.H> #define WM_USERDEF WM_USER + 1 main() { } static MRESULT ClientWindowProc( HWND hwnd, USHORT msg, MPARAM mp1, MPARAM mp2 ) { switch(msg) { case WM_PAINT: break; case WM_USERDEF: WinUpdateWindow(hwnd); } }