Skip to content

Latest commit

 

History

History
75 lines (60 loc) · 3.18 KB

nf-shobjidl_core-ifiledialogevents-onfileok.md

File metadata and controls

75 lines (60 loc) · 3.18 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:shobjidl_core.IFileDialogEvents.OnFileOk
IFileDialogEvents::OnFileOk (shobjidl_core.h)
Called just before the dialog is about to return with a result.
IFileDialogEvents interface [Windows Shell]
OnFileOk method
IFileDialogEvents.OnFileOk
IFileDialogEvents::OnFileOk
OnFileOk
OnFileOk method [Windows Shell]
OnFileOk method [Windows Shell]
IFileDialogEvents interface
shell.IFileDialogEvents_OnFileOk
shell_IFileDialogEvents_OnFileOk
shobjidl_core/IFileDialogEvents::OnFileOk
shell\IFileDialogEvents_OnFileOk.htm
shell
81277122-b2fe-40af-85f8-d578925856a1
12/05/2018
IFileDialogEvents interface [Windows Shell],OnFileOk method, IFileDialogEvents.OnFileOk, IFileDialogEvents::OnFileOk, OnFileOk, OnFileOk method [Windows Shell], OnFileOk method [Windows Shell],IFileDialogEvents interface, shell.IFileDialogEvents_OnFileOk, shell_IFileDialogEvents_OnFileOk, shobjidl_core/IFileDialogEvents::OnFileOk
shobjidl_core.h
Shobjidl.h
Windows
Windows Vista [desktop apps only]
Windows Server 2008 [desktop apps only]
Shobjidl.idl
Windows
19H1
IFileDialogEvents::OnFileOk
shobjidl_core/IFileDialogEvents::OnFileOk
c++
APIRef
kbSyntax
COM
shobjidl_core.h
IFileDialogEvents.OnFileOk

IFileDialogEvents::OnFileOk

-description

Called just before the dialog is about to return with a result.

-parameters

-param pfd [in]

Type: IFileDialog*

A pointer to the interface that represents the dialog.

-returns

Type: HRESULT

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.

-remarks

When this method is called, the IFileDialog::GetResult and GetResults methods can be called.

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.