Click here to Skip to main content
15,887,340 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I wrote:

m_prova.SetWindowText(_T("ciao   \n   ciao"));


but I want go head and I used "\n" but it doesn't work

What I have tried:

I tried also \r\n but it doesn't work also
Posted
Updated 4-Feb-20 21:51pm
Comments
Richard MacCutchan 5-Feb-20 5:16am    
If you mean to add this text to the title bar of a Window then you cannot do it that way. The only way would be to do custom drawing of all the non-client area of the Window. However, it is still not clear exactly what you are trying to do.

1 solution

Although I do not understand completely what you mean, I assume the following:
You want to show multi line text in an MFC TextBox?
In this case you must set the multi line property as described in this article Using the CEdit control[^]
The default behaviour is single line.
 
Share this answer
 
Comments
Member 14594285 5-Feb-20 3:55am    
yes, I want to use multiline, and if I want use it only for the string? how must I do?
TheRealSteveJudge 5-Feb-20 4:05am    
Did you read the article "https://www.codeproject.com/Articles/831/Using-the-CEdit-control"?
Member 14594285 5-Feb-20 4:06am    
yes, in fact now it works for CEdit...but if I want only the string that go head?
TheRealSteveJudge 5-Feb-20 4:20am    
Apologize. I do not understand.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900