Jump to content
  • Advertisement

Archived

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

J Simkowski

No MessageBox under WinXP

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

If you intended to correct an error in the post then please contact us.

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


Link to post
Share on other sites
Advertisement
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 this post


Link to post
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 ?That`s better when you want to be sure the messagebox is untop youre main window...

Share this post


Link to post
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 ?That`s better when you want to be sure the messagebox is untop youre main window...

Share this post


Link to post
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).

Share this post


Link to post
Share on other sites
Thanks for all of your help. I appreciate the quick responses. You guys are great!

It seems my XP has gone belly up and I''m now re-installing. Hopefully, this will resolve the issue.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!