Re: Constantly Updating Dialog Box Output
You can use the SetWindowText method.
m_MyEdit.SetWindowText(TextBuffer);
SetWindowText changes the entire content of the edit control to the new text
in the buffer.
If you want to add text to the bottom of the edit control.
You have to put the selection at the end of the edit control using SetSel
and all ReplaceSel instead of using SetWindowText.
AliR.
<kefkastudio@gmail.com> wrote in message
news:1152822262.833515.47940@35g2000cwc.googlegroups.com...
Well, I'm probably reading in about a meg per second, so yeah, real
fast. I just started using MFC about 2 weeks ago, so apologies for the
dumb questions. So I noticed that CEdit has a bunch of signal stuff
(like CharFromPos). Where do I store my updated data if it is a
control? And, do I need to put something in my BEGIN_MESSAGE_MAP for
these messages.
I've already figured out how to used the threads in MFC, I'm using them
right now..
Ajay Kalra wrote:
My problema.. my program constantly reads in data and has a DWORD
variable which keeps track of the amount received. I would like to
constantly display this data. Is there an easy way to do this?
ActiveX, edit box, ..??
Depending upon the speed of incoming data, your issue is going to be
updating the control and receiving data at same time. For high speed
input,
you will have the data coming in a separate worker thread and updating
the
UI (control) by posting a message to the main thread. Choice of control
is
really not that important; depending upon your data /context, you could
use
CEdit, CListBox. CListCtrl etc.
--
Ajay Kalra [MVP - VC++]
ajaykalra@yahoo.com