1.

Solve : WinAPI Using starting console?

Answer»

How does one detect and attach itself to the console window it was started from (if it was started from a console window)?You don't, at least not as I understand it.

Only way to be part of an EXISTING console is to have the EXECUTABLE set as a Console program. Otherwise, it doesn't get a console, and the console that it started from oesn't BELONG to it's process so you couldn't AttachConsole() to it anyway. So no WINDOWS applications can use their starting console? That's a shame...

It's no massive deal, it's simple enough to AllocConsole.

Okay, thanks then.How do you thank people for a POST with the 'thanks' system?



Discussion

No Comment Found