I've written a dialog-based, MFC application. The program performs one of three different tasks. The bulk of the code exists in the app class and is called from the dialog class. I've also got the program set up so that command line arguments are parsed and if provided, the tasks are executed without displaying the dialog.
e.g.
To display the dialog: AppName.exe
To execute task #1: AppName.exe /1
To execute task #2: AppName.exe /2 switch
To execute task #3: AppName.exe /3 value path
The arguments are being parsed in the app class' InitInstance function. I'd like to add a fifth option which is AppName.exe /? and it would display brief instructions but I have no idea how to do console output from the app class.
Is there an MFC or Win32 call that'll give me a pointer to/handle of the console window? Is there some other way of directing output to the command window that is used to launch your app? I've got code archived somewhere that'll create a console window but that isn't what I want.
e.g.
To display the dialog: AppName.exe
To execute task #1: AppName.exe /1
To execute task #2: AppName.exe /2 switch
To execute task #3: AppName.exe /3 value path
The arguments are being parsed in the app class' InitInstance function. I'd like to add a fifth option which is AppName.exe /? and it would display brief instructions but I have no idea how to do console output from the app class.
Is there an MFC or Win32 call that'll give me a pointer to/handle of the console window? Is there some other way of directing output to the command window that is used to launch your app? I've got code archived somewhere that'll create a console window but that isn't what I want.