IVsStatusbar::Progress Method (UInt32, Int32, String^, UInt32, UInt32)
Shows the progress of operations that take a determinate amount of time.
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
int Progress( unsigned int% pdwCookie, int fInProgress, String^ pwszLabel, unsigned int nComplete, unsigned int nTotal )
Parameters
- pdwCookie
-
Type:
System::UInt32
[in, out] ID of the current user, to prevent multiple uses of the progress bar at the same time.
- fInProgress
-
Type:
System::Int32
[in] true while the progress bar is in use; false when complete.
- pwszLabel
-
Type:
System::String^
[in] Text to display in status field while the progress bar is in use.
- nComplete
-
Type:
System::UInt32
[in] Number of units currently complete in the progress bar.
- nTotal
-
Type:
System::UInt32
[in] Total number of units for the progress bar operation.
Return Value
Type: System::Int32If the method succeeds, it returns S_OK. If it fails, it returns an error code.
From vsshell.idl:
HRESULT IVsStatusbar::Progress( [in,out]VSCOOKIE *pdwCookie, [in]BOOL fInProgress, [in]LPCOLESTR pwszLabel, [in]ULONG nComplete, [in]ULONG nTotal );
Progress is displayed as a growing blue bar in the progress bar area of the status bar. The first time a status bar user calls this method, pdwCookie must be set to zero. The value then returned in pdwCookie is the unique ID that that status bar user must use in future calls of this method.
This method is called to display the amount of progress being made during an operation. As such, nTotal must be known before you call this method. If nTotal cannot be ascertained beforehand and the operation is expected to take more than a couple of seconds, call the Animation method instead.