Επεξεργασία

Κοινή χρήση μέσω


IProgressDialog::SetCancelMsg method (shlobj_core.h)

Sets a message to be displayed if the user cancels the operation.

Syntax

HRESULT SetCancelMsg(
  [in] PCWSTR  pwzCancelMsg,
       LPCVOID pvResevered
);

Parameters

[in] pwzCancelMsg

Type: PCWSTR

A pointer to a null-terminated Unicode string that contains the message to be displayed.

pvResevered

Type: LPCVOID

Reserved. Set to NULL.

Return value

Type: HRESULT

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

Remarks

Even though the user clicks Cancel, the application cannot immediately call IProgressDialog::StopProgressDialog to close the dialog box. The application must wait until the next time it calls IProgressDialog::HasUserCancelled to discover that the user has canceled the operation. Since this delay might be significant, the progress dialog box provides the user with immediate feedback by clearing text lines 1 and 2 and displaying the cancel message on line 3. The message is intended to let the user know that the delay is normal and that the progress dialog box will be closed shortly. It is typically is set to something like "Please wait while ...".

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional, Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header shlobj_core.h
DLL Shell32.dll (version 5.0 or later)

See also

IProgressDialog