I'm quite new to the Windows API and I'm trying to find the handles of all the windows which appear in the taskbar.
So far, I have managed to:
- Get the handles of all windows
- Get the title of a window
- Check whether a window is visible
- Check whether a window exists
- Minimise a window
- Get the child windows of a window
- Get the desktop window
I have tried getting all child windows of the desktop window, which gives me nearly 900 window handles! So I tried to filter them down, by getting only visible windows and only windows whose title is longer than 0 characters, but I'm still way off - with 68 windows??
So could some Win API expert enlighten me as to how you do this please :-)
and also possibly explain why there are so many windows?
Edit:
private static bool HasAppWindowStyle(IntPtr handle)
{
return (GetWindowLong(handle, GWL_EXSTYLE) & WS_EX_APPWINDOW) != 0;
}