Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

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

share|improve this answer

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
Well, state that in the question. – Danny Varod Aug 27 '10 at 2:28

Your Answer


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.