SHBrowseForFolder
WINSHELLAPI LPITEMIDLIST WINAPI SHBrowseForFolder(
LPBROWSEINFO lpbi
); Displays a dialog box that enables the user to select a shell folder. Returns the address of an item identifier list that specifies the location of the selected folder relative to the root of the namespace. If the user chooses the Cancel button in the dialog box, the return value is NULL.
lpbi
Address of a BROWSEINFO structure that contains information used to display the dialog box.
The calling application is responsible for freeing the returned item identifier list by using the shell's task allocator.
WINSHELLAPI LPITEMIDLIST WINAPI SHBrowseForFolder(
LPBROWSEINFO lpbi
); Displays a dialog box that enables the user to select a shell folder. Returns the address of an item identifier list that specifies the location of the selected folder relative to the root of the namespace. If the user chooses the Cancel button in the dialog box, the return value is NULL.
lpbi
Address of a BROWSEINFO structure that contains information used to display the dialog box.
The calling application is responsible for freeing the returned item identifier list by using the shell's task allocator.
解决方案 »
- 一个DLL调用问题,能否把C代码写的程序改成VB的~~!
- 请问用VB如何设置双网卡(内、外网)IP、网关,DNS?
- vb6.0与Access 2003 用DATA控件绑定的问题 在线等~~~~~~~~~~~
- 请问高手: 不同显示模式下,颜色如何换算? 急!!!!!!!
- datagrid的问题?
- 如何在图片框中显示网上的图片
- 焦点问题,请指教。谢谢
- 请问VB的表格打印
- 如何得到image图象某一点的颜色值?
- EXCEL直导入提起超时已到期,数据少就可以了, 数据一多就不行了, 怎么改比较好呀
- 用ADO访问ACCESS2000的数据库,打包后在另一台机装,发现如果无装OFFICE2000或者装了OFFICE97就会出错
- 哪里有vb5下载
typedef struct _browseinfo {
HWND hwndOwner;
LPCITEMIDLIST pidlRoot;
LPSTR pszDisplayName;
LPCSTR lpszTitle;
UINT ulFlags;
BFFCALLBACK lpfn;
LPARAM lParam;
int iImage;
} BROWSEINFO, *PBROWSEINFO, *LPBROWSEINFO; Contains parameters for the SHBrowseForFolder function and receives information about the folder selected by the user. hwndOwner
Handle to the owner window for the dialog box.
pidlRoot
Address of an ITEMIDLIST structure specifying the location of the root folder from which to browse. Only the specified folder and its subfolders appear in the dialog box. This member can be NULL; in that case, the namespace root (the desktop folder) is used.
pszDisplayName
Address of a buffer to receive the display name of the folder selected by the user. The size of this buffer is assumed to be MAX_PATH bytes.
lpszTitle
Address of a null-terminated string that is displayed above the tree view control in the dialog box. This string can be used to specify instructions to the user.
ulFlags
Flags specifying the options for the dialog box. This member can include zero or a combination of the following values: BIF_BROWSEFORCOMPUTER Only return computers. If the user selects anything other than a computer, the OK button is grayed.
BIF_BROWSEFORPRINTER Only return printers. If the user selects anything other than a printer, the OK button is grayed.
BIF_BROWSEINCLUDEFILES The browse dialog will display files as well as folders.
BIF_DONTGOBELOWDOMAIN Do not include network folders below the domain level in the tree view control.
BIF_EDITBOX Version 4.71. The browse dialog includes an edit control in which the user can type the name of an item.
BIF_RETURNFSANCESTORS Only return file system ancestors. If the user selects anything other than a file system ancestor, the OK button is grayed.
BIF_RETURNONLYFSDIRS Only return file system directories. If the user selects folders that are not part of the file system, the OK button is grayed.
BIF_STATUSTEXT Include a status area in the dialog box. The callback function can set the status text by sending messages to the dialog box.
BIF_VALIDATE Version 4.71. If the user types an invalid name into the edit box, the browse dialog will call the application's BrowseCallbackProc with the BFFM_VALIDATEFAILED message. This flag is ignored if BIF_EDITBOX is not specified. lpfn
Address of an application-defined function that the dialog box calls when an event occurs. For more information, see the BrowseCallbackProc function. This member can be NULL.
lParam
Application-defined value that the dialog box passes to the callback function, if one is specified.
iImage
Variable to receive the image associated with the selected folder. The image is specified as an index to the system image list.
WINSHELLAPI BOOL WINAPI SHGetPathFromIDList(
LPCITEMIDLIST pidl,
LPSTR pszPath
);Converts an item identifier list to a file system path. Returns TRUE if successful, or FALSE otherwise.
pidl
Address of an item identifier list that specifies a file or directory location relative to the root of the namespace (the desktop).
pszPath
Address of a buffer to receive the file system path. This buffer must be at least MAX_PATH characters in size.
If the location specified by the pidl parameter is not part of the file system, this function will fail.