using SHAutoComplete with CEdit control

617 Views Asked by At

I am developing an MFC application, can i use SHAutoComplete with a CEdit control? Also is there any ready made auto complete controls are available? or i need to use write all the code for creating the list box below the edit control as user types in edit control?

2

There are 2 best solutions below

0
On

Just pass CEdit's m_hwnd member to SHAutoComplete. I don't think that extension warrant another class. The listbox is created by the AutoComplete object created by SHAutoComplete.

0
On

SHAutoComplete helps to autocomplete paths (system or URL). If this is a combo box and you want to use autocomplete for suggesting string contained in the combo, you have to write a code to handle it.

There are samples you can find. One I found (working): http://www.ucancode.net/Visual_C_MFC_COM_faq/Visual-C-Auto-completion-ComboBox-CComboBox.htm