01-09-2014, 07:01 PM
Yes - it's a problem with WM_CHAR and apparently this doesn't work for CRLF because it's two characters, not one.
I had some trouble with EM_REPLACESEL - I'll try it again.
I did find something that worked but I'm a bit uneasy about it. When it's iterating over the character array and using WM_CHAR to send the characters to the other app it now tests for characters 13 and 10. For 10 - it is a no-op. For 13 - it issues this command:
SendMessage hwndre WM_KEYDOWN VK_RETURN 0
This seems to be very reliable. I'm not sure I like it though.
I had some trouble with EM_REPLACESEL - I'll try it again.
I did find something that worked but I'm a bit uneasy about it. When it's iterating over the character array and using WM_CHAR to send the characters to the other app it now tests for characters 13 and 10. For 10 - it is a no-op. For 13 - it issues this command:
SendMessage hwndre WM_KEYDOWN VK_RETURN 0
This seems to be very reliable. I'm not sure I like it though.
