|
-
April 13th, 1999, 08:17 AM
#1
use CRichEditCtrl as text output
Hi world,
I want to use a multiline CRichEditCtrl control with vertical scrolling as an output field for messages to the user (similar to the message window at the bottom a Visual Studio). I have set the field to be read only, but I have not found a straightforward way to append the existing text lines with new additional text. Currently I use:
int num = my_ctrl->GetWindowTextLength();
my_ctrl->SetSel(num, num);
my_ctrl->ReplaceSel(new_message);
Is there a more convenient way to append the existing text? How can I make the CRichEdit control scroll to the end each time new text is added (like the one in Visual Studio does)?
If I use CEdit instead of CRichEditCtrl, it scrolls to the tzext end automatically when the above code is called - but the CRichEditCtrl remains at the top of the text...
Jens
[email protected]
-
April 13th, 1999, 08:40 AM
#2
Re: use CRichEditCtrl as text output
Try my_ctrl.SetSel(-1, -1) instead of (num, num).
HTH
K.
Ash to ash and clay to clay, if the enemy doesn't get you, your own folk may.
We're talking ****, 'cause life is a 'biz
You know it is
Everybody tryin' to get rich
God ****!
All I wanna do is live !
KoRn, Children of the Korn
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
|