Not really sure what you're on about Kaeru; when I activate the 'classic windows layout' then GetSysColor_() still gives me the correct value for a disabled list icon!
I can imagine some 'badly behaved' themes may deviate from this; though I haven't encountered one as yet!
When a ListIcon is first created then it is given the #COLOR_WINDOW back color. When it is disabled it is given #COLOR_3DFACE. These system colors are of course usually altered by any new theme, but the link will usually remain between #COLOR_WINDOW and #COLOR_3DFACE and enabled/disabled ListIcons. Course it is easy for a developer to over-ride all of this through owner-drawing etc.
The following code shows these defaults to be correct and works here if I switch to a classic theme on Vista or not.
Code: Select all
OpenWindow(0,0,0,320,240,"",#PB_Window_SystemMenu|#PB_Window_ScreenCentered)
ListIconGadget(0,0,0,200,200,"Column 0",200)
InvalidateRect_(GadgetID(0), 0, 1)
UpdateWindow_(GadgetID(0))
hdc = GetDC_(GadgetID(0))
color = GetPixel_(hdc, 2,30)
ReleaseDC_(GadgetID(0), hdc)
Debug "Enabled ListIcon"
Debug " Color from pixel (2, 30) = " + Str(color)
Debug " Color from GetSysColor_(#COLOR_WINDOW) = " + Str(GetSysColor_(#COLOR_WINDOW))
Debug "======"
DisableGadget(0,1)
InvalidateRect_(GadgetID(0), 0, 1)
UpdateWindow_(GadgetID(0))
hdc = GetDC_(GadgetID(0))
color = GetPixel_(hdc, 2,30)
ReleaseDC_(GadgetID(0), hdc)
Debug "Disabled ListIcon"
Debug " Color from pixel (2, 30) = " + Str(color)
Debug " Color from GetSysColor_(#COLOR_3DFACE) = " + Str(GetSysColor_(#COLOR_3DFACE))
quit=0
Repeat
Select WaitWindowEvent()
Case #PB_Event_CloseWindow
quit=1
EndSelect
Until quit
Too much of a coinicidence I think.
I may look like a mule, but I'm not a complete ass.