April 10th, 1999, 12:40 PM
Is there a simple way to build a window for continuous text output (like a terminal window) ?
|
Click to See Complete Forum and Search --> : TTY window with MFC April 10th, 1999, 12:40 PM Is there a simple way to build a window for continuous text output (like a terminal window) ? Jerry Coffin April 10th, 1999, 07:04 PM Probably the easiest way is to use a listbox control, and append lines to the bottom of the list box. Make sure the list box is NOT sorted. When you reach some maximum number of lines in the listbox, you'll probably want to start deleting the first line each time you add a new line, so it doesn't take up too much memory. The universe is a figment of its own imagination. Dieter Fauth April 12th, 1999, 03:39 AM Hi, I had the same problem and solved it pragmatically by using a CEditView derived class (I called it CLogView). Then I added a printf which finds the CLogView via a static member of CLogView. In InitInstance I added: // this is for the log view. m_pLogTemplate = new CMultiDocTemplate( IDR_LOGTYPE, RUNTIME_CLASS(CLogDoc), RUNTIME_CLASS(CMDIChildWnd), // standard MDI child frame RUNTIME_CLASS(CLogView)); AddDocTemplate(m_pLogTemplate); Let me know if you need more details. Dieter Fauth :-) codeguru.com
Copyright Internet.com Inc., All Rights Reserved. |