• Popular Now

• 12
• 12
• 9
• 10
• 13

Archived

This topic is now archived and is closed to further replies.

No MessageBox under WinXP

This topic is 5390 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

Just wondering if anyone else is having this problem or knows how to fix it ... When using the MessageBox() function (as in any of the tutorials)(sample code below), my WinXP (Pro) system bypasses the message box and returns the default answer. On my Win2K (Pro) system, everything runs fine. I haven't modified the MessageBox calls ... they're just as listed in the tutorials. Any suggestions? if (MessageBox(NULL, "Would you like to start in FullScreen mode?", "Start FullScreen", MB_YESNO|MB_ICONQUESTION) == IDNO) { g_Log.PostNL("User has chosen to start in windowed mode."); isFullScr = false; } else { g_Log.PostNL("User has chosen to start in fullscreen mode."); isFullScr = true; } The end result is that I always receive a fullscreen window with no message box ever being displayed. But, again, only on the WinXP system. One last thing: I'm running Dev-C++ v4.9.8.0 with the latest package updates. Thanks! [edited by - J Simkowski on June 16, 2003 4:32:48 PM] [edited by - J Simkowski on June 16, 2003 4:34:04 PM]

Share on other sites
Here, WinXP(Pro) runs fine!

Share on other sites
It's clearly something to do with DevC. I'm using MSVC++ 6 and have no problems.

Beginners and experts will find answers here.

[edited by - mathematix on June 16, 2003 4:39:26 PM]

Share on other sites
Have you tryed to specify the MessageBox as child to the main window ?
like if you have a
HWND g_hWnd;//I hate the g_ but it seems you have it...
MessageBox(g_hWnd,...);
Tryed that ?Thats better when you want to be sure the messagebox is untop youre main window...

Share on other sites
Have you tryed to specify the MessageBox as child to the main window ?
like if you have a
HWND g_hWnd;//I hate the g_ but it seems you have it...
MessageBox(g_hWnd,...);
Tryed that ?Thats better when you want to be sure the messagebox is untop youre main window...

Share on other sites
You might want to try what cippyboy said. Putting the hWnd as NULL makes the messagebox''s owner be the desktop. I don''t see how that would make any REAL difference though in your situation. The code you posted works fine for me also (WinXP).