다음을 통해 공유


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.

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

Example

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

Requirements

Header: afxcmn.h

See Also

Reference

CRichEditCtrl Class

Hierarchy Chart

CDC::SetBkColor

Other Resources

CRichEditCtrl Members