title: MFC - extend app to run from command line
body: <p>I have an existing MFC application which I'm trying to extend to accept command line parameters and run unattended. </p>
  
  <p>I need to kick off some events <em>after</em> the InitInstance() has finished and the existing GUI has been fully loaded. I've looked at winmain.cpp, but it's not clear to me how to run my events as it seems to kick off a thread and 'disappear' from the debugger (i.e. what gets executed next? Must be the MFC loop, right? Is it possible to hook into there?) I'm new to this and it's entirely possible I'm missing something insight at a higher level, which is not that easily googled. Grateful for pointers.</p>
  
  <p>Thanks.</p>