I have examples with these API functions, but without using Struct.vcx class.
Certain complexity of these calls is created by requirement to use pointers to strings for members
lpstrFilter, lpstrCustFilt, lpstrFile etc. Memory buffer should be allocated and the pointer to it should be passed to the structure as DWORD.
FoxPro code samples (members area):
Creating the Open dialog box to specify the drive, directory, and name of a file to openhttp://www.news2news.com/vfp/?example=363&function=553Creating the Save dialog box to specify the drive, directory, and name of a file to savehttp://www.news2news.com/vfp/?example=265* * *
The
GetFileNameFromBrowse function does not require pointers to strings and for that reason is easier to use comparing to the
GetOpenFileName.
Creating an Open dialog box to specify the drive, directory, and name of a file to open (Shell32 version)http://www.news2news.com/vfp/?example=365&function=556