Focus, Focus, Ultra Death In The Mega Face!

Started by
6 comments, last by Fear1337455 21 years ago
How do I check if a Window has gone out of focus? Im making a Windowed Direct3D Game (Crazy Tetris) and want to be able to pause automatically when the user clicks on a different window or minimizes. I will be done just as soon as i fix a few mp3 problems and fix this minimizing issue. I will try and post it online for you all to play. Should be fun. First person to answer my question correctly gets sex! I mean, What???
Spring has sprungFall has fellNow its winterAnd its colder than usual
Advertisement
Um...(sickness)^2. :/
-Weasel
Um, you can keep your sex prize


Look up WM_ACTIVATE in the MSDN.
I can''t quite recall, but you might try WM_FOCUS as well.
when you get a WM_ACTIVATE event check

if(LOWORD(wParam) == WA_INACTIVE)// check if lost focus

if(LOWORD(wParam) == WA_CLICKACTIVE || LOWORD(wParam) == WA_CLICKACTIVE) // check if getting focus

Can I have my sex now?
thanks. I was kidding about the sex
Spring has sprungFall has fellNow its winterAnd its colder than usual
sorry man, on gamedev all verbal contracts are legally binding
“[The clergy] believe that any portion of power confided to me, will be exerted in opposition to their schemes. And they believe rightly: for I have sworn upon the altar of God, eternal hostility against every form of tyranny over the mind of man” - Thomas Jefferson
Considering what the contract entails, the proper legal phrasing of "oral contract being legally binding" is probably a better joke...

(joke shamelessly plaguerized from www.dieselsweeties.com)
RIP GameDev.net: launched 2 unusably-broken forum engines in as many years, and now has ceased operating as a forum at all, happy to remain naught but an advertising platform with an attached social media presense, headed by a staff who by their own admission have no idea what their userbase wants or expects.Here's to the good times; shame they exist in the past.

This topic is closed to new replies.

Advertisement