Hide console in the GLUT-project

Started by d3dx, February 23, 2017, 12:15:31 PM

Previous topic - Next topic

d3dx

Hello! :)
Please, help me.

How can I hide the console in the GLUT-project?

OS: Windows

TimoVJL

//int main (int argc, char **argv)
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow)
{
glutInit(&__argc, __argv);
May the source be with you

d3dx

Thank you!

But this is true for Win32 project. I am interested in Console-project :)

I read this advice in the RED Book:

...
int main (int argc, char **argv)
{
char* argv = "";
int argc = 0;
glutInit(&argc, &argv);

...
}

But this method is not working...

TimoVJL

This code hide console window at runtime, but user see a flash of it at startup.
ShowWindow(GetConsoleWindow(),0);
May the source be with you

d3dx