Skip to main content
GameDev.net gamedev.net
🔒 Locked

MessageBox() on Failure is Hidden

Started by Endemoniada Feb 23, 2012 at 10:04 PM 1 replies 1.2k views
Original Post
Endemoniada
Endemoniada
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.
kubera
kubera
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).
21st Century Moose
21st Century Moose
IDirect3DDevice9::SetDialogBoxMode looks like what you want - look for it in your SDK help file.
Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls. 

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.