Skip to main content
GameDev.net gamedev.net
🔒 Locked

pause loop on lost window focus

Started by datadawgx Jul 14, 2004 at 12:07 PM 1 replies 400+ views
Original Post
datadawgx
datadawgx
how can i tell when a d3d window (not fullscreen) is out of focus or minimized? i need to know so i can stop its loop and the system doesnt crash
Trip99
Trip99
You can trap the WM_SIZE message sent to your wndproc, the wParam says what has happened:

SIZE_MINIMIZED the one you want
SIZE_MAXIMIZED
SIZE_RESTORED
------------------------See my games programming site at: www.toymaker.info
Saandman
Saandman
WM_ACTIVATE is sent whenever a window is losing or gaining focus.

LOWORD(wParam) == WA_INACTIVE/WA_ACTIVE
________pro.gram.mer - an organism that turns caffeine into code

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.