Question about automatically choosing current OpenGL window


I have a question about automatically switching from command window to my current OpenGL window. I have a program which first asks the user to choose several parameters then entering to full screen mode image rendering. However, when I want to press a button, I always need to first click mouse to choose the current full screen window and then the button response will work. Do you know if there is some ways to directly choose the current window when entering the full screen mode without clicking mouse?



Problem solved using the sentence below

HWND hWnd = GetActiveWindow();