Minimizing Desktop Windows
I am trying to code a small app that sits in tye System Tray and
that Minimizes all Desktop windows just as using <windows key>-M does.
I tried using EnumDesktopWindows, but i get other windows that
are not visible, so i end up minimizing lots of unwanted windows.
Is there an easiear way ? Do i have to filter the windows i get
back from EnumDesktopWindows ? and if so, how do i filter them ?
Thanks in advance.
Re: Minimizing Desktop Windows
You hjave to enumerate all windows first first. Then filter whether they are visible by using IsWindowVisible() function. Then continue filter with IsWindowEnabled()(if u dont want to close the parent of the modal dialog).
I hope this works for you
Here is the code for it:
BOOL CALLBACK EnumChildProc( HWND hwnd, LPARAM lParam )
{
if(IsWindowVisible(hwnd)==TRUE)
{
\\this will get all visible windows
if(IsWindowEnabled(hwnd)==TRUE)
{
\\this will fetch only the window
\\enabled for input
}
}
}
Ravi