I want to send this characters using SendMessage and/or PostMessage but
I am not able to send them.
I am currently using these in the following way:
SendMessage(sharedData[0], WM_CHAR, $2734, 0);
Any idea what's wrong with this?
TIA
Yogi Yang
That message says the scan code for the character is zero; is that correct?
Are you sure you're sending the message to the right window?
Wm_Char is normally generated by the receiving application in response
to wm_KeyDown messages when the recipient calls Translate message. Have
you tried sending the keystrokes to the window instead of the characters?
--
Rob
>
> Are you sure you're sending the message to the right window?
>
Yes I am sending to the right window as the hooking mechanism that I
have implemented tracks change in focus and automatically updates
shareData[0] with the handle of the active control.
> Wm_Char is normally generated by the receiving application in response
> to wm_KeyDown messages when the recipient calls Translate message. Have
> you tried sending the keystrokes to the window instead of the characters?
>
Actually I am first sending the message
SendMessage(sharedData[0], WM_KEYDOWN, 1FFF0001, 0);
If I don't use this then some of the applications do not respond to
WM_CHAR send message. Don't know why
Then I am sending
SendMessage(sharedData[0], WM_CHAR, $2734, 0);
The above combination sends ANSI characters without any problem but not
UNICODE characters.
What to do?
Regards,
Yogi Yang
I would guess that you have to use SendMessageW instead of SendMessageA or
it will not be interpreted as Unicode.
Excuse my curiosity, but why do you need to send keypress codes to an
application that allows as much COM automation as MS Office does?
HTH,
Patrick
Actually I have a software (a keyboard mapper to allow users to type in
non English languages, esp. in Indic Languages on English keyboard
without activating or installing any Windows based language drivers,
keyboards, etc.) which is written in VB 6 and it sends Uncode
Keystrokes. I have managed to sell 8000+ copies of it in 10 years.
Now that I am switching from VB 6 to Delphi in a grand way, I also want
to convert this flagship software of mine into Delphi but unfortunately
there is nothing like SendKeys(w) of VB in Delphi's Pascal and because
of this I will have to use SendMessage API to do this. But I am not able
to send Unicode characters even if I use SendMessageW.
Regards,
Yogi Yang