I am trying to make a simple game in Win32 C++ and I made a settings window that gets called when the user presser the 'P' button or 'Esc'.
Now my question is how can I give that settings window the focus as long as the window is not destroyed, I tried using the SetFocus();
function and also I tried to send a WM_SETFOCUS
and WM_KILLFOCUS
Messages by using the SendMessage();
function and they worked fine but when I press on the main window with the mouse the focus goes to the main window again.
I don't know if my problem had something with the focus but what I am trying to do is to make my settings window like a message box that once it appear you cant click outside it unless you closed it.