8
\$\begingroup\$

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?

\$\endgroup\$

3 Answers 3

3
\$\begingroup\$

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

\$\endgroup\$
1
  • \$\begingroup\$ Closest I could get is specifying MB_SETFOREGROUND, which works 50% of the time for some reason. \$\endgroup\$
    – Jeff
    Commented Jul 21, 2010 at 20:21
1
\$\begingroup\$

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

\$\endgroup\$
3
  • 1
    \$\begingroup\$ Why is this voted down!? I have done this before and it DOES work. \$\endgroup\$ Commented Jul 24, 2010 at 19:25
  • \$\begingroup\$ WPF requires creating a managed stack. In this case, I needed a pure Win32 / DirectX solution. \$\endgroup\$
    – Jeff
    Commented Aug 21, 2010 at 4:35
  • 3
    \$\begingroup\$ Well, state that in the question. \$\endgroup\$ Commented Aug 27, 2010 at 2:28
0
\$\begingroup\$

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

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .