IFileSaveDialog / Filename using C++
-
Where can I update the edit field to reflect changes of the file name to save? I have customized my save file dialog and use CFileDlgEventHandler. There i need to set a different filename. In the file save dialog I select a filename from existing files, e.g. blah.tif. After clicking a custom checkbox I need to set e.g. blah_C1.tif. I can get and set the filename inside the handler: CComQIPtr pDlg = pfdc; pDlg->GetFileName(...) and pDlg->SetFileName(...) work, but after clicking 'Save' I get the filename previously selected (blah.tif) and not the changed one. Anyone out there with a tip to update the edit control behind the scenes?
-
Where can I update the edit field to reflect changes of the file name to save? I have customized my save file dialog and use CFileDlgEventHandler. There i need to set a different filename. In the file save dialog I select a filename from existing files, e.g. blah.tif. After clicking a custom checkbox I need to set e.g. blah_C1.tif. I can get and set the filename inside the handler: CComQIPtr pDlg = pfdc; pDlg->GetFileName(...) and pDlg->SetFileName(...) work, but after clicking 'Save' I get the filename previously selected (blah.tif) and not the changed one. Anyone out there with a tip to update the edit control behind the scenes?
-
A bit of a guess, but have you tried IFileDialogCustomize::SetEditBoxText method[^]?
Thanks. Tried it, but without positive result. The problem is, that the filename is saved anywhere else behind the scenes (comdlg32.dll?). Changing the edit box does not help. I'm stuck...