[win32] IFileOpenDialog, IFileSaveDialog

Started by
2 comments, last by adeyblue 13 years, 7 months ago
How do I go about setting the directory these dialogs should initially open to? I believe I'm supposed to use the IFileDialog::SetDefaultFolder Method, but not sure how to create an IShellItem from a path, which is what IFileDialog::SetDefaultFolder requires.

And Ive also noticed that they seem to open extremly slow for me, on some computers, such as it taking around 7 seconds on my home computer and almost instantly on the UNI computers. Any ideas what this could be? I was thinking maybe it was looking for networks or something. Can you disable this?
Advertisement
Is there any reason you're using the interfaces rather than GetOpenFileName() and GetSaveFileName()?
Well, according to MSDN, GetOpenFileName() and GetSaveFileName() were superceded by IFileOpenDialog and IFileSaveDialog()

That doesn't mean you have to use them though, just that MS would like you to because they provide more functionality. If you want to support XP, then you've no choice in not using them for example.

Anyway, to transform a path to a IShellItem you can use GetUIObjectOfFile(hwnd, path, IID_PPV_ARGS(&pShellItem));

This topic is closed to new replies.

Advertisement