Export (0) Print
Expand All

GetClipBox function

The GetClipBox function retrieves the dimensions of the tightest bounding rectangle that can be drawn around the current visible area on the device. The visible area is defined by the current clipping region or clip path, as well as any overlapping windows.

Syntax


int GetClipBox(
  _In_   HDC hdc,
  _Out_  LPRECT lprc
);

Parameters

hdc [in]

A handle to the device context.

lprc [out]

A pointer to a RECT structure that is to receive the rectangle dimensions, in logical units.

Return value

If the function succeeds, the return value specifies the clipping box's complexity and can be one of the following values.

Return codeDescription
NULLREGION

Region is empty.

SIMPLEREGION

Region is a single rectangle.

COMPLEXREGION

Region is more than one rectangle.

ERROR

An error occurred.

 

GetClipBox returns logical coordinates based on the given device context.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Wingdi.h (include Windows.h)

Library

Gdi32.lib

DLL

Gdi32.dll

See also

Clipping Overview
Clipping Functions
RECT

 

 

Community Additions

ADD
Show:
© 2015 Microsoft