Admin Production ni-theme
Current Publication

CreateProgressDialog

LabWindows/CVI

CreateProgressDialog

int CreateProgressDialog (const char title[], const char progressIndicatorLabel[], int dialogIsModal, int indicatorMarkerStyle, const char cancelButtonLabel[]);

Purpose

This function creates and displays a dialog box that you can use to indicate the completion status of a lengthy operation.

Note Note  Use the LabWindows/CVI progress bar control if you want more options for displaying and configuring the progress of a task.

Parameters

Input
Name Type Description
title const char[] Specifies the title of the progress dialog.
progressIndicatorLabel const char[] This parameter specifies the label for the horizontal progress bar that appears on the progress dialog.

Pass "" if you do not want a label.
dialogIsModal int Specify a nonzero value or select Yes in the function panel to create a modal dialog box.

Specify 0 or select No to create a non-modal dialog box.
indicatorMarkerStyle int This control specifies how to mark the percentage values on the horizontal progress bar.
cancelButtonLabel const char[] This parameter specifies the label for the dialog's cancel button. The shortcut key for the cancel button is automatically set to be the ESC key.

Pass "" if you want the cancel button to be invisible.

Pass 0 if you do not want a cancel button. If the dialog does not have a cancel button, then it will not detect if the user has pressed the ESC key.

The UpdateProgressDialog function returns whether the user has requested to stop the operation by pressing the cancel button or the ESC key.

Return Value

Name Type Description
progressDialog int This control returns a positive integer panel handle which can be used to refer to the progress dialog in subsequent calls to UpdateProgressDialog or DiscardProgressDialog.

If an error occurred while creating the dialog, a negative User Interface Library error code is returned.

Additional Information

Library: Programmer's Toolbox

Include file: toolbox\toolbox.h

LabWindows/CVI compatibility: LabWindows/CVI 4.0 and later

Example

Refer to userint\intgraph.cws for an example of using the CreateProgressDialog function.