使用SHBrowseForFolder 函数 函数作用:使用对话框来进行文件路径选择
函数声明 PIDLIST_ABSOLUTE SHBrowseForFolder(LPBROWSEINFO lpbi); 参数 lpbi lpbi [in] A pointer to a BROWSEINFO structure
[在]一个指针为BROWSEINFO 结构
Conveys information used to display the dialog box
传达信息,用来显示该对话框
返回值 Returns a pointer to an item identifier list (PIDL) that specifies the location of the selected folder relative to the root of the namespace
返回的是一个指针,一个项目标识符列表( PIDL ),指定的位置选定的文件夹相对的根命名空间
If the user chooses the Cancel button in the dialog box, the return value is NULL
如果用户选择取消按钮的对话框中,返回值为 NULL
It is possible that the PIDL returned is that of a folder shortcut rather than a folder
可能是 PIDL 话,返回是一个文件夹的快捷方式,而不是一个文件夹
BROWSEINFO 的结构如下: typedef struct _browseinfo { HWND hwndOwner; // 父窗口句柄 LPCITEMIDLIST pidlRoot; // 要显示的文件夾的根(Root) LPTSTR p