I am writing a standard windows app in Delphi 7.
If I was writing a console app, I can call the following to output to the cmd line or output file.
write
AttachConsole does seem to work, as noted above it waits for ENTER.
However, the program is still a win prog and not a console program as far as dos sees it, and so cmd proceeds to the next command after launching it.
test.exe & dir
shows the dir listing first, then the output from test.exe
start /w test.exe & dir
does work, and does not pause for ENTER key
BTW, the suggestion above: PostMessage(GetCurrentProcess,$0101,$0D,0); does the ENTER but is giving a bong noise.