EM_GETRECT

2.x

EM_GETRECT
wParam = 0;                         /* not used, must be zero    */
lParam = (LPARAM) (RECT FAR*) lprc; /* address of RECT structure */

An application sends an EM_GETRECT message to retrieve the formatting rectangle of an edit control. The formatting rectangle is the limiting rectangle of the text. The limiting rectangle is independent of the size of the edit-control window.

Parameters

lprc

Value of lParam. Points to the RECT structure that receives the formatting rectangle. The RECT structure has the following form:

typedef struct tagRECT {    /* rc */
   int left;
   int top;
   int right;
   int bottom;
} RECT;

Return Value

The return value is not a meaningful value.

Comments

The formatting rectangle of a multiline edit control can be modified by the EM_SETRECT and EM_SETRECTNP messages.

Example

This example sends an EM_GETRECT message to retrieve the formatting rectangle of an edit control:

RECT rcl;

SendDlgItemMessage(hdlg, ID_MYEDITCONTROL,
    EM_GETRECT, 0, (DWORD) ((LPRECT) &rcl));

See Also

EM_SETRECT