Admin Production ni-theme
Current Publication

ProgressBar_AdvanceMilestone

LabWindows/CVI

ProgressBar_AdvanceMilestone

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

Purpose

Advances the progress bar to the next milestone in the milestone list.

If you set the update mode to VAL_PROGRESSBAR_AUTO_MODE, explicitly advancing the control to a milestone using this function allows the control to continue advancing automatically past the milestone.

When you advance the progress bar to the next milestone, the value of the control is set to the position of the milestone, regardless of its current value. The control records the actual time elapsed until the milestone is reached and uses this time to adjust the milestone if you enable auto adjust.

If there are no additional milestones defined in the control, calling this function is equivalent to calling ProgressBar_End.

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_AdvanceMilestone function.