- function RefreshTaskbarIcon: Integer;
- var
- hShellTrayWnd: HWND;
- hTrayNotifyWnd: HWND;
- hSysPager: HWND;
- hToolbarWindow32: HWND;
- r: TRECT;
- width, height: integer;
- x: Integer;
- begin
- hShellTrayWnd := FindWindow('Shell_TrayWnd',nil);
- hTrayNotifyWnd := FindWindowEx(hShellTrayWnd,0,'TrayNotifyWnd',nil);
- hSysPager := FindWindowEx(hTrayNotifyWnd,0,'SysPager',nil);
- if (hSysPager <> 0) then
- hToolbarWindow32 := FindWindowEx(hSysPager,0,'ToolbarWindow32',nil)
- else
- hToolbarWindow32 := FindWindowEx(hTrayNotifyWnd,0,'ToolbarWindow32',nil);
-
- if (hToolbarWindow32 <> 0) then
- begin
- GetWindowRect(hToolbarWindow32,r);
- width := r.right - r.left;
- height := r.bottom - r.top;
-
- for x := 1 to width-1 do
- SendMessage(hToolbarWindow32,WM_MOUSEMOVE,0,MAKELPARAM(x,trunc(height/2)));
- end;
- end;
posted @
2017-04-03 16:55
哥,我还要
阅读(
1281)
评论()
编辑
收藏
举报