I'm having a problem with aaApi_BrowseDirectory. I cannot get it to obey the AABRINFO_NO_NETWORK mask. I would like the Browse Directory dialog to not allow the selection of network resources, but it still shows My Network Places, as well as mapped drives under My Computer.
Am I misunderstanding the AABRINFO_NO_NETWORK mask, or are there other masks that must also be set? Nothing is jumping out in the documentation.
Here is a simple sample that doesn't work as expected (I purposely left out any subsequent processing for the sake of brevity).
extern "C" int WINAPI GenCmd_Test ( void ) { AFX_MANAGE_STATE(AfxGetStaticModuleState());
HWND hWndParent = aaApi_GetActiveDocumentList(); WCHAR lptstrPath[MAX_PATH] = L"C:\\";
AABROWSEINFO aaBrowseInfo; aaBrowseInfo.ulMask = AABRINFO_OWNER | AABRINFO_TITLE | AABRINFO_NO_NETWORK ; aaBrowseInfo.hWndOwner = hWndParent; aaBrowseInfo.lpctstrTitle = L"Select folder..."; aaBrowseInfo.lptstrPath = lptstrPath; aaBrowseInfo.dwLength = MAX_PATH; if (!aaApi_BrowseDirectory(&aaBrowseInfo)) return IDOK;
}
Please note that I post here on a voluntary basis and am not a Bentley employee.
In the implementation, we call SHBrowseForFolder. The AABRINFO_NO_NETWORK flag maps to the Microsoft-defined BIF_DONTGOBELOWDOMAIN flag, which based on the rather sparse Microsoft documentation seems to imply that only certain types of network folders are suppressed from the display.
HTH
Mike
I have never used this function but it seems the flags you are using shoud get the results you are looking for.
This is from the help AABROWSEINFO structure in help. Seems like what you want to do to me.
AABRINFO_NO_NETWORK If this flag is set the user is unable to select any network resources
Bentley? any clarification?