Archived

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

gavin_burt

DirectX with Dialog Boxes

Recommended Posts

Hello everyone, I''m having a problem with my game that is using DirectX 8. I allow the player to run the game in both windowed and full screen mode. When the user gets a high score I display a modal dialog box that allows the user to type in their name. In windowed mode there is no problem. In full screen mode, about half the time the dialog works and the other half the dialog displays for a split second and then disappears (I assume behind the DirectX buffer). Even though it is not visible, the dialog does still work. I''ve looked around and have seen others talk about this problem. But have not found any solution posted. I''ve tried moving the code that displays the dialog outside the BeginScene and EndScene and Present method calls and that didn''t work. I know I could make the full screen mode really just use a windowed mode that covers the screen. I also realize that there is the IDirect3DDevice9::SetDialogBoxMode() to get around this problem, but I don''t want people to have to upgrade DirectX for a simple game like mine. So basically is there a solution to this problem that still uses a true full screen application? Or as another option, is there a way to display a text box directly on the screen. Just as an example, in Dungeon Siege (full screen game) you are allowed type a description of your game before you save. Does any one know how I can do this and ensure that it will work every time? Thanks for any advice.

Share this post


Link to post
Share on other sites
gavin - I''m not sure if this is correct but I have heard that pre dx9 you cannot use standard windows/dialogs on a d3d surface. I use a proprietary gui using dx instead of the usual win32 dialogs so I haven''t tried this out myself.

ATS

Share this post


Link to post
Share on other sites
drewslater:

- You mentioned a "proprietary gui using dx". Where would learn about obtaining (or creating) something like that? All that I am really concerned about is getting a textbox on screen that the user can use.

NDES4ever:

- FlipToGDISurface is part of the Direct Draw interface. I am using Direct 3D. So can I mix Direct Draw method calls with the Direct 3D calls (which would be basically everything except for the call to FlipToGDISurface)? It just seems like that could cause a conflict; I haven''t tried this yet though.

Thanks for the suggestions.

Share this post


Link to post
Share on other sites
gavin,
It''s been awhile since the last post, but if you haven''t tried it already, it works. Direct 3D relies on Direct Draw so there are no conflicts. I have used it in a 3D application successfully.

Share this post


Link to post
Share on other sites