Click here to Skip to main content
15,888,600 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,
In my MFC dialog based application I want to align the text vertically in edit control. My Edit control is not using WS_BORDER style.

What I have tried:

Through this link c++ - How can we vertically align text in edit box? - Stack Overflow[^] I am able to solve the problem.
That link is handling ON_WM_NCCALCSIZE() and ON_WM_NCPAINT() messages.I would like to know can I meet my requirement by overriding only onPaint() without overriding ON_WM_NCCALCSIZE() and ON_WM_NCPAINT() messages?
Posted
Updated 7-Sep-18 19:37pm
Comments
Richard MacCutchan 7-Sep-18 4:48am    
You should ask the person who posted the SO answer.

1 solution

Use a multi-line text box and add you own line breaks as needed.

Remove the line breaks when saving (use markers).

Input should always be "cleaned" / trimmed in any event.
 
Share this answer
 

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