Timeline for One executable that starts as a GUI application or console application based on command line in Visual Studio 2005
Current License: CC BY-SA 2.5
6 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Apr 21, 2009 at 16:41 | comment | added | balint.miklos | I did try it with AttachConsole(ATTACH_PARENT_PROCESS) but the compiler told me doesn't find the identifier AttachConsole... with #include <windows.h> | |
| Apr 21, 2009 at 13:02 | comment | added | balint.miklos | The AllocConsole() works for me, and opens a new console even if I start from a console. Anyway thanks for the answer | |
| Apr 21, 2009 at 12:26 | comment | added | Raphaël Saint-Pierre | AllocConsole() may also be appropriate: msdn.microsoft.com/en-us/library/ms681944.aspx | |
| Apr 21, 2009 at 11:46 | comment | added | Konrad Rudolph | The documentation says to include <windows.h> and this is definitely enough. Did you forget the argument when calling the function? | |
| Apr 21, 2009 at 11:36 | comment | added | balint.miklos | could you please give me a hint what header files and macro definition I need to be able to use AttachConsole? I tried #include <windows.h> #include <Wincon.h>, but apparently that is not enough to find AttachConsole function | |
| Apr 21, 2009 at 11:16 | history | answered | Konrad Rudolph | CC BY-SA 2.5 |