int get_clip_box(handle device,
                 rectangle* clip)

This function obtains the dimensions of the bounding rectangle of the current visible area of the device.


handle device

The handle of the device context whose clipping box is being queried.

rectangle* clip

A pointer to a rectangle to receive the dimensions (in logical units) of the clipping box.



Value Meaning
region_type::null The region is empty.
region_type::simple The region is a single rectangle.
region_type::complex The region is more than one rectangle.
region_type::error An error occurred.


The visible area is defined by the clipping region or clipping path (with overlapping windows being taken into account).