Newsgroups: comp.windows.ms.programmer Path: utzoo!utgpu!watserv1!watmath!hyper.hyper.com!bonneau From: bonneau@hyper.hyper.com (Paul Bonneau) Subject: Re: Standard Way to Specify Colors? Message-ID: <1991May7.225447.8616@hyper.hyper.com> Reply-To: bonneau@hyper.UUCP (Paul Bonneau,,) Organization: HyperCube Inc. References: <1991May7.011322.12743@mnemosyne.cs.du.edu> Date: Tue, 7 May 1991 22:54:47 GMT In article <1991May7.011322.12743@mnemosyne.cs.du.edu> ebergman@isis.cs.du.edu (Eric Bergman-Terrell) writes: > >However, is there a built-in way to do this (I'm dreading writing the code - >which I expect won't be too bad). For example, the "colors" option of the >control panel lets the user specify some colors, but I cannot find any >routines to access those colors (I have Petzold, Guide to Programming, & >Programmer's Reference). Let me know if you know of some routines that >can get the RGB values of those colors... > If I understand correctly, you simply want the RGB values of the system-wide colors set via the control panel? If so, do int clr; DWORD rgrgb[COLOR_ENDCOLORS - COLOR_SCROLLBAR + 1]; for (clr = COLOR_SCROLLBAR; clr <= COLOR_ENDCOLORS; clr++) rgrgb[clr - COLOR_SCROLLBAR] = GetSysColor(clr); cheers - Paul Bonneau.