I, too, am trying to get the current text color of the system tray clock. This is what I
have:
procedure TForm1.Button2Click(Sender: TObject);
var
cr: TColorRef;
colorStr: String;
h: HRESULT;
begin
h := GetThemeColor(ThemeServices.Theme[teClock], CLP_TIME,
CLS_NORMAL, TMT_TEXTCOLOR, CR);
ShowMessage(IntToStr(h));
ColorToIdent(cr,colorStr);
ShowMessage(colorStr);
end;
the value returned for h is: -2147024890 (which does not correspond to any of the
constants listed in the docs for HRESULT).
the value returned for cr is always clBlack (i.e. 0) even though, for instance, in the
standard WindowsXP theme (Blue), the clock shows in white.
What am I doing wrong?
JAS