Мне нужно, чтобы значок исчез из системного трея. Когда я навожу на него мышку, он исчезает. Могу ли я заставить Inno Setup имитировать движения мыши? Я нашел код Pascal в Интернете, но не могу запустить его в Inno. Может быть, я пропускаю что-то легкое.
uses
.... probably not all of these are necessary, but jwawinuser is at least....
JwaTlHelp32 {for running processes},
JwaWinType {for processes declarations},
JwaWinBase {just a guess: for closing process handles},
JwaWinSvc {for services declarations, always required},
jwawinuser {for clearing tray icon/notification area},
....
procedure CleanSystemTray;
{description Clean dead icons from system tray/notification area}
var
hNotificationArea: HWND;
r: RECT;
x: integer;
y: integer;
begin
hNotificationArea:=FindWindowEx(
FindWindowEx(FindWindowEx(FindWindowEx
(0,0,'Shell_TrayWnd', ''),0,'TrayNotifyWnd', ''),0,'SysPager',''),
0,
'ToolbarWindow32',
'Notification Area');
GetClientRect(hNotificationArea,r);
//Now we've got the area, force it to update
//by sending mouse messages to it.
x:=0;
y:=0;
while x < r.Right do begin
while y < r.Bottom do begin
SendMessage(hNotificationArea, WM_MOUSEMOVE, 0, (y shl 16) + x);
y:=y+5;
end;
x:=x+5;
end;
end;
untested translation
этого кода. Но я бы предпочел доверитьсяthis project
. - person TLama   schedule 25.09.2014