Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Editable text area vs Static text area

Status
Not open for further replies.

saidolsol

Programmer
May 31, 2001
10
ES
lo,
now i can use CString for buffering (thanks John).
That let me realize that the problem is in the text area.
If i use static text everything works well, but if i use editable text area the new line character is replaced by a vertical black bar symbol, and the text is not displayed well.
The easy answer is to use static text, but it don't know how to insert a vertical scroll bar that let me see the whole text.
So two questions...
¿how can i insert a vertical scroll bar in a static text area? if it's possible.
¿how can i display text correctly, with new line characters, using an editable text area?

thanx.
gracias.
gràcies.
a10.
 
use an edit control with styme CS_MULTILINE|CS_AUTOSCROLL. All the problem will disappear. John Fill
1c.bmp


ivfmd@mail.md
 
hi,
the static text hasn't multiline nor scrolling properties, that's what class wizard say. It's only allowed with editable text and i have already done this. I can scroll the edit control but there are no new line characters.
That's the reason i want to use the static text, because it displays my text perfectly. But i can't use a scroll bar to see the entire text.

thanx.
gracias.
gràcies.
a10.
 
If you want a newline in an edit control, you have to use \r\n rather than just \n. I ran into a similar problem, and found this solution.
 
\r\n? No kiddin'. Jeez, I've been lookin' for that answer now for some time. Thanks StukA. I'm going to go try it right now.

;-)
Nyjil
 
FYI: the \r\n sequence used in windows text is also known as "crlf" which I believe stands for:
"carriage return - line feed"

For linebreaks
unix uses just \n
mac uses (I believe) \r
and windows uses \r\n

--Will Duty
wduty@radicalfringe.com

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top