Prompt the user with a dialog for choosing a folder.
int browse_get_path_dialog( HWND hwndOwner, LPSTR lpstrNewPath, LPCSTR lpcszDefPath, LPCSTR lpcszMsg, bool bShowFiles = false )
IDOK = User seleted a folder
IDCANCEL = User canceled
-1 = Error
EX1
void browse_get_path_dialog_ex1() { char szNewPath[MAX_PATH]; string strDefPath = GetAppPath(); int nRet = browse_get_path_dialog(NULL, szNewPath, strDefPath, "Please choose a folder."); switch( nRet ) { case IDOK: printf("path == %s\n", szNewPath); break; case IDCANCEL: printf("user canceled\n"); break; default: printf("error\n"); break; } }
BrowseGetPath
origin.h