Game Timing & Alt-Tab?

BlitzMax Forums/BlitzMax Programming/Game Timing & Alt-Tab?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

To know if your window has the focus, just use GetActiveWindow() from Windows API. if it returns a hwnd that's not the one in your program, then you don't have the focus.

Works great to "auto-pause" a game when the window looses focus ;)