Επεξεργασία

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


IProgressDialog::StartProgressDialog method (shlobj_core.h)

Starts the progress dialog box.

Syntax

HRESULT StartProgressDialog(
  [in] HWND     hwndParent,
       IUnknown *punkEnableModless,
       DWORD    dwFlags,
       LPCVOID  pvResevered
);

Parameters

[in] hwndParent

Type: HWND

A handle to the dialog box's parent window.

punkEnableModless

Type: IUnknown*

Reserved. Set to NULL.

dwFlags

Type: DWORD

Flags that control the operation of the progress dialog box. A combination of the following values:

PROGDLG_NORMAL

Normal progress dialog box behavior.

PROGDLG_MODAL

The progress dialog box will be modal to the window specified by hwndParent. By default, a progress dialog box is modeless.

PROGDLG_AUTOTIME

Automatically estimate the remaining time and display the estimate on line 3. If this flag is set, IProgressDialog::SetLine can be used only to display text on lines 1 and 2.

PROGDLG_NOTIME

Do not show the "time remaining" text.

PROGDLG_NOMINIMIZE

Do not display a minimize button on the dialog box's caption bar.

PROGDLG_NOPROGRESSBAR

Do not display a progress bar. Typically, an application can quantitatively determine how much of the operation remains and periodically pass that value to IProgressDialog::SetProgress. The progress dialog box uses this information to update its progress bar. This flag is typically set when the calling application must wait for an operation to finish, but does not have any quantitative information it can use to update the dialog box.

PROGDLG_MARQUEEPROGRESS

Windows Vista and later. Sets the progress bar to marquee mode. This causes the progress bar to scroll horizontally, similar to a marquee display. Use this when you wish to indicate that progress is being made, but the time required for the operation is unknown.

PROGDLG_NOCANCEL

Windows Vista and later. Do not display a cancel button. The operation cannot be canceled. Use this only when absolutely necessary.

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.

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