Link to home
Start Free TrialLog in
Avatar of markburns90
markburns90

asked on

colour problem

i have flatstyle's FlatColorComboBox and was wondering how can i change the the colors of the following thinks in windows in SEPARATE BUTTON CLICKS!

MENU

CAPTION TEXT

WINDOW

BACKGROUND

and if possible restore ALL back to normal!
Avatar of edey
edey

System Wide, or just in your app?

Gl
Mike
Avatar of markburns90

ASKER

system wide!!!
SetSysColors
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
);
 
Parameters
cElements
Specifies the number of display elements in the array pointed to by the lpaElements parameter.
lpaElements
Pointer to an array of integers that specify the display elements to be changed. For a list of display elements, see GetSysColor.
lpaRgbValues
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
If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, callGetLastError.

When you set the colors using SetSysColors()the color change won't be permanent. It will last until you reboot, then the previous colors will be set.

To make the change permanent, have a look at the [colors] section in the file win.ini. You can change the colors there and the change will be permanent.

Hope this helps,
Viktor
ASKER CERTIFIED SOLUTION
Avatar of piscean
piscean

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
any source code examples PLEASE?
So what did you do? Did you log off the user or you did a much more clever one? (hehehe ...)