autocomplete search

I have been trying to find a solution for win32 openfilename autocomplete function in my app. When I type the first letter of a file-name in the openfiledialog in other existing apps, a box opens with a list of any files having this character as it's first char. I have been using "autocomplete" in my various searches. Is this the correct term? I have tried numerous filters and flags in the ofn structure without success . Can someone point me in the right direction?
You should use IFileDialog interface and drop support for GetOpenFileName if you want something like that. It is available beginning with Windows Vista (it will not work in windows xp).

It could be possible to achieve this in windows xp by setting up lpfnHook member of the OPENFILENAME structure:
Last edited on

Please excuse my communication skills. Somehow the free OneCNC NClink program has the autocomplete function. The software works on all of the Windows XP personel computers at work. A dropdown box is shown in the openfiledialog box that displays all matching files with the letters input.

Thank you for responding.
Then try to use lpfnHook member of OPENFILENAME structure, as I said (never played with it though).

You must define a callback function in your application and it will be called every time by windows, exactly like a normal "windows procedure". Pass the function name as lpfnHook member of the structure before calling GetOpenFileName.
Topic archived. No new replies allowed.