void SetRect( LPCRECT lpRect );
Parameters
lpRect
CRect or pointer to a RECT that indicates the new bounds for the formatting rectangle.
Remarks
Call this function to set the formatting rectangle for this CRichEditCtrl object. The formatting rectangle is the limiting rectangle for the text. The limiting rectangle is independent of the size of the rich edit control window. When this CRichEditCtrl object is first created, the formatting rectangle is the same size as the client area of the window. Use SetRect to make the formatting rectangle larger or smaller than the rich edit window.
For more information, see EM_SETRECT in the Win32 documentation.
Example
// The pointer to my rich edit control.
extern CRichEditCtrl* pmyRichEditCtrl;
CRect r;
pmyRichEditCtrl->GetRect(&r);
// Reduce the formatting rect of the rich edit control by
// 10 pixels on each side.
if ((r.Width() > 20) && (r.Height() > 20))
{
r.DeflateRect(0, 20);
pmyRichEditCtrl->SetRect(&r);
}
CRichEditCtrl Overview | Class Members | Hierarchy Chart
See Also CRichEditCtrl::GetRect