ITextDocument2::GetClientRect method (tom.h)

Retrieves the client rectangle of the rich edit control.

Syntax

HRESULT GetClientRect(
  [in]  long Type,
  [out] long *pLeft,
  [out] long *pTop,
  [out] long *pRight,
  [out] long *pBottom
);

Parameters

[in] Type

Type: long

The client rectangle retrieval options. It can be a combination of the following values.

Value Meaning
tomClientCoord
Retrieve the rectangle in client coordinates. If this value isn't specified, the function retrieves screen coordinates.
tomIncludeInset
Add left and top insets to the left and top coordinates of the client rectangle, and subtract right and bottom insets from the right and bottom coordinates.
tomTransform
Use a world transform (XFORM) provided by the host application to transform the retrieved rectangle coordinates.

[out] pLeft

Type: long*

The x-coordinate of the upper-left corner of the rectangle.

[out] pTop

Type: long*

The y-coordinate of the upper-left corner of the rectangle.

[out] pRight

Type: long*

The x-coordinate of the lower-right corner of the rectangle.

[out] pBottom

Type: long*

The y-coordinate of the lower-right corner of the rectangle.

Return value

Type: HRESULT

If the method succeeds, it returns NOERROR. Otherwise, it returns an HRESULT error code.

Requirements

Requirement Value
Minimum supported client Windows 8 [desktop apps only]
Minimum supported server Windows Server 2012 [desktop apps only]
Target Platform Windows
Header tom.h
DLL Msftedit.dll

See also

ITextDocument2