Sign in to follow this  
Endemoniada

MessageBox() on Failure is Hidden

Recommended Posts

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

[code]

hWnd=CreateWindow(...);

if(!initSomeStuff())
goto cleanup;

if(!initD3D())
goto cleanup;

if(!initOtherStuff())
goto cleanup;

// message pump here

cleanup:

MessageBox(hWnd,"error","error",MB_OK);
[/code]

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.

Share this post


Link to post
Share on other sites
kubera    1589
[b]Hi![/b]

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).

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