Поделиться через


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.

Пример

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

Требования

Header: afxcmn.h

См. также

Основные понятия

CRichEditCtrl Class

CRichEditCtrl Members

Hierarchy Chart

CDC::SetBkColor