bgiOpenFolderDialog

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

title String
defaultPath String
window Int

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.

Example

Example.bam
; No example implemented yet