void SetFolder(void)
{
BROWSEINFO bi;
char dispname[MAX_PATH];
char szFolder[MAX_PATH];
ITEMIDLIST *pidl;
bi.hwndOwner = 0;
bi.pidlRoot = 0;
bi.pszDisplayName = dispname;
bi.lpszTitle = "Folder for still captures";
bi.ulFlags = BIF_RETURNONLYFSDIRS/* | BIF_EDITBOX*/;
bi.lpfn = 0;
bi.lParam = 0;
bi.iImage = 0;
pidl = SHBrowseForFolder(&bi);
if (pidl)
{
SHGetPathFromIDList(pidl, szFolder);
strcat(szFolder, "\\");
}
}
需要添加 shell32.lib