1

I want to implement the autocomplete capability for the MFC's CEdit control but I couldn't find anything on the web. I looked at the SHAutoComplete, but it seem like it's only useful for URL and file/folder path.

I was thinking of manually implement the function by programmatically display a popup menu at the blinking i-bar, but I encountered 2 problems:

  1. I don't know how to get the xy coordinate of the blinking i-bar
  2. I can't type anything after the popup menu is displayed

Can someone point me to an existing implementation that I can use?

vg8open
  • 57
  • 6
  • 1
    Don't roll your own. Everything you need is already implemented for you. `SHAutoComplete` is just a very basic interface. You'll have to implement an `IAutoComplete` interface yourself to adjust the functionality to your needs (see [using autocomplete](https://msdn.microsoft.com/en-us/library/windows/desktop/bb776884.aspx) for details). Next time I find a machine with a real keyboard and real internet I'll see if I can put together a sample implementation. – IInspectable Aug 09 '16 at 16:38
  • Oh, I guess I didn't dig deep enough. Thanks for the pointer. – vg8open Aug 10 '16 at 17:15

0 Answers0