UINT SetBoundsRect(hdc, lprcBounds, flags) | |||||
HDC hdc; | /* handle of device context | */ | |||
const RECT FAR* lprcBounds; | /* address of structure for rectangle | */ | |||
UINT flags; | /* specifies information to return | */ |
The SetBoundsRect function controls the accumulation of bounding-rectangle information for the specified device context.
hdc
Identifies the device context to accumulate bounding rectangles for.
lprcBounds
Points to a RECT structure that is used to set the bounding rectangle. Rectangle dimensions are given in logical coordinates. This parameter can be NULL. The RECT structure has the following form:
typedef struct tagRECT { /* rc */
int left;
int top;
int right;
int bottom;
} RECT;
For a full description of this structure, see the Microsoft Windows Programmer's Reference, Volume 3.
flags
Specifies how the new rectangle will be combined with the accumulated rectangle. This parameter may be a combination of the following values:
Value | Meaning |
DCB_ACCUMULATE | Add the rectangle specified by the lprcBounds parameter to the bounding rectangle (using a rectangle union operation). |
DCB_DISABLE | Turn off bounds accumulation. |
DCB_ENABLE | Turn on bounds accumulation. (The default setting for bounds accumulation is disabled.) |
The return value is the current state of the bounding rectangle, if the function is successful. Like the flags parameter, the return value can be a combination of the following values:
Value | Meaning |
DCB_ACCUMULATE | The bounding rectangle is not empty. (This value will always be set.) |
DCB_DISABLE | Bounds accumulation is off. |
DCB_ENABLE | Bounds accumulation is on. |
Windows can maintain a bounding rectangle for all drawing operations. This rectangle can be queried and reset by the application. The drawing bounds are useful for invalidating bitmap caches.