Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying Text

Is there a way to add text to an edit box? I want to display the status of my program in an edit box, but I've noticed that whenever a new string is displayed, it overwrites the previously displayed string. Is there a way to add a new string to the currently displayed string within the edit box? Also, if it is possible, how can I add a scroll bar to the edit box? Is there a limit on how much data you can display within an edit box?

Thanks in advance.
0 Kudos
Message 1 of 2
(2,887 Views)
Is there a way to add text to an edit box?

Yes - you can get the current text from the text box, append your new text, and then set this text to the edit control.

Also, if it is possible, how can I add a scroll bar to the edit box?

Yes - check out the Styles tab of the property pages and there are options for Multiline, Horizontal scroll, Auto HScroll, Vertical scroll, and Auto VScroll. You may also want the Want return option, depending on the interaction you want in your application.

Is there a limit on how much data you can display within an edit box?

Yes - you can find out the limit via the CEdit::GetLimitText method. You can change this limit via the CEdit::SetLimitText method.

- Elton
0 Kudos
Message 2 of 2
(2,887 Views)