The ExcludeUpdateRgn function prevents drawing within invalid areas of a window by excluding an updated region in the window from a clipping region.
int ExcludeUpdateRgn(
HDC hDC, // handle to device context
HWND hWnd // handle to window
);
The return value specifies the complexity of the excluded region; it can be any one of the following values.
Value | Meaning |
---|---|
COMPLEXREGION | Region consists of more than one rectangle. |
ERROR | An error occurred. |
NULLREGION | Region is empty. |
SIMPLEREGION | Region is a single rectangle. |
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in winuser.h.
Import Library: Use user32.lib.
Painting and Drawing Overview, Painting and Drawing Functions, BeginPaint, GetUpdateRect, GetUpdateRgn, UpdateWindow