Reputation: 981
Is there any standard way in C++ to limit a user to only select certain drives in an OpenFileDialog?
I've got a function that checks drives if they're flash drives, and only those are supposed to be selectable by the user. The Dialog does have a filter, but all I've seen it used with are file endings, and I'm not sure how I'd go about to limiting drives. Is there any possible way or will I have to restrict this myself in the program?
Upvotes: 0
Views: 81
Reputation: 180235
You can reject attempts to change to certain drives via IFileDialogEvents::OnFolderChanging
, but that's about it. See IFileDialog
Upvotes: 1