Just handle WM_ACTIVATE messages in your WndProc. Set a flag for your rendering function to check before it renders each frame, telling it whether to draw or not. If your window''s minimized, you don''t draw. Finally, restore the surfaces in your WM_ACTIVATE handler when your window becomes active again. The Windows SDK docs have more information on WM_ACTIVATE.
Conceptually, you''re linking DirectDraw to your main window with that code.
And you''ll probably have to take extra steps for DirectInput, DirectSound, etc.
Good Luck!
- null_pointer
Popular Topics
Advertisement