Sign in to follow this  
spacemonkey005

hidden dialog boxes

Recommended Posts

spacemonkey005    122
I am using basic windows dialog boxes in my DX9 game, and the problem is that sometimes they come up behind the screen and I can't see them. This happens in both fullscreen and windowed mode. The call i am using is this: DialogBox(hInst, (LPCTSTR)IDD_CONFRM_DIAG, hDlg, (DLGPROC)ConfrmDiag); Im not sure why it only is hidden sometimes... any help much obliged. C'mon guys, someone must know what's going on?! anybody? [Edited by - spacemonkey005 on August 6, 2004 8:17:06 AM]

Share this post


Link to post
Share on other sites
evolutional    1393
What are you passing for the parent window? hDlg? Your naming convention leads me to believe that you're passing another dialog as a parent, is this correct?

Are you sure the Dialog is being created (eg: checking the return). The way you're creating the dialog, it should be modal and appear above the parent window. The problem you're having leads me to think that there's a problem somewhere with the handle to the parent.

I'm assuming you've read the section on MSDN concerning Dialog Boxes?

Share this post


Link to post
Share on other sites
spacemonkey005    122
hDlg is the handle to the parent, which is the main window - being a dialog box. The pop-up dialog is being created every time because it comes up, but sometimes it's behind the main window. So I assume (:0) that it is being created properly. I'll go backtrack now for the HWND but I'm pretty sure that's the parent's...

Share this post


Link to post
Share on other sites
Etnu    880
Using windows dialogs can be a pain in the ass. You can pass NULL as the hwnd when running windowed, but as soon as you switch to full screen you can't do that anymore.

I'd normally recommend a bunch of canned, cheap work arounds, but that's not necessary anymore if you're using DX.

Instead, I'd just use the DX GUI controls framework included with the 2k4 SDK. Save yourself a lot of trouble.

Share this post


Link to post
Share on other sites
spacemonkey005    122
I would like to use the new 9.0c GUI framework, but I don't want my end users to require such a new DX, and I am basing this on DX8. I am writing this for users to be required to have DX8, as this is a game for casual users BTW.
Other then using the new GUI framework, what sort of "canned, cheap work arounds" would one have to implement to get this damn diag visible at all times?


I am also calling this DialogBox(g_hInst, (LPCTSTR)IDD_CONFRM_DIAG, hWnd, (DLGPROC)ConfrmDiag); from my message pump, so I know that's the correct HWND...

[Edited by - spacemonkey005 on August 6, 2004 1:26:18 PM]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this