![]() |
|
#1
|
|||
|
|||
how to keep the console window from openingHello,
I wrote an application that simply writes some variables to a file. Is there anyone to run this program without the console window appearing at all? Right now you can see the console window open for about half a second and then close. I made sure to remove any code that outputs to the console. I am using MS Visual Studio 2005 and have strated with an empty c++ project. Thanks, Tim |
|||
|
#2
|
|||
|
|||
Re: how to keep the console window from openingYou can create a Windows (GUI) application instead, and just not create a window. The only difference is the signature of main(). It is this instead:
CPP / C++ / C Code:
hPrevInstance hasn't been used since 16-bit Windows. lpCmdLine (NB: LPSTR means char*) is the arguments passed to your program. If you need the arguments in the argv/argc format like you'd have with a regular console program, use the function CommandLineToArgvW. nCmdShow is a hint about whether the app's main window should be maximized or restored; obviously you can ignore this. P.S.: You might have to include windows.h. P.P.S.: I don't use MSVC, but there might be an option somewhere else to just not create a console instead of creating a full-fledged GUI project. |
Recent GIDBlog
Install Adobe Flash - Without Administrator Rights by LocalTech
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| need help with a console menu system | BullBuchanan | C++ Forum | 6 | 20-Aug-2006 15:46 |
| Getting Input from a Window | blank | C++ Forum | 7 | 12-Jan-2006 11:07 |
| Bloodshed Dev C++ Project Options | JdS | C++ Forum | 6 | 11-Nov-2005 18:23 |
| Win32 Window Shading behavior (like linux) | WillyumYum | C++ Forum | 3 | 18-Apr-2005 15:36 |
| Changing window start colour | Rosdahale | C++ Forum | 5 | 19-Jan-2005 16:51 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The