In VC++, how to access text continuously from console window and print it in a CListBox?
In VC++, how to access text continuously from console window and print it in a CListBox? Infact I have a MFC program which calls other FORTRAN exe. The output of the FORTRAN exe comes in the console window. I need to print it in a CListBox continuo开发者_如何学编程usly. I can print it in a file and can print it at one shot. But that is not my purpose. I need continuous feed. Can any one help me out of this?
_popen may work for you, see http://msdn.microsoft.com/en-us/library/96ayss4b%28VS.80%29.aspx
This Microsoft article should get you most of the way there: How to spawn console processes with redirected standard handles
精彩评论