View Single Post
Old 09-19-05, 12:05 PM   #17 (permalink)
JonMisurda
Guest
 
Posts: n/a
Originally Posted by DoDoubleGeo
I am attaching a text file that has some info on the SHColor key. Hopefully it will provide some insight. Also, have you seen Microsoft's page on Customizing System Colors ? It refers to a different key (HKEY_LOCAL_MACHINE\SYSTEM\GWE\SysColor), but only references 29 color settings.
Wow, thanks for the info, I appreciate it. Everything I've seen on SHColor is for smartphone, which seems to encompass the theme in addition to the standard colors. The existing vBar versions do a GetSysColor( COLOR_ACTIVECAPTION ); like in your msdn link, but it doesn't return the right color on WM2003+ devices.

Currently I have this as my intelligent guess code (pseudocode since I am away from my source):

Code:
Try to open HKLM\SOFTWARE\Microsoft\Color
if(!ERROR_SUCCESS) {
   m_Color = GetSysColor( COLOR_ACTIVECAPTION ); 
}
Try to read from key "8"
if(!ERROR_SUCCESS) {
   m_Color= RGB(0x12, 0x57, 0xB1);
}
else {
   m_Color= value of key "8"
}
I think i'll change it to:

Code:
Try to open HKLM\SOFTWARE\Microsoft\Color
if(!ERROR_SUCCESS) {
   m_Color = GetSysColor( COLOR_ACTIVECAPTION ); 
}
Try to read from key "8"
if(!ERROR_SUCCESS) {
   //m_Color= RGB(0x12, 0x57, 0xB1);
   m_Color = SHColor[8];
}
else {
   m_Color= value of key "8"
}
and maybe that will be more consistent across versions.

Thanks for all your help.

Jon
  Reply With Quote