?
Solved

UNICODE

Posted on 2005-05-01
4
Medium Priority
?
645 Views
Last Modified: 2013-12-03
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 ?



0
Comment
Question by:hahahahahaha
2 Comments
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 1000 total points
ID: 13905751
0
 
LVL 86

Assisted Solution

by:jkr
jkr earned 1000 total points
ID: 13906573
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

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
If you have ever found yourself doing a repetitive action with the mouse and keyboard, and if you have even a little programming experience, there is a good chance that you can use a text editor to whip together a sort of macro to automate the proce…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question