Home > Software engineering >  To another unicode program text box a unicode characters, how also get bad
To another unicode program text box a unicode characters, how also get bad

Time:09-25

Would be szBuffer []={0};//L "0";
Wcscpy (szBuffer, L "I");
Unsigned int is [512]=0;
Is [0]=szBuffer [0].
: : PostMessageW (hWnd_T WM_IME_CHAR, is [0], 0).
Hair number no problem, hair Chinese how can't

CodePudding user response:

STD: : wstring ss (L "Chinese 123");
for(int i=0; i{
: : PostMessage (editWin WM_CHAR, ss [I], 0).
}

CodePudding user response:

Seem to forget to say, my program is not Unicode,
The other is the Unicode
A unicode characters that directly into digital right?
Notepad it seems I can try, but the notepad is ANSI code,
My dialog is Oriental wealth software dialog
Don't accept Chinese dialog? Seems no sense, why input method can play in it?


CodePudding user response:

Use: : PostMessage, sent the message content in utf-8

CodePudding user response:

PostMessage will enter the queue, buf parameter to use new out, the original poster with temporary buf, this will not be released for you
This it is ok to have code in tune

CodePudding user response:

Sorry wrong, but this kind of coding issues have code is also easy to adjust

CodePudding user response:

And problem oh, behind only have digital, Chinese have no reaction, refer to the third floor,
Would be szBuffer []={0};
Wcscpy (szBuffer, L "60 I am a Chinese");

Int len=WideCharToMultiByte (CP_UTF8, 0, szBuffer, 1, NULL, 0, NULL, NULL);
Char * utf8=new char [len + 1];
WideCharToMultiByte (CP_UTF8, 0, szBuffer, 1, utf8, len, NULL, NULL);
Utf8 [len]=0;

for(i=0; i{
PostMessage (hWnd_JPJL_T2 WM_IME_CHAR, utf8 [I], 1);//Ansi
Sleep (50);
}
The delete [] utf8;
Oh, not, help me,

CodePudding user response:

With the input keyboard input line directly?
Sets whether the target window ES_NUMBER attributes, it does not support Chinese?
Window handle can convert into notepad edit box try


CodePudding user response:

PostMessage messages go back and wait for a response, your szBuffer is temporary variables, be released before the news may not send out, use sendmessage or wm_copydata

CodePudding user response:

Input method can,

CodePudding user response:

PostMessage messages go back and wait for a response, your szBuffer is temporary variables, be released before the news may not send out, use sendmessage or wm_copydata


Reply, tried a also not line

CodePudding user response:

Reply and we are bored, not save.

CodePudding user response:

Would be szBuffer []={0};

CodePudding user response:

To now also no problem oh,
Say specific point, I just want to solve, in the east wealth software, keyboard elves in the input box, and enter "the Shanghai composite index,"
Manual input can certainly, English can send characters, Numbers and software, is the Chinese have no reaction,
Refer to a lot of other people's code won't work,
Now is on one side, etc. Have a look at when I was free,
So many months passed, however, is yet to find a way to estimate is become a riddle,
Master can test, download the Oriental wealth very convenient also,
Can guest login,
Do a demo to come out, it would be great,
  • Related