IFileDialog2::SetCancelButtonLabel method

Replaces the default text "Cancel" on the common file dialog's Cancel button.

Syntax


HRESULT SetCancelButtonLabel(
  [in] LPCWSTR pszLabel
);

Parameters

pszLabel [in]

Type: LPCWSTR

Pointer to a string that contains the new text to display on the button.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

Changing the text on the Cancel button can be useful for situations where the IFileDialogEvents::OnFileOk method is used to accumulate items, and the button text should be Done instead of Cancel, for example.

Requirements

Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

Header

Shobjidl.h

IDL

Shobjidl.idl

Library

Comdlg32.lib

DLL

Comdlg32.dll (version 6.1 or later)

See also

IFileDialog2

 

 

Show: