When i use AllocConsole for my GUI program i get a nice dos box. This box is used to run programs in batch mode. The problems is that when i close the dos box with the x in the right top my main program also shuts down. Is there anything i can do about this?
I tried it with SetConsoleCtrlHandler but this didnt help.