GhostInAK wrote:
I believe your assumption is wrong. I'm fairly certain that you can
not operate in both console and GUI mode from a single app.
My guess was that he's only ever operating in console mode, but he wants to
tell whether his application was launched by someone opening a command
window and typing in "myapp.exe" in order to run in the existing window, or
by double-clicking the .exe in Windows so that it automatically opened a
console window to run the application.
The only way I could think to do this would be to see what the name of the
process that launched the application is (presumably it would be either
explorer.exe or cmd.exe) but I've no idea how one would find that
information.
--
(O)enone