[英]How to select a file from windows file explorer
Is there a way to use ShellExecute and grab the file (or rather the file path) and save it in a variable upon selecting it?有没有办法使用 ShellExecute 并获取文件(或者更确切地说是文件路径)并在选择它时将其保存在变量中?
Should I use a different function all together?我应该一起使用不同的功能吗?
I've looked at some of the other similar functions for opening the windows file explorer and all of them need a path first, before opening the window.我已经查看了一些其他类似的用于打开 windows 文件资源管理器的函数,在打开窗口之前,所有这些函数都需要一个路径。
ShellExecute(NULL, L"explore", NULL, NULL, NULL, SW_SHOWNORMAL);
My goal is to open the file explorer (like ShellExecute does) and select one file, plug the path of that file into a variable and do a thing with it later.我的目标是打开文件资源管理器(就像 ShellExecute 那样)并选择一个文件,将该文件的路径插入一个变量中,然后再用它做一些事情。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.