
: wParam
EC_LEFTMARGIN
EC_RIGHTMARGIN
: lParam
The LOWORD specifies the new width of the left margin, in pixels. This value is ignored if wParam does not include EC_LEFTMARGIN
The HIWORD specifies the new width of the right margin, in pixels. This value is ignored if wParam does not include EC_RIGHTMARGIN.

EM_SETRECT
wParam
.parameter is not used and must be zero
lParam
A 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
RECT rc
'Get the current control rectangle
(SendMessage(hWndRichEdit,EM_GETRECT,0,ByVal rc
rc.left += 20 'increase the left margin
rc.top += 20 'increase the top margin
rc.right -= 20 'decrease the right margin
rc.bottom -= 20 'decrease the bottom margin (rectangle) ' Set the rectangle
(SendMessage(hWndRichEdit,EM_SETRECT,0,ByVal rc