i'm not sure if this is the answer u want, b/c i dont fully understand what u mean by "log window", but if u run a program from DOS prompt like:
./program >outfile standard output is redirected to the file outfile. if u want to do that inside the program, u use the dup2() function. open the output file, and then dup2 the descriptor onto STDOUT.
infamous
Junior Poster in Training
77 posts since Mar 2004
Reputation Points: 47
Solved Threads: 2
ugh, nevermind apparently windows doesn't support dup'ing
infamous
Junior Poster in Training
77 posts since Mar 2004
Reputation Points: 47
Solved Threads: 2
ugh, nevermind apparently windows doesn't support dup'ing
yes it does -- for redirecting stdout or stderr to a file. You can't redirect it like that to a MS-Windows GUI control, such as an edit control. And I don't think you can do that under *nix X11 controls either.
But I know what you want to do can be done -- I've seen it, but not sure how to do it either. Maybe pipes is the way to go.
Ancient Dragon
Retired & Loving It
30,040 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,341