This example invalidates the entire window by adding the whole window to the window's update region using WinInvalidateRegion. This single call accomplishes the same as paired calls to WinQueryWindowRect and WinInvalidateRect. If less than the entire window is desired, the NULL value in the second parameter can be replaced with a region handle that corresponds to a subregion of the window.
#define INCL_WINWINDOWMGR /* Window Manager Functions */ #include <os2.h> HWND hwnd; /* window handle */ WinInvalidateRegion(hwnd, NULLHANDLE, 0);