//Get only folder name
ITEMIDLIST *pidlBrowse;
WCHAR pszPathname[MAX_PATH];
BROWSEINFO BrInfo;
BrInfo.hwndOwner = GetSafeHwnd();
BrInfo.pidlRoot = NULL;
CString str =_T("c:\\"); //initial path
LPCTSTR lpszDefaultFolder = str;
memset(&BrInfo, 0, sizeof(BrInfo));
BrInfo.pszDisplayName=(LPSTR)pszPathname;
BrInfo.lpszTitle=_T("Select directory");
BrInfo.ulFlags=BIF_RETURNONLYFSDIRS; //select folder only
//BrInfo.ulFlags=BIF_BROWSEINCLUDEFILES; //select folder and file
BrInfo.lParam=(LPARAM)lpszDefaultFolder;
//BrInfo.lpfn=BrowseCallback;
pidlBrowse = ::SHBrowseForFolder(&BrInfo);
if (pidlBrowse != NULL)
{
//Get Path
SHGetPathFromIDList(pidlBrowse, (LPSTR)pszPathname);
AfxMessageBox((LPCSTR)pszPathname);
}
...3/13/2014
C, C++, To select folder only and get path using SHBrowseForFolder function, example source code
Subscribe to:
Post Comments (Atom)
-
Background subtractor example souce code. OpenCV support about 3 types subtraction algorithm. Those are MOG, MOG2, GMG algorithms. Det...
-
ModaNet (2018) was groundbreaking but there have been several more recent datasets and models for fashion segmentation and analysis. Here a...
-
ð FREE License Plate Recognition API - No Credit Card Required! Want to try ANPR (Automatic Number Plate Recognition) / ALPR (Automatic L...
-
AMD GPU Programming Primer Threads · Waves · Memory · Tile Distribution · Vector Loads · MFMA ...
-
After training SVM, we should test the trained XML data is reliable or not.. The method to extract HOG feature is refer to -> http://fe...
-
Image size of origin is 320*240. Processing time is 30.96 second took. The result of stitching The resul...
-
Python · Type hints def sensor_id(sensor: Sensor | int | None) -> int has three bars in one signature and looks like bit arit...
-
Just see the below example code ð pip install PyMuPDF document : https://pymupdf.readthedocs.io/en/latest/ I think this is better lib...
-
The MNIST dataset is a dataset of handwritten digits, comprising 60 000 training examples and 10 000 test examples. The dataset can be downl...
-
Dear Peter Here is your answer. I hope this posting & source code help to you. And This page also is good explain to use background ...

No comments:
Post a Comment