Archived

This topic is now archived and is closed to further replies.

The Infamous Alt-Tab Problem!

This topic is 5273 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

The search does work sometimes, it's just really slow, so it helps to narrow it right down. Although I'd be interested in a link too, although not interested enough to search one out myself

http://www.gamedev.net/reference/articles/article1249.asp

Oh well I have found one, although I'm not sure I like the multithreading method used.

[edited by - higherspeed on July 7, 2003 10:01:45 AM]

Share this post


Link to post
Share on other sites
Also, entering a search string ending with a space causes an internal error.

Users Beware .


Sirob Yes.»
Footman, at large.

Share this post


Link to post
Share on other sites
Exactly what is the problem you want to solve? Taking care about the graphics when returning from windows desktop or preventing alt-tab? If it is the latter I would advice against it. There is a way to stop that in NT (not counting the various ways to stop it for win9x/Me you can find on google) but I would no recommend it, infact I will not even mention it because if the computer crashes you could end up not being able to log back on.



____________________________________________________________
Try RealityRift at www.planetrift.com
Feel free to comment, object, laugh at or agree to this. I won''t engage in flaming because of what I have said.
I could be wrong or right but the ideas are mine.

Share this post


Link to post
Share on other sites
I don''t want to prevent the user from pressing Alt-Tab, I just want my window to show correctly when the user returns to it. I am using the WS_POPUP style in a fullscreen DX8 App

Share this post


Link to post
Share on other sites
Ok, I will try and keep it simple, if you can't follow me now you are welcome to head over to my own forum and ask me more there.

When you are using alt-tab all the resources on the graphics card are destroyed. That means is you have vertex buffers etc... you will need to recreate them. Textures etc... are also destroyed unless you are using textures from systemmemory or if they are managed in which case they will restore themselves. If not, it means you will have to release the textures and recreate them.

You test if the device is lost when you are about to update the screen, if it is, then you release the backbuffer and other textures etc...

Then you keep trying to see if the device is not reset. when you get that message it means that you now can recreate them and load the surfaces again. Then you reset the device first, then recreate the textures etc... and now things should work for you.

Hope this helps.

____________________________________________________________
Try RealityRift at www.planetrift.com
Feel free to comment, object, laugh at or agree to this. I won't engage in flaming because of what I have said.
I could be wrong or right but the ideas are mine.



[edited by - MichaelT on July 7, 2003 12:05:21 PM]

Share this post


Link to post
Share on other sites
I put up a sample for restoring ALT-TAB and using D3DXSprite on my site. You will find it in the forum under DirectX9

The link is below.

____________________________________________________________
Try RealityRift at www.planetrift.com
Feel free to comment, object, laugh at or agree to this. I won''t engage in flaming because of what I have said.
I could be wrong or right but the ideas are mine.

Share this post


Link to post
Share on other sites
quote:
Original post by FlamePixel
I do have a few questions. Which forum is your forum?

EDIT: Never mind, I found it

[edited by - FlamePixel on July 7, 2003 1:53:09 PM]


I moved your topic to the DirectX section I put up.
You can find the posts there.


____________________________________________________________
Try RealityRift at www.planetrift.com
Feel free to comment, object, laugh at or agree to this. I won''t engage in flaming because of what I have said.
I could be wrong or right but the ideas are mine.

Share this post


Link to post
Share on other sites
I''m dealing with the same issue. I tried registering on your forum, but it kept saying ''page cannot be displayed'' when I went to register.

Share this post


Link to post
Share on other sites
I don''t know why it is not working for you but it should work. Because i tried it on my computer and on another computer and it seemed to work fine. Anyway, are there any other who cannot register?

____________________________________________________________
Try RealityRift at www.planetrift.com
Feel free to comment, object, laugh at or agree to this. I won''t engage in flaming because of what I have said.
I could be wrong or right but the ideas are mine.

Share this post


Link to post
Share on other sites
I tried again and now it says this:

Failed sending email :: PHP ::

DEBUG MODE

Line : 246
File : G:\storage\ready\Xitami\Xitami\webpages\forum\includes\emailer.php

Share this post


Link to post
Share on other sites
Cheers, I will have a look at it. ;-)

____________________________________________________________
Try RealityRift at www.planetrift.com
Feel free to comment, object, laugh at or agree to this. I won''t engage in flaming because of what I have said.
I could be wrong or right but the ideas are mine.

Share this post


Link to post
Share on other sites
Fixed it. There was another bug in the phpbb code ( ;-) at least it wasn't my fault ) I found a few actually and fixed them. It should work now.

Since you are already registered you only need to request a new password if you don't remember it.

____________________________________________________________
Try RealityRift at www.planetrift.com
Feel free to comment, object, laugh at or agree to this. I won't engage in flaming because of what I have said.
I could be wrong or right but the ideas are mine.



[edited by - MichaelT on July 9, 2003 6:10:59 PM]

Share this post


Link to post
Share on other sites
When the device is lost you have to release all resources (Textures, vertex buffers...), restore the device and then recreate the resources. The docs talk about this but it is not very clear

Because I have a class that wraps these functions (so it can be loaded from a DLL) I could keep track of them by saving the pointer to a list in the constructor then removing it in the destructor. When the device is lost it restores it AUTOMATICALLY using those steps

The forum was hacked a while ago so they shutdown the search feature. Probably an SQL exploit where some lazy programmer forgot to check entered strings then forgot to re-enable the search engine causing newbies to ask the same questions all the time (2D in D3D...)

Share this post


Link to post
Share on other sites
Well, I was talking about my own forum at www.planetrift.com and that was certainly not hacked.

The sample on my site already does what you just mentioned, and those whom are interested can have a look there. It also have an animation for the sprite just to help along a little bit more.

I will add more samples over time to adress many common questions I have heard or recieved.



____________________________________________________________
Try RealityRift at www.planetrift.com
Feel free to comment, object, laugh at or agree to this. I won''t engage in flaming because of what I have said.
I could be wrong or right but the ideas are mine.

Share this post


Link to post
Share on other sites