Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Console\GUI App. Question

Status
Not open for further replies.

cyprus106

Programmer
Apr 30, 2001
654
I have 2 questions on the topic of DOS

1) Is it possible to tell from my (non console) application if it was launched from the command line without having to get a Command Line Argument or making the user physically tell the app if it launched from DOS. I need it to be internal. Does anyone know how to go about doing this... because I sure don't.

2) How can I combine a Console application with windows project? Basically, if the user ran the program from DOS, I don't want to even load the GUI, I simply want to redirect all of the user messages and so on to the console. Any suggestions?



The reason I'm doing this is because I have been developing a program that must support both windows and DOS. When the user is not in windows and tries to launch the program from dos, it won't let them, because all it has is it's GUI. This, in effect, screws my DOS users over and now I need this functionality avalible.

Thanks much,
Cyprus
 
I think you would be better off writing
2 programs. That way you separate
the 16 from the 32 and nobody feels crowded.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top