太
太阳火
Unregistered / Unconfirmed
GUEST, unregistred user!
//Currently I am using the following codes:
//uses commctrl;
var Wnd: HWND;
ItemCount: integer;
begin
Wnd := FindWindow('ProgMan', nil);
Wnd := GetWindow(Wnd, GW_CHILD);
Wnd := GetWindow(Wnd, GW_CHILD);
{ OR:
Wnd := FindWindow('Progman', 'Program Manager');
Wnd := FindWindowEx(Wnd, 0, PChar('SHELLDLL_DefView'), nil);
Wnd := FindWindowEx(Wnd, 0, PChar('SysListView32'), nil);
}
SendMessage(Wnd, LVM_SETTEXTBKCOLOR, 0, CLR_NONE);
//OR ListView_SetTextBkColor(wnd, clr_none);
ItemCount := SendMessage(Wnd, LVM_GETITEMCOUNT, 0, 0);
SendMessage(Wnd, LVM_REDRAWITEMS, 0, ItemCount - 1);
//OR ListView_RedrawItems(wnd, 0, Pred(ListView_GetItemCount(wnd)));
UpdateWindow(Wnd);
end;
//It works when the Active Desktop is off, but if you turn on active desktop, it doesn't work.
//Anyone can provide me the workable code?
//Thanks a lot.
//uses commctrl;
var Wnd: HWND;
ItemCount: integer;
begin
Wnd := FindWindow('ProgMan', nil);
Wnd := GetWindow(Wnd, GW_CHILD);
Wnd := GetWindow(Wnd, GW_CHILD);
{ OR:
Wnd := FindWindow('Progman', 'Program Manager');
Wnd := FindWindowEx(Wnd, 0, PChar('SHELLDLL_DefView'), nil);
Wnd := FindWindowEx(Wnd, 0, PChar('SysListView32'), nil);
}
SendMessage(Wnd, LVM_SETTEXTBKCOLOR, 0, CLR_NONE);
//OR ListView_SetTextBkColor(wnd, clr_none);
ItemCount := SendMessage(Wnd, LVM_GETITEMCOUNT, 0, 0);
SendMessage(Wnd, LVM_REDRAWITEMS, 0, ItemCount - 1);
//OR ListView_RedrawItems(wnd, 0, Pred(ListView_GetItemCount(wnd)));
UpdateWindow(Wnd);
end;
//It works when the Active Desktop is off, but if you turn on active desktop, it doesn't work.
//Anyone can provide me the workable code?
//Thanks a lot.