UNICODE

Hi,
I have the program named "A" supporting typing in Unicode . For example , I open that program . Then in a editor , when I type a2 , it will become à . More example :
a1  ---> á
a2  ---> à
o6  ---> ô
...

I have another program written by myself . In this program , I have the string temp = a2 , then I use this function
for (count=0; count<temp.GetLength(); count++)
::PostMessage(hFocus, WM_KEYDOWN, VkKeyScan(temp.GetAt(count)), 0);

I want to write string "à" , not "a2" . The "A" program is already opened . How can I do ?



hahahahahahaAsked:
Who is Participating?
 
jkrConnect With a Mentor Commented:
Try

for (count=0; count<temp.GetLength(); count++)
::PostMessageW(hFocus, WM_KEYDOWN, VkKeyScanW(temp.GetAt(count)), 0);

to enforce using the UNICODE version of teh Win32 APIs. However, you'll have to ensure that 'temp' holds UNICODE data. E.g. ike in

wchar_t wc = 0xa1;

::PostMessageW(hFocus, WM_KEYDOWN, VkKeyScanW(wc), 0);
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.