Displays a Windows Open File dialog and returns the selected file path.
Takes title (String), defaultPath (String), and window (Int).
Returns full path as string.
BGI GUI
Parameters & Returns
Parameters
titleString
defaultPathString
windowInt
Returns
String
Quick Summary
Displays a Windows Open File dialog and returns the selected file path.
Takes title (String), defaultPath (String), and window (Int).
Returns full path as string.
Technical Exegesis...
Displays a Windows Open File dialog and returns the selected file path. Searches gizmoMap for window ID to get parent HWND. Creates OPENFILENAME structure with title, defaultPath (initial directory), szFile buffer (260 chars), flags OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST (ensures file exists). Calls GetOpenFileName() to show dialog. If user selects file and clicks OK, returns full path as string. Returns empty string if user cancels or window not found.
Displays a Windows Open File dialog and returns the selected file path. Searches gizmoMap for window ID to get parent HWND. Creates OPENFILENAME structure with title, defaultPath (initial directory), szFile buffer (260 chars), flags OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST (ensures file exists). Calls GetOpenFileName() to show dialog. If user selects file and clicks OK, returns full path as string. Returns empty string if user cancels or window not found.
This function shows the standard Windows file picker for opening files. The defaultPath parameter sets the initial directory shown. No file filter is applied (lpstrFilter=NULL) so all files are visible. Flags ensure only existing paths and files can be selected. Dialog is modal - blocks until user selects or cancels. Use for letting users choose files to open, load, or import. Common pattern: store result in variable, check if non-empty, then process file.