SetSysColors

This function sets the colors for one or more display elements.

BOOL WINAPI SetSysColors( 
int cElements, 
CONST INT *lpaElements, 
CONST COLORREF *lpaRgbValues); 

Parameters

  • cElements
    Specifies the number of display elements in the array pointed to by the lpaElements parameter.
  • lpaElements
    Long pointer to an array of integers that specify the display elements to be changed. For a list of display elements, see GetSysColor.
  • lpaRgbValues
    Long pointer to an array of unsigned long integers that contains the new red, green, blue (RGB) color value for each display element in the array pointed to by the lpaElements parameter.

Return Values

Nonzero indicates success. Zero indicates failure. To get extended error information, call GetLastError.

Remarks

The SetSysColors function sends a WM_SYSCOLORCHANGE message to all windows to inform them of the change in color. It also directs the system to repaint the affected portions of all currently visible windows.

The SetSysColors function changes the current session only. The new colors are not saved when the system terminates.

SetSysColors is not supported in Windows CE for Pocket PC.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 2.0 and later Winuser.h   Winmgr.lib

Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

GetLastError, GetSysColor

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.