Skip to main content
gamedev.net
🔒 Locked

MessageBox() while another screen is active

Started by Lord Maz 4 replies 250+ views
Original Post
Lord Maz
Lord Maz
I can''t get a messagebox to show when my other screen is active, the screen becomes unselected (gray) but the messagebox isn''t shown, it justs sits in the background. Anyone know how to fix this? -Lord Maz-
-Lord Maz-
felisandria
felisandria
What did you put as the parent of your messagebox? Use the messagebox that allows you to define parent, then put NULL as your parent, and it should work... unless your window that''s taking over is marked WND_TOPMOST, in which case crank that down a little to WND_TOP.

This is assuming you''re doing some MFC or Win32 stuff... you''re going to need more help if you''re trying to get an exclusive mode DirectX app to cooperate with GDI stuff like message boxes.

-fel
~ The opinions stated by this individual are the opinions of this individual and not the opinions of her company, any organization she might be part of, her parrot, or anyone else. ~
Lord Maz
Lord Maz
Oh sorry, I noticed now I should''ve been more precise :/

I''m making a all-around wrapper for a game using DirectX as API, but at the moment there''s no Direct3D, I''ve just got a (non-fullscreen) window. No MFC.

I''ve tried both null and parent, nothing worked. What is that WND_TOPMOST stuff you''re talking about? I''ve searched and found nothing about it, could you explain further?

I have no idea if this is any help but as soon as I press the alt button, the message pops up to the front.. maybe I just need some function to put the focus on the message? Or rather de-focus the window or something

-Lord Maz-
-Lord Maz-
felisandria
felisandria
DirectX and Win32 (which your messagebox is) do not play nice with each other by default. You need to look for a tutorial on using Win32 message boxes and such over DirectX. Otherwise you might sometimes get your message box, but never consistently.

-fel
~ The opinions stated by this individual are the opinions of this individual and not the opinions of her company, any organization she might be part of, her parrot, or anyone else. ~
Lord Maz
Lord Maz
Doh, I fixed the prob I had by mistake catched the WM_PAINT message in winproc, and I returned without doing anything with it :/

Thanks for the help anyway

-Lord Maz-
-Lord Maz-

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.