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

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
 
G

Guest

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

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

Dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top