The GetClipBox function retrieves the dimensions of the tightest bounding rectangle that can be drawn around the current visible area on the device. The visible area is defined by the current clipping region or clip path, as well as any overlapping windows.
int GetClipBox( HDC hdc, LPRECT lprect );
A handle to the device context.
A pointer to a RECT structure that is to receive the rectangle dimensions, in logical units.
If the function succeeds, the return value specifies the clipping box's complexity and can be one of the following values.
||Region is empty.|
||Region is a single rectangle.|
||Region is more than one rectangle.|
||An error occurred.|
GetClipBox returns logical coordinates based on the given device context.
|Minimum supported client||Windows 2000 Professional [desktop apps only]|
|Minimum supported server||Windows 2000 Server [desktop apps only]|
|Header||wingdi.h (include Windows.h)|