Help Center

CTextRange2.GetRectmethod

Retrieves a rectangle of the specified type for the current range.

Windowsmethoddocumented

Syntax

FUNCTION GetRect (BYVAL nType AS LONG, BYVAL pLeft AS LONG PTR, BYVAL pTop AS LONG PTR, BYVAL pRight AS LONG PTR, BYVAL pBottom AS LONG PTR, BYVAL pHit AS LONG PTR) AS HRESULT

Parameters

NameDescription
pTypeThe type of rectangle to return. This parameter can include one value from each of the tables below.
pLeftThe left rectangle coordinate.
pTopThe top rectangle coordinate.
pRightThe right rectangle coordinate.
pBottomThe bottom rectangle coordinate.
pHitThe hit-test value for the range.

Return value

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

Description

Retrieves a rectangle of the specified type for the current range.

Use one of the following values to indicate the vertical position.

Use one of the following values to indicate the horizontal position.

Reference

  • Defined in AfxNova/CTextRange2.inc:1018
  • Documented in Windows/WIndows Controls/RichEdit/CTextRange2 Class.md
  • Topic: CTextRange2 Class