Intercepting Minimize All

Does anyone know how to catch a Minimize All (right clicking on start bar or otherwise) ?
Who is Participating?

Improve company productivity with a Business Account.Sign Up

naveenkohliConnect With a Mentor Commented:
Windows post WM_GETMINMAXINFO message whenever the size of window changes. So you can handle this to decide what you want to do with it!
Just a thought: If you need to know when all windows are minimized, you can use EnumWindows, and then use IsIconic to see if a windows is minimized. You can invoke it after your window is beign minimized.
penixAuthor Commented:
Thanks for the suggestion. My problem here is that I have a modeless dialog box, which should never be minimized. So what I need to do is intercept the Minimize All somehow to prevent the window from being minimized in the first place. The fact that this is a modeless dialog is adding some complications.

So, does anyone know to intercept this call? Is there a WM for it? thanks in advance.
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Just remove the style WS_MINIMIZED and your window cannot be minimized anymore
penixAuthor Commented:
Removing the WS_MINIMIZE style only removes the minimize box; doing a "Minimize All" from the start bar still causes the window to be minimized.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.