displaying formatted text in editbox in vc++

Hello Sir,

i want to display some formatted text in editbox control.

example:----

********************************** //(LINE1)

MUNISH GUPTA) //(LINE2)

********************************** //(LINE 3)

i have some problems in inserting a new line (line carriage) character. i have tried it with "\n" but it is not working properly. it just displays a solid vertical line just like cursor.

Pls help in doing the same.

Thanks and Regards

Munish Gupta



Answer this question

displaying formatted text in editbox in vc++

  • Lars E.Nes

    For Windows controls, the \n doesn't automatically get converted to the proper sequence like the CRT. So you need to do it yourself. To do a new line in a Windows control, first you must be sure that the style is set as multi line, second, you must do \r\n in the string where you want the new line to be. This is the windows format for new lines.

  • displaying formatted text in editbox in vc++