This operation creates and starts the progress dialog. A handle to the progress dialog is returned in the data item specified in the GIVING clause. This handle should be stored in a variable declared as USAGE HANDLE.
This op-code takes six additional optional parameters, which appear in order below:
A literal or data item containing the text that will appear in the title bar of the progress dialog.
A literal or data item containing the text that is shown on line 3 (underneath the progress bar) when the user clicks the Cancel button. Since the progress dialog operates on a separate background thread there will be a delay between the time the user presses the Cancel button and the time the COBOL program calls W$PROGRESSDIALOG WPROGRESSDIALOG-QUERY-CANCEL. Since this delay might be significant, the progress dialog provides the user with immediate feedback by clearing text lines 1 and 2 and displaying the cancel message on line 3. The message is intended to let the user know that the delay is normal and that the progress dialog box will be closed shortly. Typically, it is set to something like Please wait while ....
A numeric literal or data item, which specifies flags that determine the operation of the progress dialog. This can be a combination of the following values:
WPROGRESSDIALOG-NORMAL (value 0) | Normal progress dialog behavior. |
WPROGRESSDIALOG-MODAL (value 1) | The progress dialog box will be modal to the current window. By default, a progress dialog box is modeless. |
WPROGRESSDIALOG-AUTOTIME (value 2) | Automatically estimate the remaining time and display the estimate on line 3. If this flag is set, WPROGRESSDIALOG-SET-LINE can be used only to display text on lines 1 and 2. |
WPROGRESSDIALOG-NOTIME (value 4) | Do not show the "time remaining" text. |
WPROGRESSDIALOG-NOMINIMIZE (value 8) | Do not display a minimize button on the dialog box's title bar. |
WPROGRESSDIALOG-NOPROGRESSBAR (value 16) | Do not display a progress bar. Normally, an application can quantitatively determine how much of the operation remains and periodically pass that value to WPROGRESSDIALOG-SET-PROGRESS. The progress dialog uses this information to update its progress bar. This flag is typically set when the calling application needs to wait for an operation to finish but does not have any quantitative information it can use to update the dialog box. |
A numeric literal or data item, which specifies the type of AVI clip that will run in the dialog box. It can be one of the following values:
Data Item | Value |
---|---|
WPROGRESSDIALOG-ANIMATION-NONE | 0 |
WPROGRESSDIALOG-ANIMATION-FILECOPY | 1 |
WPROGRESSDIALOG-ANIMATION-FILEMOVE | 2 |
WPROGRESSDIALOG-ANIMATION-FILEDEL | 3 |
WPROGRESSDIALOG-ANIMATION-FILEDELR | 4 |
WPROGRESSDIALOG-ANIMATION-FILENUKE | 5 |
WPROGRESSDIALOG-ANIMATION-SEARCH | 6 |
WPROGRESSDIALOG-ANIMATION-FINDCOMP | 7 |
WPROGRESSDIALOG-ANIMATION-FINDFILE | 8 |
WPROGRESSDIALOG-ANIMATION-CUSTOM (value 99) | 99 |
If you specify WPROGRESS-ANIMATION-CUSTOM, there are two additional parameters:
resource-dialog | A literal or data item containing the name of a DLL or EXE that includes the AVI file as a resource. |
resource-id | The resource id of the AVI file in the file specified by resource-dialog.
For example, if you want to use an AVI file named MYANIMATION.AVI that is included as a resource in a DLL named MYRES.DLL with ID 1007, you can specify it with the following parameters: CALL "W$PROGRESSDIALOG" USING WPROGRESSDIALOG-CREATE "Title" "Cancel Message" WPROGRESSDIALOG-MODAL WPROGRESSDIALOG-ANIMATION-CUSTOM "MYRES.DLL" 1007 GIVING PD-HANDLE. Note: The requirement for the AVI file to be a resource is a limitation of the Microsoft IProgressDialog COM interface. There is
no provision for loading an AVI file directly.
|