Windows Taskbar API [closed]

2019-02-20 00:02发布

问题:

Is there any API that allows to control which icons are shown in the Windows (7) Taskbar at a given time? I would like to have the processes still running, but their icons not show up on the taskbar.

回答1:

See the various extended window styles in CreateWindowEx, and figure out which one suits your needs. (Many of them deal with taskbar items, it's not just one.) Then just set the style with SetWindowLong.

There's also ITaskbarList::DeleteTab, but I really don't recommend this for hiding your window.



回答2:

I want the window to be hidden from view, including from the taskbar;

Hide the window. ShowWindow

ShowWindow(hwnd, SW_HIDE); 


回答3:

Have you considered creating an icon in the system tray or creating a windows service?



回答4:

You want to create the windows using CreateWindowEx and use the WS_EX_TOOLWINDOW style to hide the window from the taskbar. Also, once you've created the window, call ShowWindow with SW_HIDE.



回答5:

I'd try to send them WM_SETICON with NULL for both the big and small icons.