How to call the browse path dialog

zhaozj2021-02-08  246

How to call the browse path dialog

Win32API's ShellExtension shell extension provides this way. Below is a program written in C language, which can display the dialog shown in the figure above. voidSelectDirDlg (charDir []) {BROWSEINFObi; ITEMIDLIST * pidl; bi.hwndOwner = NULL; bi.pidlRoot = NULL; bi.pszDisplayName = Dir; bi.lpszTitle = "Selectadirectory"; bi.ulFlags = BIF_RETURNONLYFSDIRS; bi.lpfn = NULL ; bi.lParam = 0; bi.iImage = 0; pidl = SHBrowseForFolder (& bi);. / * Display "SelectFolder" dia logbox, getthe foldernameandconvertit intoaITEMLIST datastructure * / if (pidl == NULL) Dir [0] = 0; IF (! SHGETPATHFROMIDLIST (PIDL, DIR)) / * RetrieveFoldernam EFROTEMLIST STRUCTURE. * / DIR [0] = 0;}

转载请注明原文地址:https://www.9cbs.com/read-1704.html

New Post(0)