修改richedit背景

RichEditCtrl::SetBackgroundColor 

 

Sets the background color for this CRichEditCtrl object.

COLORREF SetBackgroundColor(
   BOOL bSysColor,
   COLORREF cr 
);

 

Parameters

bSysColor

Indicates if the background color should be set to the system value. If this value is TRUEcr is ignored.

cr

The requested background color. Used only if bSysColor is FALSE.

Return Value

The previous background color for this CRichEditCtrl object.

Remarks

The background color can be set to the system value or to a specified COLORREF value.

For more information, see EM_SETBKGNDCOLOR message and COLORREF structure in the Platform SDK.

Example

// The pointer to my rich edit control.
extern CRichEditCtrl* pmyRichEditCtrl;

// Use red as the background color. 
pmyRichEditCtrl->SetBackgroundColor(FALSE, RGB(255,0, 0));

你可能感兴趣的:(it)