Export (0) Print
Expand All
MFC
Expand Minimize

CRichEditCtrl::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 TRUE, cr is ignored.

cr

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

The previous background color for this CRichEditCtrl object.

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.

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

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

Community Additions

ADD
Show:
© 2014 Microsoft