get_window_region


int get_window_region(handle window,
                        handle region)

This function obtains a copy of the region of a window. The region of a window is set by calling the function set_window_region. 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.

Parameters

handle window

The handle of the window whose region is being queried.

handle region

The handle of a region that is updated to contain the region for the window.

Return

int

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.

Notes

The coordinates of a window's region are relative to the upper-left corner of the window, not the client area of the window.