MessageBox woes

Discussion about everything. New games, 3d math, development tips...
Post Reply
wyrmmage
Posts: 204
Joined: Sun Mar 16, 2008 3:12 am
Contact:

MessageBox woes

Post by wyrmmage »

I'm having major issues with Microsoft's MessageBox function; it works fine in windowed mode, but when I'm in fullscreen mode the message box pops up behind the window, leaving me unable to click, type, or do anything with the main window.

I'm calling the function like so:

Code: Select all

MessageBox(NULL, (LPCTSTR)errorMessage, (LPCTSTR)"Epic Fail! Proceed?",MB_OKCANCEL|MB_ICONERROR|MB_APPLMODAL);
I've tried every combination of
  • MB_APPLMODAL
  • MB_SYSTEMMODAL
  • MB_TASKMODAL
with
  • MB_SETFOREGROUND
    and
  • MB_TOPMOST
I've also tried

Code: Select all

HWND windowHandle;
windowHandle = reinterpret_cast<HWND>(getVideoDriver()->getExposedVideoData().OpenGLWin32.HWnd);
MessageBox(windowHandle, (LPCTSTR)errorMessage, (LPCTSTR)"Epic Fail! Proceed?",MB_OKCANCEL|MB_ICONERROR|MB_TASKMODAL|MB_TOPMOST|MB_SETFOREGROUND)
I'm using opengl, by the way.

Any idea what the problem is? I've spent a couple of days trying to fix the problem, and I'm at my wit's end :(

Thanks in advance :)
-wyrmmage
Worlds at War (Current Project) - http://www.awkward-games.com
Ganadu'r, The Eternal Sage (Other Current Project) - http://rpg.naget.com
Post Reply