"Pawel Kruczynski" <kr**@op.pl> wrote in message
news:c8**********@news.onet.pl...
did any know how redirect standard cout to edit in dialog window?
i work in ms vc++ and i don't want use mfc. please help..
sorry for my poor english
Write your own streambuf derived class that outputs to the dialog window.
Then use it like this (say your class is called MyBuffer)
MyBuffer my_buffer(...);
streambuf* old_buffer = cout.rdbuf(&my_buffer);
// cout will now be redirected to your dialog box
....
cout.rdbuf(old_buffer);
// now cout is back to normal
For details on how to write streambuf derived classes consult a good book on
the STL, for instance 'The C++ Standard Library' by Josuttis
john