Jump to content

View more

Image of the Day

雑魚は多めにして、爽快感重視にしつつ・・・(´・ω・`)
早いとこ、ベースを作って、完成にもっていかないとね。
タイトルもまだ迷ってるだよなぁ。 
#indiedev  #indiegame #screenshotsaturday https://t.co/IwVbswGrhe
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Alt-Tabability

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
2 replies to this topic

#1 LackOfKnack   Members   

122
Like
Likes
Like

Posted 10 December 1999 - 02:34 AM

Here's a newbie question for ya:

How do you make your DirectX app alt-tabable? Can you explain how to do it in VB or at least the general concept?

Thanks.

------------------

Lack


#2 mason   Members   

128
Like
Likes
Like

Posted 09 December 1999 - 02:18 PM

In a nutshell... when you gain or lose focus (WM_ACTIVATE), you release / recreate the DirectDraw interface and all the surfaces.

Mason McCuskey
Spin Studios
www.spin-studios.com

[This message has been edited by mason (edited December 09, 1999).]


#3 Teej   GDNet+   

176
Like
Likes
Like

Posted 10 December 1999 - 02:34 AM

In a typical C game, people usually have a BOOLean that is TRUE when the game is in the foreground, and FALSE otherwise. So in a typical loop it may look like:

while (TRUE)
{
if(PeekMessage(&msg,NULL,0,0,PM_REMOVE))
{
if (msg.message == WM_QUIT) break;
TranslateMessage(&msg);
DispatchMessage(&msg);
}
else if (bActive) // <--------
{
UpdateFrame;
}


Where to set the flag? Windows sends a WM_ACTIVATE message when your program is activated or deactivated...set the flag there.

case WM_ACTIVATE:
bActive = !((BOOL)HIWORD(wParam));
return 0L;

Teej





Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.