CEdit Newlines?
-
I'm hoping that I'm just overlooking an easy solution to this problem. I'm formatting some text in a CString, and need to insert newlines into that text -- I've tried using both '\n' and '\r', and their ASCII numeric equivalents. This text is then displayed in a CEdit control -- problem is, the newlines show up as those bold black boxes (the ones that usually mean "invalid character"), rather than as newlines. The CEdit/CStatic documentation doesn't seem to cover this -- is there an escape sequence I'm missing? The only way I've gotten it working thus far is to make the CString::Format() call span multiple physical lines in my code, which is a pretty hacked solution. I'm sure this one qualifies as a stupid question, but if anyone has a solution, I'd really appreciate it. :) Thanks.
-
I'm hoping that I'm just overlooking an easy solution to this problem. I'm formatting some text in a CString, and need to insert newlines into that text -- I've tried using both '\n' and '\r', and their ASCII numeric equivalents. This text is then displayed in a CEdit control -- problem is, the newlines show up as those bold black boxes (the ones that usually mean "invalid character"), rather than as newlines. The CEdit/CStatic documentation doesn't seem to cover this -- is there an escape sequence I'm missing? The only way I've gotten it working thus far is to make the CString::Format() call span multiple physical lines in my code, which is a pretty hacked solution. I'm sure this one qualifies as a stupid question, but if anyone has a solution, I'd really appreciate it. :) Thanks.
Use "\r\n" to get a new line. --Mike-- http://home.inreach.com/mdunn/ #include "buffy_sig"
-
Use "\r\n" to get a new line. --Mike-- http://home.inreach.com/mdunn/ #include "buffy_sig"
Yep, that was the easy answer I was missing. :) Thanks.