How can I detect if my console application was started from another console, or if it opened a new console upon launch?
For example if I want the console to have some custom colors if it opened a new console window upon starting it, or to just leave everything as it is if started from another console. (Much like PowerShell.exe seems to do)