c++.windows.32-bits - Context-aware Win32 GUI exes
- Matthew Wilson (9/9) Oct 18 2002 This is a possibly dumb question, but does anyone know of a technique
- Walter (4/13) Oct 19 2002 Try looking at argv[0], and see if there's a difference.
This is a possibly dumb question, but does anyone know of a technique whereby one can determine whether an executable is launched from the command line or not. The desired behaviour I am after is outputting the help information to stdout if launched on the command-line, otherwise popping a dialog. Let me tell you that I've tried querying the console characteristics but that proved to be not wholly reliable, the same goes for getting the standard handles (via GetStdHandle()). Matthew
Oct 18 2002
Try looking at argv[0], and see if there's a difference. "Matthew Wilson" <dmd synesis.com.au> wrote in message news:aoptfv$2v26$1 digitaldaemon.com...This is a possibly dumb question, but does anyone know of a technique whereby one can determine whether an executable is launched from thecommandline or not. The desired behaviour I am after is outputting the help information to stdout if launched on the command-line, otherwise popping a dialog. Let me tell you that I've tried querying the console characteristics but that proved to be not wholly reliable, the same goes for getting the standard handles (via GetStdHandle()). Matthew
Oct 19 2002