Help Center

RichEdit_GetRectsub

Retrieves the formatting rectangle of a rich edit control.

Windowssubdocumented

Syntax

SUB RichEdit_GetRect (BYVAL hRichEdit AS HWND, BYVAL prc AS RECT PTR)

Parameters

NameDescription
hRichEditThe handle of the rich edit control.
prcA pointer to a RECT structure that receives the formatting rectangle.

Description

Retrieves the formatting rectangle of an edit control. The formatting rectangle is the limiting rectangle into which the control draws the text. The limiting rectangle is independent of the size of the edit-control window.

Remarks

You can modify the formatting rectangle of a multiline edit control by using the RichEdit_SeRect and RichEdit_SeRectNP messages.

Under certain conditions, RichEdit_GetRect might not return the exact values that RichEdit_SeRect and RichEdit_SeRectNP set it will be approximately correct, but it can be off by a few pixels.

The formatting rectangle does not include the selection bar, which is an unmarked area to the left of each paragraph. When clicked, the selection bar selects the line.

Reference

  • Defined in AfxNova/AfxRichEdit.inc:421
  • Documented in Windows/WIndows Controls/RichEdit/RichEdit Procedures.md
  • Topic: RichEdit Procedures