How to: Enable System-Defined File Dialog Boxes
A user can use the Open dialog box to select from all the files on a device. A user can select and sort files by folder or file type. A user organizes files and folders in the My Documents folder, which all applications can access. Folders within the My Documents folder cannot have subfolders. However, you can have multiple subfolders for your applications as long as they do not reside in the My Documents folder.
To enable the Open dialog box for folders or files
- Call the Windows CE GetOpenFileName function. This function takes a Windows CE OPENFILENAME structure as input.
- Set the Flags field of OPENFILENAME to OFN_PROJECT. This produces the Open dialog box for folders. If the Flags field is set to anything else, the Open dialog box opens for files.
To enable the Rename/Move or Save As file dialog boxes
- Call the Windows CE GetSaveFileName function. This function takes an OPENFILENAME structure as input.
- Set the Flags field of OPENFILENAME to OFN_PROJECT. This produces the Rename/Move dialog box. If the Flags field is set to anything else, the Save As dialog box opens.
See Also
Designing Full-Screen Dialog Boxes | How to: Call a System-Defined Dialog Box | How to: Prevent Display of Smart Minimize and OK Buttons in Dialog Boxes
Send Feedback on this topic to the authors