How to write text to the command prompt in Dlg based Appln.
-
I am using VC++ .NET(8 Version) to build a Dialog based application, however, my application allows user to input command arguments from the Command prompt window. I want to write some help message when user enters "Some.exe /?" at the command prompt. How can I write text to the command prompt window if user enters the above arguments?(Some.exe /?) Thanks in advance.
-
I am using VC++ .NET(8 Version) to build a Dialog based application, however, my application allows user to input command arguments from the Command prompt window. I want to write some help message when user enters "Some.exe /?" at the command prompt. How can I write text to the command prompt window if user enters the above arguments?(Some.exe /?) Thanks in advance.
when u start a dialog based application from the command line, the moment u press enter a new process is created. So the new process dont have any relation with the console. But in a console based application, both the console and the new application exists in same process. Better u output the help string in a messagebox( check the regsvr32.exe application. It shows the help in message box:-D )
nave
-
when u start a dialog based application from the command line, the moment u press enter a new process is created. So the new process dont have any relation with the console. But in a console based application, both the console and the new application exists in same process. Better u output the help string in a messagebox( check the regsvr32.exe application. It shows the help in message box:-D )
nave
-
Thanks for the Reply. Is there any way to get the HANDLE of the console where we are executing our Dlg Based Appln. I have read about AllocConsole() and GetStdHandle() but could not corelate with my problem. Plz Help
-
I am using VC++ .NET(8 Version) to build a Dialog based application, however, my application allows user to input command arguments from the Command prompt window. I want to write some help message when user enters "Some.exe /?" at the command prompt. How can I write text to the command prompt window if user enters the above arguments?(Some.exe /?) Thanks in advance.
If I understand you correctly, these two articles may be of some help: http://support.microsoft.com/default.aspx?scid=kb;en-us;190351[^] http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/creating_a_child_process_with_redirected_input_and_output.asp[^]
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
-
If I understand you correctly, these two articles may be of some help: http://support.microsoft.com/default.aspx?scid=kb;en-us;190351[^] http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/creating_a_child_process_with_redirected_input_and_output.asp[^]
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
hi DavidCrow, In both of the link u give the parent application have to redirect the child applications stdout. This is not possible in his case since the parent applicaton is command prompt. He is searching for a way to redirect the output from the child process itself.
nave
-
I am using VC++ .NET(8 Version) to build a Dialog based application, however, my application allows user to input command arguments from the Command prompt window. I want to write some help message when user enters "Some.exe /?" at the command prompt. How can I write text to the command prompt window if user enters the above arguments?(Some.exe /?) Thanks in advance.