隐藏系统托盘图标:如何自动移去系统托盘失效的图标来源: 发布时间:星期四, 2009年2月12日 浏览:126次 评论:0
有些window应用 ![]() ![]() ![]() ![]() ![]() ![]() void __fastcall removedeadicons ![]() { hwnd htraywindow; rect rcttrayicon; ![]() ![]() tpo ![]() ![]() ![]() // get tray window handle and bounding rectangle htraywindow = findwindowex(findwindow( \"shell_traywnd\", null), 0, \"traynot ![]() ![]() ![]() // get small icon metrics niconwidth = getsystemmetrics(sm_cxsmicon); niconheight = getsystemmetrics(sm_cysmicon); // save current mouse position } getcursorpos(&cursorpos); // sweep the mouse cursor over each icon in the tray in both dimensions for(nrow=0; nrow<(rcttrayicon.bottom-rcttrayicon.top)/niconheight; nrow ![]() { for(ncol=0; ncol<(rcttrayicon.right-rcttrayicon.left)/niconwidth; ncol ![]() { ![]() rcttrayicon.top + nrow * niconheight + 5); sleep(0); } } // restore mouse position ![]() // redraw tray window (to fix bug in multi-line tray area) redrawwindow(htraywindow, null, 0, rdw_invalidate | rdw_erase | rdw_updatenow); } 0
相关文章读者评论发表评论 |
|