bool get_update_rectangle(handle window, irectangle* update, booleErase)
This function obtains the rectangle bounding the update region of a window.
The handle of the window whose update rectangle is being queried.
A pointer to a rectangle that is updated to hold the bounding rectangle of the update region. If this parameter is null, no update rectangle is returned; however, an indication of whether the update region is non-empty is returned. This may be useful for determining whether a paint message was generated as a result of a non-empty update region.
This parameter determines if the background of the update region is to be erased. When this parameter is true and the update region is non-empty, an erase background message is sent to the window.
|The update region is non-empty.
|The update region is empty.
If the window has the style class_style::own_device_context and the mapping mode is not unit::pixel, the bounding rectangle is expressed in logical coordinates; otherwise, it is expressed in client coordinates.
If there is no update region, an empty rectangle results (all coordinates set to zero).
The update rectangle obtained via the function begin_paint is the same as the update rectangle returned by this function. Because begin_paint validates the update region, a call to this function immediately following a call to begin_paint returns an empty update rectangle.