Jump to content

FDM VALIDATE

From EDM2

This message is sent when the user selects a file and presses Enter or clicks on the OK button, or double-clicks on a file name in the file list box.

Syntax

param1
PSZ pFileName;   /* Pointer to the fully-qualified file name. */

param2
USHORT usSeltype;  /* Selection type. */

Parameters

pFileName (PSZ) - Input
Pointer to the fully-qualified file name.
usSeltype (USHORT) - Input
Selection type.

Returns

rc (BOOL) - returns
Validity indicator.
TRUE: File name is valid.
FALSE: File name is not valid.

Remarks

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.

Default Processing

The WinDefDlgProc function does not expect to receive this message and takes no action on it other than to return FALSE.