Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

In our custom assertion handler, I'd like to display a message box asking to see whether or not this failure can be ignored. However, when our DirectX game is full screen, I can't get the MessageBox function to display above the full screen.

Note: The first parameter to MessageBox is the the HWND used to create the device, and it still does not work.

Is this even possible?

share|improve this question
add comment

3 Answers

up vote 3 down vote accepted

Yeah, you very well may be out of luck - (although there's a MessageBoxOptions that allows you to specify ServiceNotification, which might do the right thing http://msdn.microsoft.com/en-us/library/system.windows.forms.messageboxoptions.aspx)

Typically I write my own message rendering at that point (to make sure you can use the assert anywhere, on xbox, whatever).

share|improve this answer
    
Closest I could get is specifying MB_SETFOREGROUND, which works 50% of the time for some reason. –  Jeff Jul 21 '10 at 20:21
add comment

Try writing a WPF GUI instead (start with a prototype).
That should fix your problem.
(Render to a full screen WPF's DirectX surface and not directly to screen.)

share|improve this answer
    
Why is this voted down!? I have done this before and it DOES work. –  Danny Varod Jul 24 '10 at 19:25
    
WPF requires creating a managed stack. In this case, I needed a pure Win32 / DirectX solution. –  Jeff Aug 21 '10 at 4:35
2  
Well, state that in the question. –  Danny Varod Aug 27 '10 at 2:28
add comment

As far as I was able to tell last time we tried this, it isn't possible.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.