MSDN Home >  MSDN Library >  User Interface Design and Development >  Windows Controls >  Individual Control Information >  Rich Edit Controls > 

EM_SETBKGNDCOLOR Message


The EM_SETBKGNDCOLOR message sets the background color for a rich edit control.

Syntax

To send this message, call the SendMessage function as follows.
lResult = SendMessage(     // returns LRESULT in lResult
   (HWND) hWndControl,     // handle to destination control
   (UINT) EM_SETBKGNDCOLOR,     // message ID
   (WPARAM) wParam,     // = (WPARAM) () wParam;
   (LPARAM) lParam     // = (LPARAM) () lParam;
);

Parameters

wParam
Specifies whether to use the system color. If this parameter is a nonzero value, the background is set to the window background system color. Otherwise, the background is set to the specified color.
lParam
A COLORREF structure specifying the color if wParam is zero. To generate a COLORREF, use the RGB macro.

Return Value

This message returns the original background color.


Message Information

HeaderDeclared in Richedit.h
Minimum operating systems Windows 95, Windows NT 4.0

See Also

Rich Edit Controls, COLORREF, RGB
 Contact Us   |  E-Mail this Page   |  MSDN Flash Newsletter
 c 2002 Microsoft Corporation. All rights reserved.   Terms of Use  Privacy Statement   Accessibility