Japanese character
-
Dear all, I would like to display japanese character in my editbox, and the no of characters should be 32. that means its not 32 japanese characters. its 32 keyboard strokes. If a user enters 32 keyboard strokes, then the edit box shouldnt display the character which was pressed after 32. Can anyone please help me on this? Thanks in advance.
Regards, Ram
-
Dear all, I would like to display japanese character in my editbox, and the no of characters should be 32. that means its not 32 japanese characters. its 32 keyboard strokes. If a user enters 32 keyboard strokes, then the edit box shouldnt display the character which was pressed after 32. Can anyone please help me on this? Thanks in advance.
Regards, Ram
It's been a long time since I did C++, but surely it should be easy to handle the event and maintain a character count? Of course, make sure to _reduce_ the count if the user hits Backspace/Del. Also, you shouldn't increase the count if a non-char key, like Ctrl or the arrow keys was pressed. Also, pay attention to the paste operation!
Cheers, Vıkram.
After all is said and done, much is said and little is done.
-
It's been a long time since I did C++, but surely it should be easy to handle the event and maintain a character count? Of course, make sure to _reduce_ the count if the user hits Backspace/Del. Also, you shouldn't increase the count if a non-char key, like Ctrl or the arrow keys was pressed. Also, pay attention to the paste operation!
Cheers, Vıkram.
After all is said and done, much is said and little is done.
I was trying to catch the character by the onchangeeditbox() function. But if i press a char in keyboard it doesnt come to that function. after i press enter only it will go to that function. thats why i couldnt able to count the no of chars.
Regards, Ram
-
Dear all, I would like to display japanese character in my editbox, and the no of characters should be 32. that means its not 32 japanese characters. its 32 keyboard strokes. If a user enters 32 keyboard strokes, then the edit box shouldnt display the character which was pressed after 32. Can anyone please help me on this? Thanks in advance.
Regards, Ram
Hi, I donot know whether u have tried this. CEdit::SetLimitText(32)
-
Hi, I donot know whether u have tried this. CEdit::SetLimitText(32)
ya i tried this too. I set a limit to 32. may be let me explain a bit about japanese fonts using English keyboard. the OS will wait until a user presses enter to confirm the char. otherwise all the typed characters will be in buffer. So once i reach 32 charecters, i can still type characters without pressing enter. if i press enter, anything more than 32 chars will be truncated off.
Regards, Ram
-
ya i tried this too. I set a limit to 32. may be let me explain a bit about japanese fonts using English keyboard. the OS will wait until a user presses enter to confirm the char. otherwise all the typed characters will be in buffer. So once i reach 32 charecters, i can still type characters without pressing enter. if i press enter, anything more than 32 chars will be truncated off.
Regards, Ram
Normally, SetLimitText() will not allow more than the specified characters. It doesnot require pressing enter key. Iam not sure about japanese fonts. If SetlimitText doesnot work i thing u need to handle many windows events like WM_KEYDOWN, ...
-
ya i tried this too. I set a limit to 32. may be let me explain a bit about japanese fonts using English keyboard. the OS will wait until a user presses enter to confirm the char. otherwise all the typed characters will be in buffer. So once i reach 32 charecters, i can still type characters without pressing enter. if i press enter, anything more than 32 chars will be truncated off.
Regards, Ram
As you earlier said that the control comes to onchangeeditbox() only when you press ENTER key, then let the control come to this function. Afterwards you can take the data of Edit box in some array and do the necessary manipulation in array i.e make the data 32 character long....and then display the data in this modified array in Edit box.