Thanks for the answer. The problem is also that my game has multiplayer mode so I can't stall my application becouse client will timeout and disconnect from the server. Even if you say that programs run as fast as they can I still can't understand why my game doesn't use 50% of CPU all the time then? PeekMessage must be doing sth which prevents it from using max of CPU I guess.
The utilization will drop when something you call "blocks". PeekMessage is a non-blocking call. Something else is causing the slow down.
When an OS call blocks, it will task swap to other programs while it waits for your blocking call to finish. If nothing needs to run it goes to idle and your utilization will drop.
Since your CPU utilization goes *up* when you minimize this strongly suggest to me that you are making a blocking call in your graphics code.
Once you minimize the context or rendering device is malfunctioning, the graphics routines are returning an error (instead of blocking) so your game loop runs flat out.