win32 help! (or COM?)

  • Thread starter Thread starter Lloyd Dupont
  • Start date Start date
Sometime ago I wrote something like that, but for a RichTextBox control so I
don't know for sure if you can use the same approach.

Anyway, what I did was to add event handlers for KeyPressEventHandler,
KeyEventHandler, and EventHandler.

In the KeyPress event you want to check if what the user typed so far is a
candidate for auto completion. If so you will display a list box with the
proposed words. If the list box is on screen you also want to handle the Esc
key to hide it, and the Tab/Enter keys to confirm the selection and insert
the selected word.

In the KeyDown event, when the list box is on screen you want to handle the
up and down keys and change the selected item accordingly.

In the DoubleClick event you just insert the selected word and hide the list
box.

HTH,

Gabriele
 
Back
Top