I am making a taskbar in C# and I know how to get a list of open windows, but I must know what windows I must show in the taskbar. How can I do this?
I'm not sure if the exact algorithm is known, but you will not be far off with something like:
if style & WS_VISIBLE
{
if ( ( exstyle & WS_EX_APPWINDOW )
or ( !HasOwnerWindow() and !(exstyle & WS_EX_TOOLWINDOW) )
{
ShowWindowInYourTaskBar()
}
}
来源:https://stackoverflow.com/questions/3484650/what-api-function-do-i-need-to-use-to-know-if-a-window-is-being-shown-in-the-tas