bool GetPathViaOpenDialog(out string filePath, string szFilter, string szDefaultExt, string szInitialDir)

Prompts the user to select a file with an Open File Dialog


Name Description
filePath If OK was selected, returns the path.
szFilter A file filter limiting matches. See for more information.
szDefaultExt The default file extension to select.
szInitialDir The initial directory that the File Open Dialog should be opened to.


True if user clicked OK, False if user clicked Cancel.