Board index » cppbuilder » XP Windows Explorer colors

XP Windows Explorer colors


2005-08-09 10:16:45 PM
cppbuilder28
www.pbsoftware.com/images/sample.jpg
How do I get the color values for the Windows Explorer controls pictured in
the sample image above?
 
 

Re:XP Windows Explorer colors

I don't think those colors are easily available with a Windows call.
One thing I've done to see what colors are used is to run SuperMagnify. It
displays the RGB value of the color where the cursor is located. If you do
not have it, google for SMAG10.EXE - it's freeware and many sites on the web
have it posted for download.
. Ed
Quote
Bob wrote in message
news:42f8bacc$ XXXX@XXXXX.COM ...
www.pbsoftware.com/images/sample.jpg

How do I get the color values for the Windows Explorer controls pictured
in the sample image above?
 

Re:XP Windows Explorer colors

I am writing some custom controls and I would like my colors to match
Microsofts colors. I wanted to do it with code.
"Ed Mulroy" < XXXX@XXXXX.COM >wrote in message
Quote
I don't think those colors are easily available with a Windows call.

One thing I've done to see what colors are used is to run SuperMagnify.
It displays the RGB value of the color where the cursor is located. If
you do not have it, google for SMAG10.EXE - it's freeware and many sites
on the web have it posted for download.

. Ed

>Bob wrote in message
>news:42f8bacc$ XXXX@XXXXX.COM ...
>www.pbsoftware.com/images/sample.jpg
>
>How do I get the color values for the Windows Explorer controls pictured
>in the sample image above?


 

{smallsort}

Re:XP Windows Explorer colors

"Bob" < XXXX@XXXXX.COM >wrote in message
Quote
www.pbsoftware.com/images/sample.jpg

How do I get the color values for the Windows Explorer controls pictured
in the sample image above?
Try these color values:
clInactiveCaptionText
clWindow
clHighlight
etc.
HTH
Jonathan
 

Re:XP Windows Explorer colors

Are those VCL values? I am using win32 with no VCL.
"Jonathan Benedicto" < XXXX@XXXXX.COM >wrote in message
Quote
"Bob" < XXXX@XXXXX.COM >wrote in message
news:42f8bacc$ XXXX@XXXXX.COM ...
>www.pbsoftware.com/images/sample.jpg
>
>How do I get the color values for the Windows Explorer controls pictured
>in the sample image above?

Try these color values:

clInactiveCaptionText
clWindow
clHighlight

etc.

HTH

Jonathan

 

Re:XP Windows Explorer colors

"Bob" < XXXX@XXXXX.COM >wrote in message
Quote
Are those VCL values? I am using win32 with no VCL.
Yes they were. Use this method instead:
GetSysColor( COLOR_INACTIVECAPTIONTEXT );
GetSysColor( COLOR_WINDOW );
GetSysColor( COLOR_HIGHLIGHT );
Jonathan
 

Re:XP Windows Explorer colors

I already tried that, but the colors do not match when I change my theme.
"Jonathan Benedicto" < XXXX@XXXXX.COM >wrote in message
Quote
"Bob" < XXXX@XXXXX.COM >wrote in message
news: XXXX@XXXXX.COM ...
>Are those VCL values? I am using win32 with no VCL.

Yes they were. Use this method instead:

GetSysColor( COLOR_INACTIVECAPTIONTEXT );
GetSysColor( COLOR_WINDOW );
GetSysColor( COLOR_HIGHLIGHT );

Jonathan

 

Re:XP Windows Explorer colors

"Bob" < XXXX@XXXXX.COM >wrote in message
Quote
I already tried that, but the colors do not match when I change my theme.
Do you re-query the colors when the theme is changed ?
Jonathan
 

Re:XP Windows Explorer colors

Yes. The colors never match the Microsoft control.
"Jonathan Benedicto" < XXXX@XXXXX.COM >wrote in message
Quote
"Bob" < XXXX@XXXXX.COM >wrote in message
news:42f90767$ XXXX@XXXXX.COM ...
>I already tried that, but the colors do not match when I change my theme.

Do you re-query the colors when the theme is changed ?

Jonathan

 

Re:XP Windows Explorer colors

"Bob" < XXXX@XXXXX.COM >wrote in message
Quote
I already tried that, but the colors do not match
when I change my theme.
That is because you are querying the wrong values to begin with. What
Jonathan suggested earlier are NOT the values you are looking for.
Gambit
 

Re:XP Windows Explorer colors

"Remy Lebeau (TeamB)" < XXXX@XXXXX.COM >wrote in message
Quote
That is because you are querying the wrong values to begin with. What
Jonathan suggested earlier are NOT the values you are looking for.
Do you mean the cl... values I gave, or the GetSysColor values ? I didn't
test those GetSysColor values, maybe I should have.
Jonathan
 

Re:XP Windows Explorer colors

"Jonathan Benedicto" < XXXX@XXXXX.COM >wrote in message
Quote
Do you mean the cl... values I gave, or the GetSysColor values ?
Both. What you suggested do not apply to the areas that Bob is asking
about, as evident by the fact that he's not being provided with the same
color values that the OS is actually using.
Quote
I didn't test those GetSysColor values, maybe I should have.
Please do next time.
Gambit
 

Re:XP Windows Explorer colors

"Remy Lebeau (TeamB)" < XXXX@XXXXX.COM >wrote in message
Quote
Both. What you suggested do not apply to the areas that Bob is asking
about, as evident by the fact that he's not being provided with the same
color values that the OS is actually using.
In one of my VCL apps, I've used clInactiveCaptionText, clWindow and
clHighlight to make the program resemble the XP theme. It works quite well,
and when the theme is changed, then the app takes on the new look.
Jonathan
 

Re:XP Windows Explorer colors

"Jonathan Benedicto" < XXXX@XXXXX.COM >wrote in message
Quote
In one of my VCL apps, I've used clInactiveCaptionText,
clWindow and clHighlight to make the program resemble the
XP theme.
Again, those DO NOT apply to the particular area that Bob is asking about.
Gambit
 

Re:XP Windows Explorer colors

I found the colors in GetThemeColor. There is a section for EXPLORERBAR
which holds the values I need.
"Remy Lebeau (TeamB)" < XXXX@XXXXX.COM >wrote in message
Quote

"Jonathan Benedicto" < XXXX@XXXXX.COM >wrote in message
news:42f92528$ XXXX@XXXXX.COM ...

>In one of my VCL apps, I've used clInactiveCaptionText,
>clWindow and clHighlight to make the program resemble the
>XP theme.

Again, those DO NOT apply to the particular area that Bob is asking about.


Gambit