View Full Version : Making the DOS window disapear ....
10-18-2000, 12:50 PM
I am using VC++ 5.0 in Win98 and everytime I execute my OpenGL program with GLUT 2 windows is appearing on the screen: a DOS Application Window and My Aplication window.
How can i make the first one disapear.
I know that there are some compiler directives in VC to do it.
Wait for response.
When you create your project in Visual C++ (under File->New), choose "Win32 Application" instead of "Win32 Console Application". In your code, write a WinMain() function instead of the standard main() function.
int WINAPI WinMain(HINSTANCE, HINSTANCE, LPTSTR commandLine, int);
I think those are the only changes, but play around with it.
10-18-2000, 06:59 PM
Thanks Bman but there is a small problem, if I use winmain instead of main the source-code will loose portability and that's the biggest reason to me to use GLUT.
I found in a GLUT FAQ that I can use this compiler flags below:
Does anybody knows how can I use that ?
10-19-2000, 03:22 AM
I'm don't speak very well anglish, but if I understand you question you can make that (with Visual C++ 6.0):
2) In Categories choose : Output
3) write in Entry-point symbol: " mainCRTStartup"
After what I think it's correct!
10-19-2000, 05:44 AM
Great! It works. I've not posted to this thread yet, but when I saw that there could be a solution i tried it and it worked.
Here's the complete setup:
Select "Project" -> "Settings"
Select the "Link" tab
In the bottom of the dialog box there is a text area with the "Project Options".
Look for the word "subsystem", after it there should be "console", replace it with "windows".
Add the following string to the options: "/entry:mainCRTStartup".
Thats it, and it works!
Antonio www.fatech.com/tech (http://www.fatech.com/tech)
10-19-2000, 08:57 AM
Thanx Boubou and Antonio.
Now it's working fine !!
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.