View Full Version : focus to glut window
03-11-2006, 05:57 PM
I am coding in C not C++. How can I transfer focus to the glut window from the Windows Dos windows? I can do it now by clicking with the mouse in the glut window but would like to just have it happen when the glut window opens. I use glut's keyboard to stay focused on the glut window.
This is not an answer, but may be an option if you don't want to have dos window at all:
Q36: How do you avoid the Console window appearing when you compiler a Win32 GLUT application with Microsoft compilers?
A36: Try using the following Microsoft Visual C compiler flags:
These are linker options... if main or wmain are defined, MSVC build a CONSOLE app by default; hence the need for /SUBSYSTEM:WINDOWS. if /SUBSYSTEM:WINDOWS is defined, MSVC expects WinMain or wWinMain to be defined; hence the need to /ENTRY:mainCRTStartup (eg the entry point is the usual C main).
stdout/stderr are [apparently] not "attached"; output via printf is simply "eaten" unless redirected at the command-line or by a parent program.
Information thanks to Jean-David Marrow (firstname.lastname@example.org).
03-14-2006, 06:32 PM
Even though that is not what I'd planned on doing, I'm going to see how I can move the scanf's and printf's so they work within the gl window.
Really appreciate your help.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.