The SetSysColors function sets the colors for one or more display elements. Display elements are the various parts of a window and the display that appear on the system display screen.
BOOL WINAPI SetSysColors(
int cElements, // number of elements to change
CONST INT *lpaElements, // address of array of elements
CONST COLORREF *lpaRgbValues // address of array of RGB values
);
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
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.
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in winuser.h.
Import Library: Use user32.lib.
System Information Overview, System Information Functions, GetSysColor