Muokkaa

Jaa


EM_GETRECT message

Gets 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. You can send this message to either an edit control or a rich edit control.

Parameters

wParam

This parameter is not used.

lParam

A pointer to a RECT structure that receives the formatting rectangle.

Return value

The return value is not meaningful.

Remarks

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

Under certain conditions, EM_GETRECT might not return the exact values that EM_SETRECT or EM_SETRECTNP set it will be approximately correct, but it can be off by a few pixels.

Rich Edit: Supported in Microsoft Rich Edit 1.0 and later. 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. For information about the compatibility of rich edit versions with the various system versions, see About Rich Edit Controls.

Requirements

Requirement Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2003 [desktop apps only]
Header
Winuser.h (include Windows.h)

See also

Reference

EM_SETRECT

EM_SETRECTNP

Other Resources

RECT