PDA

View Full Version : Question about automatically choosing current OpenGL window



wangjihang
10-22-2012, 12:36 PM
Hello,

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?

Thanks,

Jihang

wangjihang
10-22-2012, 12:57 PM
Problem solved using the sentence below

HWND hWnd = GetActiveWindow();
howWindow(hWnd,SW_SHOW);
SetForegroundWindow(hWnd);