Resources | developer.brewmp.com Resources | developer.brewmp.com

Developer

resources

Using Progress widget

To create a progress widget, an application would do the following:

  1. Call ISHELL_CreateInstance() with a ClassID of AEECLSID_CProgressWidget to retrieve a reference counted instance of the cursor widget.
  2. Set any properties the application may wish to use to enhance the progress widget's appearance (border color, fill color, etc).

The progress widget relies on a value model that represents its data as an integer ranging from 0 to 100 to indicate the "percent complete" of the operation being tracked. A default model is created and assigned to the widget when the widget is created with ISHELL_CreateInstance(). The client can replace the widget's model at any time by calling IWidget_SetModel(), as long as the supplied model interface is of the type that the widget expects. The progress widget also supports TypedValueModel.

A special "indeterminate-progress" mode is supported. To trigger this mode, set the value model data to a negative value. The progress widget displays an animated progress bar repeatedly moving from left to right within the display area. The animation continues until a positive value is set in the model.

The data supplied in the value model must be type int.