+ // we use 0 as the default value just to avoid compiler warnings, as there
+ // is no invalid colour value we use hasCol as the real indicator of
+ // whether colSys was initialized or not
+ COLORREF colSys = 0;
+ bool hasCol = false;
+
+ // the default colours for the entries after BTNHIGHLIGHT
+ static const COLORREF s_defaultSysColors[] =
+ {
+ 0x000000, // 3DDKSHADOW
+ 0xdfdfdf, // 3DLIGHT
+ 0x000000, // INFOTEXT
+ 0xe1ffff, // INFOBK
+
+ 0, // filler - no std colour with this index
+
+ // TODO: please fill in the standard values of those, I don't have them
+ 0, // HOTLIGHT
+ 0, // GRADIENTACTIVECAPTION
+ 0, // GRADIENTINACTIVECAPTION
+ 0, // MENU
+ 0, // MENUBAR (unused)
+ };
+
+ if ( index == wxSYS_COLOUR_LISTBOXTEXT)
+ {
+ // there is no standard colour with this index, map to another one
+ index = wxSYS_COLOUR_WINDOWTEXT;
+ }
+ else if ( index == wxSYS_COLOUR_LISTBOXHIGHLIGHTTEXT)
+ {
+ // there is no standard colour with this index, map to another one
+ index = wxSYS_COLOUR_HIGHLIGHTTEXT;
+ }
+ else if ( index == wxSYS_COLOUR_LISTBOX )
+ {
+ // there is no standard colour with this index, map to another one
+ index = wxSYS_COLOUR_WINDOW;
+ }
+ else if ( index > wxSYS_COLOUR_BTNHIGHLIGHT )