Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Problem with multi-line edit box

michael_green
Beginner
413 Views
Hi,
I'm using a multi-line edit box in a dialog. I've checked the "want return" box. The edit box behaves exactly as I want it to when I enter text from the keyboard, that is, it wraps automatically at the end of a full line, or starts a new line when I press Enter.
However, I also need to load text into the edit box from a file, The text in the file has a well defined format as far as line lengths go and I'd like to preserve that when the text is loaded to the edit box. I have tried to do this by defining a string, reading each line from the file and concatenating the lines within the string but separated by carriage return characters. I have tried line feeds as well. I am then using SetDlgItemText to load the string to the edit box.
But it doesn't work. The edit box always displays the string using its full width before starting a new line, and ignoring all the intended new lines. Is there a way around this?
With many thanks in advance,
Mike
0 Kudos
0 Replies
Reply