April 13th, 1999, 08:17 AM
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
lenge@hft.e-technik.uni-dortmund.de
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
lenge@hft.e-technik.uni-dortmund.de