This constructor constructs a standard Windows CE file dialog box-object. Either a Open or Save As dialog box is constructed, depending on the value of bOpenFileDialog.
The following code example demonstrates how to use CFileDialog to rename or move an existing file dialog box. My Documents and docs are directories and new file is the new name of the file dialog box.
CFileDialog dlg(FALSE, NULL, TEXT("\\My Documents\\docs\\new file"),
OFN_PROPERTY);
The following code example demonstrates how to use CFileDialog to create a new file dialog box.
CFileDialog dlg(TRUE, NULL, NULL, OFN_PROJECT);
Header file: | Afxdlgs.h |
Platforms: | H/PC 2.0, Palm-size PC, H/PC Pro |
Windows CE versions: | 1.0 and later |
Complete documentation: | Visual C++ documentation |
CFileDialog( BOOL bOpenFileDialog, LPCTSTR lpszDefExt = NULL, LPCTSTR lpszFileName = NULL, DWORD dwFlags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, LPCTSTR lpszFilter = NULL, CWnd* pParentWnd = NULL );