title: How to hide the console window in a Win32 project using Visual Studio 2010
body: <p>I need to create an exe application with no console window or (any other window) during the start up of the application.</p>
  
  <p>I tried the below for this:</p>
  
  <ol>
  <li>Using Visual Studio 2010, created a Win32 Console Application as an Empty Project.</li>
  <li>Added a header file "stdafx.h" to the project</li>
  <li>Added a cpp file to the project and added the below code.</li>
  <li><p>The project settings are visual stduio default.</p>
  
  <pre><code>#include "stdafx.h"
  #include &lt;windows.h&gt;  
  #include "TlHelp32.h"
  #include &lt;iostream&gt;
  #include &lt;string&gt;
  int APIENTRY WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow)
  {
  
          return 0;
  }
  </code></pre></li>
  </ol>
  
  <p>The above code compiles good.</p>
  
  <p>But if I change the Character Set to "Use Unicode Character Set", I am getting the following compilation error.</p>
  
  <blockquote>
    <p>error C2731: 'WinMain' : function cannot be overloaded</p>
  </blockquote>
  
  <p>I am building the application on a Windows 7 64 bit computer and Visual Studio Build platform as x64.</p>
  
  <p>Thanks in advance for your help.</p>