开发者

Getting working directory on OpenFileDialog

开发者 https://www.devze.com 2023-01-08 16:58 出处:网络
When you select a number of files on OpenFileDialog you get the working directory path in a structure member ofOPENFILENAME but when you select a single file you get the path to filename in that varia

When you select a number of files on OpenFileDialog you get the working directory path in a structure member of OPENFILENAME but when you select a single file you get the path to filename in that variable member.开发者_如何转开发

Would there be a possible way to get the path first before looping and counting to check the number of files?


Not quite sure what you mean, OpenFileDialog is a .NET class. Assuming native: you can set the OPENFILENAME.lpfnHook member to a callback function. That gives you notifications like CDN_FILEOK and CDN_FOLDERCHANGE. Gives you a preview of what was selected before the dialog closes and a way to cancel it.

0

精彩评论

暂无评论...
验证码 换一张
取 消