Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

CRichEditCtrl::SetBackgroundColor

 

Sets the background color for this CRichEditCtrl object.


      COLORREF SetBackgroundColor(
   BOOL bSysColor,
   COLORREF cr 
);

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 Windows SDK.

Example

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

Requirements

Header: afxcmn.h

Show: