Help Center

CRichEdit.SetRectNPmethod

Sets the formatting rectangle of a multiline rich edit control.

Windowsmethoddocumented

Syntax

SUB SetRectNP (BYVAL hRichEdit AS HWND, BYVAL fCoord AS LONG, BYVAL prect AS RECT PTR)

Parameters

NameDescription
hRichEditThe handle of the rich edit control.
fCoordRich Edit 3.0 and later: Indicates whether prect specifies absolute or relative coordinates. A value of zero indicates absolute coordinates. A value of 1 indicates offsets relative to the current formatting rectangle. (The offsets can be positive or negative.)
**Edit controls: This parameter is not used and must be zero.
prectA pointer to a RECT structure that specifies the new dimensions of the rectangle. If this parameter is NULL, the formatting rectangle is set to its default values.

Description

Sets the formatting rectangle of a multiline rich edit control. The EM_SETRECTNP message is identical to the EM_SETRECT message, except that EM_SETRECTNP does not redraw the edit control window.

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.

This message is processed only by multiline edit controls. You can send this message to either an edit control or a rich edit control.

Remarks

Rich Edit: Supported in Microsoft Rich Edit 3.0 and later.

Reference

  • Defined in AfxNova/CRichEdit.inc:1167
  • Documented in Windows/WIndows Controls/CRichEdit Class.md
  • Topic: CRichEdit Class