How do I bypass GUI in MFC app if command line options exist?

Posted by Brandon on Stack Overflow See other posts from Stack Overflow or by Brandon
Published on 2010-06-17T15:14:45Z Indexed on 2010/06/18 8:03 UTC
Read the original article Hit count: 210

Filed under:
|
|

I've got an existing simple MFC app that the user specifies the input file, output file, and then a "Process" button. I'd like to just add the capability so that the input/output files are command line parameters. But, if they exist, I don't want the GUI to show up. I just want the "Process" to execute. I see where I can get the command line parameters (m_lpCmdLine) but how can I bypass the displaying of the GUI? If I step into the app, it goes directly to winmain.cpp and displays the GUI without stepping into any of my code.

© Stack Overflow or respective owner

Related posts about command-line

Related posts about mfc