Click to See Complete Forum and Search --> : minimize main() window
vlip
December 6th, 2006, 01:32 AM
hi, i'm doing a program that using c++ with opengl. i'm having a problem that when i run the program, there come out 2 windows. 1 window will be the opengl window i created and 1 is the main() function window. so, is there any solution or any other way to keep the main() window to minimize or close it?
here the image i created http://img155.imageshack.us/img155/7125/deeij9.jpg
thanks
vlip
December 6th, 2006, 01:35 AM
here my main() function code:
void main(int argc, char **argv)
{ glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
glutInitWindowPosition(100, 100);
glutInitWindowSize(w1, h1);
main_window = glutCreateWindow("....");
glutDisplayFunc(display);
glutReshapeFunc(Reshape);
glutKeyboardFunc(keyboard);
glutSpecialFunc(myKey);
glutMouseFunc(mouse);
glutIdleFunc(display);
myInit();
glutMainLoop();
}
Zachm
December 6th, 2006, 03:55 AM
Are you talking about the console window ? If your'e using VS 6.0 you can get rid of the console window using the following method:
Add the following line to the beginning of your c code:
--------------------------------------------------------------------------
// #pragma comment( linker, "/subsystem:\"windows\" /entry:\"mainCRTStartup\"" )
--------------------------------------------------------------------------------
If it doesn't work, or your'e using a different environment,
try googling for "openGL console" etc.
vlip
December 7th, 2006, 01:28 AM
yes, the console window.. it can now.. but are there any way to make it minimize instead of closing it?
thanks
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.