Implementing VBGetOpenFileName

Finally we get to the hard part—implementing a wrapper for GetOpenFile­Name. The trick is to use the UDT that’s expected by the Windows GetOpen­FileName function, but to hide it behind named arguments. From the call example, VBGet­OpenFileName might look object-oriented, but it’s really a function in a Visual Basic module. The COMDLG module contains all the private types and declarations used by the public functions VBGetOpenFileName, VBGet­SaveFileName, VBChooseColor, VBChooseFont, VBPrintDlg, and VBPageSetupDlg.