Windows Dev Center

ITextRange2::GetRect method

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

Syntax


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

Parameters

Type [in]

Type: long

The type of rectangle to return. This parameter can include one value from each of the following tables.

tomAllowOffClient
tomClientCoord
tomObjectArg
tomTransform

Use one of these values to indicate the vertical position:

TA_TOPTop edge of the bounding rectangle.
TA_BASELINEBase line of the text.
TA_BOTTOMBottom edge of the bounding rectangle.

 

Use one of these values to indicate the horizontal position:

TA_LEFTLeft edge of the bounding rectangle.
TA_CENTERCenter of the bounding rectangle.
TA_RIGHTRight edge of the bounding rectangle.

 

pLeft [out]

Type: long*

The left rectangle coordinate.

pTop [out]

Type: long*

The top rectangle coordinate.

pRight [out]

Type: long*

The right rectangle coordinate.

pBottom [out]

Type: long*

The bottom rectangle coordinate.

pHit [out]

Type: long*

The hit-test value for the range.

Return value

Type: HRESULT

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

Requirements

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

Tom.h

DLL

Msftedit.dll

See also

ITextRange2

 

 

Community Additions

ADD
Show:
© 2015 Microsoft