AngryChicken
AngryChicken

Reputation: 360

How to append an extension to GetFileName?

I'm trying to save a file using IFileSaveDialog. However, when the dialog box appears and I enter the desired file name, choose the extension from the drop down and click save it returns me the path to the file without the extension. So my question is how to make the IFileSaveDialog automatically add an extension to the end of the file name? without having to force the user to manually enter the extension as well.

Upvotes: 2

Views: 399

Answers (1)

3wic
3wic

Reputation: 500

Just call SetDefaultExtension() before showing your dialog box.

Upvotes: 3

Related Questions