|
-
July 30th, 1999, 11:31 AM
#1
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.
-
August 13th, 1999, 04:31 AM
#2
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|