Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

MessageBox doesn't get focus #210

OlafvdSpek opened this Issue Apr 12, 2013 · 8 comments


None yet
2 participants

OlafvdSpek commented Apr 12, 2013

The "ERROR LOADING DATA FILE" MessageBox doesn't get focus, so hitting Escape doesn't work.


miniupnp commented Oct 19, 2015

I don't know how to fix it...
Maybe it's related to 1st argument of MessageBox() being NULL ? would it help if it was the handle of main application window ?


OlafvdSpek commented Oct 24, 2015

Why is it NULL?

A handle to the owner window of the message box to be created. If this
parameter is NULL, the message box has no owner window.


miniupnp commented Oct 27, 2015

@OlafvdSpek : have you tried to set the parameter and see if the behaviour is different ?


OlafvdSpek commented Oct 27, 2015


miniupnp commented Jan 27, 2016

@OlafvdSpek any update ?


OlafvdSpek commented Jan 27, 2016

s_hwnd appears to be NULL at that point, so that's of no use.
The window is created in Video_Tick after the message box is displayed (but before the user has done anything with it).


miniupnp commented Jan 29, 2016

Hum I understand the issue.
The window is created in the Video_Tick() and it is created AFTER the messageBox() call.
So the messagebox is created with the focus, and then the application window is created and gets the focus.


miniupnp commented Jan 31, 2016

@OlafvdSpek is the fix ok for you ?

@miniupnp miniupnp closed this in 0b541cf Feb 1, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment