I still don't know how you could minimise all windows by proxying a DLL of one program.Sorry, I didn't express myself good enough, in my last post I didn't mean "an already active program" but an autorun program. Hence after a reboot the program would run with my proxy dll instead. Restarting it has the same effect, yes.
What you are trying to achieve can be done with DLL Injection, but it seems like you are trying to crack a walnut with a sledgehammer.
If I were to do this (I never would, but let's go hypothetical) I would simply enumerate all windows, check which ones are maximised and then send windows messages to minimise those. This method may have some side effects, but I have very much the same outlook to you when it is messing with my computer (I take responsibility, and it's not a big deal if something screws up).