I’m am dealing with the exact same situation as This Question.
There were no answers and the question was too old, so I could not leave any comments seeing if the OP found a solution.
I am just now learning the basics of p/invoke, and hardly understand it at the least.
I have been doing quite a bit of searching. I found This question which linked me to This question/answer but am still not able to understand what I need to do.
I guess i’m asking for a way to manipulate the WM_IME commands, or atleast disable the WM_IME_ENDCOMPOSITION on mouse clicks.
Thank you in advance
No expert in IME, but couldn’t you just override the ‘WndProc’ but not pass the “message” as it were preventing other applications / controls from processing it? WndProc captures the hundreds of ‘Windows Messages’ that are generated by the operating system that can be captured to ‘whoever’ is listening, one approach would be to selectively ignore that message when the conditions are right…
For instance, if you’re dealing with a Control, you could override the WndProc for the control, capture the mouse down event (or WM_MOUSEDOWN), set a variable to ignore the WM_IME_ENDCOMPOSITION and then reenable that variable on the mouse up (or WM_MOUSEUP)? Alternatively you could utilise a MouseHook but this might be a bit of overkill…