|
Sujet : [DELPHI OU API] Petite interogation sur les icones... |
| antp |
ça je sais pas... Mais via un autre type de message ou un Get quelque chose ça doit être faisable.
http://groups.google.com |
| Titalium |
function EnumChildProc(AHandle: hWnd): BOOL; stdcall;
procedure ApplyColor();
function TfrmMain.EnumChildProc(AHandle: hWnd): BOOL; stdcall;
// callback for EnumChildWindows.
var
tmpS: string;
theClassName: string;
clrText: Integer;
begin
Result := True;
SetLength(theClassName, 256);
GetClassName(AHandle, PChar(theClassName), 255);
tmpS := PChar(theClassName);
if Pos('SysListView32', tmpS) > 0 then
begin // ColorToRGB(clNone)
clrText := -1; // Desired background color
SendMessage(AHandle, LVM_SETTEXTBKCOLOR, 0, clrText);
clrText := $FFFFFF; // Desired text color (BGR)
SendMessage(AHandle, LVM_SETTEXTCOLOR, 0, clrText);
end;
end;
procedure TfrmMain.ApplyColor();
const
WM_REFRESH_DESKTOP = $A065;
var
WndClass: array[0..50] of char;
h: THandle;
begin
WndClass := 'Progman';
h := FindWindow(@WndClass[0], 'Program Manager');
EnumChildWindows(h, @EnumChildProc, 0);
SendMessage(HWND_BROADCAST, WM_SETTINGCHANGE, 0, 0);
end; |