桌面图标用小图标方式显示

  • 主题发起人 主题发起人 import
  • 开始时间 开始时间
I

import

Unregistered / Unconfirmed
GUEST, unregistred user!
Neil J. Rubenking <jrubenki@SPAM-B-GONE@mother.com> program Test;
{$APPTYPE CONSOLE}
USES Windows, Messages, commctrl;
function GetLVHan : HWnd;
// Get the handle of the desktop listview
begin
Result := FindWindowEx(FindWindowEx(FindWindowEx(
GetDesktopWindow, 0, 'Progman', nil), 0,
'SHELLDLL_DefView', nil), 0, 'SysListView32', nil);
end;
function ActiveDesktop : Boolean;
begin
Result := FindWindowEx(FindWindowEx(FindWindowEx(
GetDesktopWindow, 0, 'Progman', nil), 0,
'SHELLDLL_DefView', nil), 0, 'Internet Explorer_Server',
nil) <> 0;
end;
procedure SetListviewStyleSmall(H : HWnd);
VAR S : StyleStruct;
begin
S.StyleOld := GetWindowLong(H, GWL_STYLE);
S.StyleNew := S.StyleOld AND NOT LVS_TYPEMASK;
S.StyleNew := S.StyleNew OR LVS_ICON;
SetWindowLong(H, GWL_STYLE, S.StyleNew);
SendMessage(H, WM_STYLECHANGED, GWL_STYLE, Integer(@S));
ShowWindow(H, SW_SHOWNORMAL);
end;
begin
IF ActiveDesktop THEN
begin
WriteLn('Turn off Active Desktop first.');
Halt;
end;
SetListViewStyleSmall(GetLVHan);
WriteLn('The desktop listview should now have small icons');
WriteLn('Switch to Active Desktop and watch them disappear');
WriteLn('(to get them back, log off and on again)');
WriteLn;
WriteLn('WHY does this happen? How can it be prevented?');
end.
 

Similar threads

I
回复
0
查看
522
import
I
I
回复
0
查看
853
import
I
I
回复
0
查看
350
import
I
后退
顶部