views:

48

answers:

1

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?

+2  A: 

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()
  }
}
Anders
I was trying something similar, that didn't give me all windows.This one gives me to much windows. The windows with the ShowInTaskBar property set to false also appear on the list.
Aaron de Windt