有没有人有关于SHGetSysColor的文档?

时间:2010-02-20 03:29:16

标签: api windows-mobile

我正在尝试找到这个功能的任何参考,但我还没有找到任何东西。

我所拥有的只是一个模糊的KB from Microsoft引用程序员在编写Windows Mobile 6的一部分时编写了boo-boo,他应该调用SHGetSysColor,而是调用GetSysColor为同一规格提供完全不同的颜色。

从我收集的内容GetSysColorHKEY_LOCAL_MACHINE\Software\Microsoft\Color\SHColorHKEY_LOCAL_MACHINE\Software\Microsoft\Color\DefSHColor读取注册表中的颜色值,并根据索引返回颜色。

在该注册表中,我对标准Win Mobile 6.5具有以下值

"DefSHColor"=hex:\
  ff,00,00,00,00,00,00,00,dd,dd,dd,00,ff,ff,cc,00,ff,ff,ff,00,15,af,bc,00,15,\
  af,bc,00,c9,e7,e9,00,14,9c,a7,00,ff,ff,ff,00,14,9c,a7,00,14,9c,a7,00,14,9c,\
  a7,00,15,af,bc,00,14,9c,a7,00,ff,ff,ff,00,c9,e7,e9,00,37,c7,d3,00,37,c7,d3,\
  00,ff,ff,ff,00,00,b7,c9,00,14,9c,a7,00,ff,ff,ff,00,15,af,bc,00,84,84,c3,00,\
  15,af,bc,00,14,9c,a7,00,ff,ff,ff,00,ff,ff,ff,00,00,00,00,00,ff,ff,ff,00,00,\
  00,00,00,ff,ff,ff,00,2e,44,4f,00,00,14,3c,00,00,f0,ff,00,ff,ff,ff,00,c9,e7,\
  e9,00,14,9c,a7,00,ff,ff,ff,00,14,9c,a7,00

我意识到每四个字节代表不同的颜色(RR,GG,BB,AA - 我在这里假设AA,因为每个颜色都有AA字节为00这意味着它是纯色的。)

我无法解决的是每个指数的含义,因为我有41种不同的颜色。

搜索SHGetSysColor in只给我7个匹配,其中两个是来自Microsoft的KB(一个是英文,另一个是法文),一个来自俄罗斯网站(我不读),还有两个来自freepascal.org,一个来自Koders.com,它描述了commctl.def文件。

我去了commctl.h试图看看我是否能找到参考tom这个函数,但一无所获。

在MSDN上搜索,无论是Google,Bing还是默认的MSDN搜索都没有给我任何结果。

那么,有谁知道我们在这里谈论的是什么索引?

1 个答案:

答案 0 :(得分:1)

由于Russian site,我能够找到有关SHColor注册表项的信息。

此信息曾在MSDN上,但已不再可用。

颜色如下所示:

Color#  Description

   0    COLOR_ALERT
        Obsolete.

   1    COLOR_ACCENTTEXT
        Obsolete.

   2    COLOR_CALOFFHOURS
        Obsolete.

   3    COLOR_CALONHOURS
        Obsolete.

   4    COLOR_TODAYTEXT
        Today screen text color.

   5    COLOR_STARTICONBACKGROUND
        Base color for title bar and soft keys
        Obs.:Windows Mobile 6 Professional and Windows Mobile 6 Classic.

   6    COLOR_TODAYSEPARATOR
        Today screen separator line color.

   7    COLOR_TODAYMENU
        Today screen menubar background color.

   8    COLOR_NAVBAR
        Color of title bar
        Obs.:Windows Mobile 6 Professional and Windows Mobile 6 Classic.

   9    COLOR_NAVBARTEXT
        Color of title bar text on
        Obs.:Windows Mobile 6 Professional and Windows Mobile 6 Classic.

  10    COLOR_NAVBARHILITE
        Obsolete.

  11    COLOR_NOTIFTRAY
        Notification tray background color
        Obs.:Windows Mobile 6 Professional and Windows Mobile 6 Classic.

  12    COLOR_NOTIFTRAYHILITE
        Background of highlighted icon in the notification tray
        Obs.:Windows Mobile 6 Professional and Windows Mobile 6 Classic.

  13    COLOR_BUBBLECAPTION
        Left color of bubble caption background gradient on
        Obs.:Windows Mobile 6 Professional and Windows Mobile 6 Classic.

  14    COLOR_GRADIENTBUBBLECAPTION
        Right color of bubble caption background gradient
        Obs.:Windows Mobile 6 Professional and Windows Mobile 6 Classic.

  15    COLOR_INTGRADLEFT
        Left color of a gradient listview background, for the interlaced rows.

  16    COLOR_INTGRADRIGHT
        Right color of a gradient listview background, for the interlaced rows.

  17    COLOR_HIGHGRADLEFT
        Currently not used.

  18    COLOR_HIGHGRADRIGHT
        Currently not used.

  19    COLOR_PHONEDIALERTEXT
        Text color of the text in the Phone dialpad buttons.

  20    COLOR_TRAYGRADLEFT
        Base color for title bar and soft keys
        Obs.:Windows Mobile 6 Standard only.

  21    COLOR_TRAYGRADRIGHT
        Right color of tray
        Obs.:Windows Mobile 6 Standard only.

  22    COLOR_TRAYTEXT
        Tray text color
        Obs.:Windows Mobile 6 Standard only.

  23    COLOR_TRAYBKGND
        Tray background color, if not a gradient
        Obs.:Windows Mobile 6 Standard only.

  24    COLOR_DIALPADBKGND
        Currently not used.

  25    COLOR_CRITGRADLEFT
        Left color of a critical bubble caption gradient
        Obs.:Windows Mobile 6 Professional and Windows Mobile 6 Classic.

  26    COLOR_CRITGRADRIGHT
        Right color of a critical bubble caption gradient
        Obs.:Windows Mobile 6 Professional and Windows Mobile 6 Classic.

  27    COLOR_BUBBLETITLE
        Text color of a bubble caption
        Obs.:Windows Mobile 6 Professional and Windows Mobile 6 Classic.

  28    COLOR_CRITBUBBLETITLE
        Text color of a critical bubble caption
        Obs.:Windows Mobile 6 Professional and Windows Mobile 6 Classic.

  29    COLOR_ALERTTITLE
        Alert title text color. An alert is a full screen message box
        Obs.:Windows Mobile 6 Standard only.

  30    COLOR_ALERTWINDOW
        Background color of a listview in alert. Also used for volume alert slider bar
        Obs.:Windows Mobile 6 Standard only.

  31    COLOR_ALERTRULE
        Color of alert horizontal separator line. An alert is a full screen message box
        Obs.:Windows Mobile 6 Standard only.

  32    COLOR_HOMETEXT
        Home Screen text
        Obs.:Windows Mobile 6 Standard only.

  33    COLOR_HOMERULE
        Home Screen horizontal separator line
        Obs.:Windows Mobile 6 Standard only.

  34    COLOR_HOMEHIGHLIGHT
        Home Screen background color of highlighted text
        Obs.:Windows Mobile 6 Standard only.

  35    COLOR_HOMEHIGHLIGHTTEXT
        Home Screen highlighted text
        Obs.:Windows Mobile 6 Standard only.

  36    COLOR_GRADLEFT
        Left color of a gradient listview background, used to draw alternating lines together with COLOR_INTGRADLEFT and COLOR_INTGRADRIGHT.

  37    COLOR_GRADRIGHT
        Right color of a gradient listview background, used to draw alternating lines together with COLOR_INTGRADLEFT and COLOR_INTGRADRIGHT.

  38    COLOR_STARTMENU
        Start Menu background color when there is no background bitmap
        Obs.:Windows Mobile 6 Professional and Windows Mobile 6 Classic.

  39    COLOR_STARTMENUTEXT
        Start Menu text.

  40    COLOR_TAPANDHOLD
        Tap and Hold
        Obs.:Windows Mobile 6 Professional and Windows Mobile 6 Classic.