I am using PostMessage to send input to a flash object in another application. It works fine until I try to send a unicode character. In this example:
Michael’s Book
The apostrophe is not really that, it is not an ASCII 39, but rather a unicode U+2019. By the time it is sent across 1 character at a time, it is lost as a unicode value and lands as the raw characters making up the unicode
Michael’s Book
If I copy and paste into that window it moves fine, and if I load a text file into that window it loads fine. So the receiving window is able to receive unicode, but the way I am sending it must not be correct. Any help would be greatly appreciated.
private void SendKeysToForm(string Message)
{
for (int i = 0; i < Message.Length; i++)
{
PostMessage(hwnd, WM_CHAR, (IntPtr)Message[i], IntPtr.Zero);
}
}