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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Carriage return problems in MFC CEdit Box Control

Status
Not open for further replies.

jasante

IS-IT--Management
Jul 16, 2001
2
GB
Hi, How can I display a CString value in an MFC Edit Box Control with carriage returns ("\r") without having the box show them as a vertical black line?

All the carriage returns in my string work fine when viewed in a static control. How can I safely display CString values in a multiline CEdit Box control without the string concatenating all carriage returns with the string?

Any help will be greatly appreciated. Thanks!
 
You must by write in your multiline Edit Box using this tags: "\r\n"
Example:
if variable associate your CEdit is: m_result ->

temp="Example printing in Edit Box"+"\r\n"+"using two lines";
m_result.SetWindowText(temp);

 
Thanks a lot, the "\r\n" worked!
I guess I never realized that I could've put them together.

Thanks again.
 
"\r\n\" doesnot work in Unicode superted projects. How can I solve this problem ?
 
You will not have problems you you will not use carriage return. Try without it. John Fill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top