|
-
April 10th, 1999, 12:40 PM
#1
TTY window with MFC
Is there a simple way to build a window for continuous text output (like a terminal window) ?
-
April 10th, 1999, 07:04 PM
#2
Re: TTY window with MFC
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.
-
April 12th, 1999, 03:39 AM
#3
Re: TTY window with MFC
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 :-)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|