Displays a Windows Browse For Folder dialog and returns the selected folder path.
Takes title (String), defaultPath (String), and window (Int).
Returns folder path as string on success, empty string if user cancels or window not found.
BGI GUI
Parameters & Returns
Parameters
titleString
defaultPathString
windowInt
Returns
String
Quick Summary
Displays a Windows Browse For Folder dialog and returns the selected folder path.
Takes title (String), defaultPath (String), and window (Int).
Returns folder path as string on success, empty string if user cancels or window not found.
Technical Exegesis...
Displays a Windows Browse For Folder dialog and returns the selected folder path. Searches gizmoMap for window ID to get parent HWND. Creates BROWSEINFO structure with lpszTitle=title, hwndOwner=parent. Calls SHBrowseForFolder() to show folder browser. If user selects folder, calls SHGetPathFromIDList() to convert ITEMIDLIST to path string (MAX_PATH buffer). Frees ITEMIDLIST with CoTaskMemFree(). Returns folder path as string on success, empty string if user cancels or window not found.
Displays a Windows Browse For Folder dialog and returns the selected folder path. Searches gizmoMap for window ID to get parent HWND. Creates BROWSEINFO structure with lpszTitle=title, hwndOwner=parent. Calls SHBrowseForFolder() to show folder browser. If user selects folder, calls SHGetPathFromIDList() to convert ITEMIDLIST to path string (MAX_PATH buffer). Frees ITEMIDLIST with CoTaskMemFree(). Returns folder path as string on success, empty string if user cancels or window not found.
This function shows the standard Windows folder browser dialog (tree view of filesystem). The title parameter appears at top of dialog. User can browse computer to select any folder. Only folders are selectable, not files. Dialog is modal - blocks until user selects or cancels. Use for letting users choose directories for save locations, project folders, or batch operations. Common pattern: store result in variable, check if non-empty, then use as base path for file operations.