title: Main in MFC console app (NOT WinMain, main)
body: <p>For a sample program, though this is doing all good for me. But I was wondering how is it happening.</p>
  
  <p>I created a console application with "MFC" checkbox enabled while creating the project (VC2008).
  It created standard <code>_tmain</code> implementaion with <code>AfxWinInit</code> calls and all. Then I wrote my custom function <strong><code>Main</code></strong> and called it from <code>_tmain</code> itself.</p>
  
  <p>Now as soon as press F10 or F11 to START debugging, it goes into <code>Main</code> and not <code>_tmain</code> (yes, via <code>_tmain</code> itself) - How and Why - that's the question. </p>
  
  <p>No I didn't set any project setting at all. this is about 32-bit Debug build.</p>
  
  <p>EDIT: The interesting thing is this:</p>
  
  <pre><code>#include "stdafx.h"
  
  void Main()
  {
      printf("This is custom main");
  }
  
  int _tmain(int argc, _TCHAR* argv[])
  {
      if(false) // Getting fooled, or fooling us?
          Main();
  
      return 0;
  }
  </code></pre>
  
  <p>Visual Studio considers <code>Main</code> as entry point, and doesn't do anything when I start debugging with F10/F11 - since <code>false</code> is false and doesn't allow <code>Main</code> to be called!</p>