Guest Achim Hammes Posted October 3, 2007 Posted October 3, 2007 I'm using GetSaveFileName with filters for graphic file formats. Wenn teh user enters the first charachters of the filename in file name edit control a lookup autocomplete list appeares. In this List every file is shown thet starts with this charachters. That would be ok so far. But unfortunatly files with unwanted extensions (not in filter) appears also. so if a bad user selects on of them we overwrite wrong filetypes How can we turn off the autocolete or is there another workarround regards achim
Guest Ramesh, MS-MVP Posted October 3, 2007 Posted October 3, 2007 Re: Problem with GetSaveFilename and auto completion Don't know if you can control the autocomplete listings. But you should be able to validate the file name typed by the user. "If the user specifies a file name and clicks the OK button and the function is successful, the return value is nonzero. The buffer pointed to by the lpstrFile member of the OPENFILENAME structure contains the full path and file name specified by the user." http://msdn2.microsoft.com/en-us/library/ms646928.aspx You can check the file extension from the full path programatically and permit the "Save" operation if the extension is valid. -- Regards, Ramesh Srinivasan, Microsoft MVP [Windows Shell/User] Windows® Troubleshooting http://www.winhelponline.com "Achim Hammes" <news.achim.hammes@3d-raumplan.com> wrote in message news:%23Ke8TbZBIHA.4752@TK2MSFTNGP04.phx.gbl... I'm using GetSaveFileName with filters for graphic file formats. Wenn teh user enters the first charachters of the filename in file name edit control a lookup autocomplete list appeares. In this List every file is shown thet starts with this charachters. That would be ok so far. But unfortunatly files with unwanted extensions (not in filter) appears also. so if a bad user selects on of them we overwrite wrong filetypes How can we turn off the autocolete or is there another workarround regards achim
Recommended Posts