Admin Production ni-theme
Current Publication

ProgressBar_Start

LabWindows/CVI

ProgressBar_Start

int ProgressBar_Start (int panel, int progressBarCtrl, char *label);

Purpose

Starts a new progress bar session.

You do not need to start a new session to set the position of a progress bar with the ProgressBar_SetPercentage function. However, when the progress bar is in marquee or auto modes, you must start a session for the progress bar to begin moving.

When you start a session, the progress bar sets its position to 0, resets the current milestone, and establishes the initial timestamp against which the elapsed time of each milestone, and of the task as a whole, is measured.

Parameters

Input
Name Type Description
panel int The specifier for a particular panel that is currently in memory. You obtain this handle from LoadPanel, NewPanel, or DuplicatePanel.
progressBarCtrl int The ID you specified as the slideCtrl parameter in the ProgressBar_ConvertFromSlide function call or the ID returned by the ProgressBar_Create function.
label char * You can optionally pass a new label for the control that is suitable to its new position. Pass 0 to leave the label unchanged.

Return Value

Name Type Description
status int Return value indicating whether the function was successful. A negative number indicates that an error occurred. Call the GetGeneralErrorString toolbox function to get a descriptive error message.

Additional Information

Library: Progress Bar Control

Include file: custctrl\progressbar.h

LabWindows/CVI compatibility: LabWindows/CVI 2009 and later

Example

Refer to userint\custctrl\progressbar\progressdemo.cws for an example of using the ProgressBar_Start function.