This message is only sent just before the dialog returns to the caller with the user-selected file name. Before this message is sent, pFileName is updated with the user-selected file name. The application can determine if this file name is acceptable. For instance, if the file dialog is being used to pick a "SaveAs" file name, the application can check to see if the file is read-only. If it is, a warning dialog should be brought up to notify the user.

When FALSE is returned from a FDM_VALIDATE message, the dialog will not be dismissed and the user can continue to use the File Dialog to select an alternate file.

In multiple file selection dialogs this message is sent for each selected entry within the file list box. When the name of the file being validated comes from a selected entry in the list box, param2 will contain FDS_LBSELECTION. When the name of the file comes from the file name entry field, param2 will contain FDS_EFSELECTION. Single file selection dialogs will always return FDS_EFSELECTION in param2 since the returned file name always comes from the single line entry field.


[Back] [Next]