int get_window_region_box(handle window,
                          irectangle* region_rectangle)

This function obtains the rectangle surrounding the region of a window.


handle window

The handle of the window whose region is being queried.

rectangle* region_tectangle

A pointer to a rectangle that is updated to contain the smallest rectangle surrounding the region of the window.



The type of the region that the function obtains. It can be one of the following values.

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 The specified window does not have a region, or an error occurred while attempting to return the region's bounding rectangle.


The window region determines the area within the window where the system permits drawing. The system does not display any portion of a window that lies outside of the window region. The coordinates of a window's window region are relative to the upper-left corner of the window, not the client area of the window.

To set the window region of a window, call the function set_window_region.