Jump to content

View more

Image of the Day

The beast has a mighty searchlight of evil! #screenshotsaturday https://t.co/bzKepOojDL
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

MessageBox() on Failure is Hidden

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 Endemoniada   Members   

427
Like
0Likes
Like

Posted 23 February 2012 - 04:04 PM

Hi guys, when I initialize my fullscreen app I want to show a MessageBox() if it fails but it's not showing.


hWnd=CreateWindow(...);

if(!initSomeStuff())
goto cleanup;

if(!initD3D())
goto cleanup;

if(!initOtherStuff())
goto cleanup;

// message pump here

cleanup:

MessageBox(hWnd,"error","error",MB_OK);

I tried GetDesktopWindow() and NULL for the first param to MessageBox(). If initSomeStuff() fails it shows fine, but not for the following two tests (because D3D is setup in fullscreen at that point.)

Please help.

#2 kubera   Members   

1570
Like
0Likes
Like

Posted 23 February 2012 - 04:46 PM

Hi!

Is the MessageBox invisible?
Probably you have sent PostQuitMessage and Windows is not processing your windows after that.

The other scenario.
Your MessageBox is hidden behind fullscreen window.
In this case you would hide this fullscreen window (I am sending WM_CLOSE to that object).

#3 mhagain   Members   

13164
Like
0Likes
Like

Posted 23 February 2012 - 04:51 PM

IDirect3DDevice9::SetDialogBoxMode looks like what you want - look for it in your SDK help file.

It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.





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.