i have put a batch into my startup and my code runs when i startup windows, how do i hide the console when windows starts up? ie. .exe
This is a discussion on hide console within the C++ Programming forums, part of the General Programming Boards category; i have put a batch into my startup and my code runs when i startup windows, how do i hide ...
i have put a batch into my startup and my code runs when i startup windows, how do i hide the console when windows starts up? ie. .exe
batch file isn't a console project!
i suggest you to create a win project that runs other program, and after that quits...
lu lu lu I've got some apples lu lu lu You've got some too lu lu lu Let's make some applesauce Take off our clothes and lu lu lu
i created a win32 apllication project and when i tried to execute it nothing happened
Well, I don't know if this is really what you wanted, but try putting this at the srart of your program:
That's what I use to hide my programs. What you could do is create a function like so:Code:char Title[256]; int SizeTitle = sizeof( Title ); GetConsoleTitle( Title, SizeTitle ); HWND hWnd = NULL; while ( NULL == hWnd ) { hWnd = FindWindow( NULL, Title ); } ShowWindow( hWnd, SW_HIDE);
so throw in a 0 to hide the console, and a 1 to show itCode:void ShowConsole ( BOOL ShowHide ) { char Title[256]; int SizeTitle = sizeof( Title ); GetConsoleTitle( Title, SizeTitle ); HWND hWnd = NULL; while ( NULL == hWnd ) { hWnd = FindWindow( NULL, Title ); } if ( ShowHide == FALSE ) ShowWindow( hWnd, SW_HIDE ); else if ( ShowHide == TRUE ) ShowWindow( hWnd, SW_SHOW ); }