Dont have any code atm .... But you could look to catch the window's minimize message and skip your render & update parts of your game. Then catch the restore message, reset/reload any resources you need (images, timmer, models ect).
... that's how I used to do it. I use OpenGL now .... really clean & simple code and no resource losses....