About CEdit::LineLength
-
Hello everyone: I program code in Japanese OS. And I found that CEdit::LineLength() can not return total bytes of one line. The function returns total character number of one line. Example: 1. "1234日本90" --->>> LineLength -> 8 2. "1234567890" --->>> LineLength -> 10 About Example 1, it should return 10 but the result is 8. Is it right? or I need to set up something? Thanks. -Freehawk
-
Hello everyone: I program code in Japanese OS. And I found that CEdit::LineLength() can not return total bytes of one line. The function returns total character number of one line. Example: 1. "1234日本90" --->>> LineLength -> 8 2. "1234567890" --->>> LineLength -> 10 About Example 1, it should return 10 but the result is 8. Is it right? or I need to set up something? Thanks. -Freehawk
I do not know an exact answer to your problem, but I'm fairly certain it is Unicode related. With Unicode, each character consumes two bytes, which is why example 1 is two bytes short of what you expect. You might try defining both
UNICODE
and_UNICODE
in your project'sstdafx.h
file.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow