Called just before the dialog is about to return with a result.
HRESULT OnFileOk( IFileDialog *pfd );
A pointer to the interface that represents the dialog.
Implementations should return S_OK to accept the current result in the dialog or S_FALSE to refuse it. In the case of S_FALSE, the dialog should remain open.
The application can use this callback method to perform additional validation before the dialog closes, or to prevent the dialog from closing. If the application prevents the dialog from closing, it should display a UI to indicate a cause. To obtain a parent HWND for the UI, obtain the IOleWindow interface through IFileDialog::QueryInterface and call IOleWindow::GetWindow.
An application can also use this method to perform all of its work surrounding the opening or saving of files.
|Minimum supported client||Windows Vista [desktop apps only]|
|Minimum supported server||Windows Server 2008 [desktop apps only]|
|Header||shobjidl_core.h (include Shobjidl.h)|