enter accented characters into a Combo Box from 0x0401 keyboard?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to build a combo box that supports the standard MS Office keyboard shortcuts for accented Latin characters, when entered from a US English keyboard.

Example:ctrl-',e results in é.

I subclass ComboBox and override ProcessCmdKey to detect and translate the keystrokes. The problem is how to send the translated character to the combo box for display? I've tried 2 methods:

a) SendKeys.Send
This works with most characters, but fails with ç (I get a beep and no character is echoed).

b) Win32 API SendMessage(handle, WM_CHAR, unicode, 1)
This works with most characters, but fails with Å“ ('S' is echoed).

Am I going about this the wrong way? Is there a method that works with all chars?

Thanks...

Dave
 
Never mind, I solved it. This seems to work for all cases:

Message m = Message.Create(Handle, WM_CHAR, unicode, 1);
WndProc(m);

Dave
 
Back
Top