Jump to content
  • Advertisement
Sign in to follow this  
spacemonkey005

hidden dialog boxes

This topic is 5070 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

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
Advertisement
Well I tried doing a SetFocus( hWnd ); on the WM_INITDIALOG message, but with no luck. I can't find any thing on this anywhere. Can someone throw me a hint...

Share this post


Link to post
Share on other sites
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
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
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
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!