Enable auto completion to your text box, just like Start->Run
You will get a dropdown list box with all the files and folders in C: drive.
Have you ever thought about incorporating this kind of a behavior into your application…
There is an API which does this… ( Microsoft was generous enough to create one and share it ). 🙂
The API is SHAutoComplete.
All you should have is an edit box. Get the handle to the edit box and pass it to this function. You will get a drop down list box for the path that you are typing in the edit box.
Cool isn’t it. 🙂
CoInitialize( 0 ); SHAutoComplete( GetSafeHwnd(), SHACF_DEFAULT ); CoUninitialize();
That’s it now you have autocompletion enabled for your text box/combo box.
NOTE: Don’t forget to call CoInitialize before using this function and of course CoUninitialize. Do look up this API in MSDN. You will find interesting options.