Upravit

Sdílet prostřednictvím


Displaying Billboards on a Modeless Dialog

Billboards can display a sequence of images and text in a dialog during an installation. Typically, billboards are used to create the visual effect of a slide show or animation that informs the user of the progress of an installation.

To display billboards on a modeless dialog

  1. Include a record in the Dialog Table for the modeless dialog box that contains the billboard. After a billboard is displayed, a modeless dialog box returns control to the Installer. This enables the Installer to process messages and update the dialog box and billboard. To create a modeless dialog box, do not set the Modal Dialog Style Bit in the Attributes field of the Dialog Table. The following Dialog Table record specifies the ActionDialog dialog box.

    Dialog Table (partial)

    Dialog_ HCentering VCentering Width Height Attributes Title Control_First Control_Default Control_Cancel
    ActionDialog 50 50 480 240 5 Action Cancel Cancel Cancel

     

  2. Add a record to the Control Table to specify that the dialog box displays a billboard. The record defines the size and position of the region on the dialog box where the billboard controls listed in the BBControl Table are to be displayed. The following Control Table record defines the position and size of the billboard on the ActionDialog dialog box.

    Control Table (partial)

    Dialog_ Control Type X Y Width Height Attributes
    ActionDialog Billboard Billboard 0 110 480 130 1

     

  3. The Billboard Table lists the billboard controls and specifies when a specific billboard control is displayed. Add a record to the Billboard Table for each billboard control. The Billboard Table watches for progress messages sent during an installation. A billboard is displayed only when a progress message is sent by the actions listed in the Action column of the Billboard Table, and only if the feature in the Feature_ field is selected for installation. After a billboard is displayed, it remains visible until covered by another billboard, or until the dialog box is closed. If multiple billboards are specified for an action, they are displayed one at a time in the order specified by the Ordering field. For example, the following Billboard Table entries first display the BB1 and then the BB2 Billboard Controls when the InstallFiles action is run and the QuickTest feature has been selected to be installed.

    Billboard Table (partial)

    Billboard Feature Action Ordering
    BB1 QuickTest InstallFiles 1
    BB2 QuickTest InstallFiles 2

     

  4. The BBControl Table specifies the controls that belong to the Billboard Controls that are listed in the Billboard Table. The Text Control, Bitmap Control, and Icon Control are the only types of controls that can go on a billboard. Multiple controls can be placed on each billboard. Enter the name of the billboard into the Billboard_ field of the BBControl Table exactly as it appears in the Billboard Table.

    Each control position is specified as the coordinates of the upper left corner of the control. The coordinate system origin is located at the upper left corner of the billboard control rather than at a corner of the dialog box. The coordinates are in Installer units, not dialog units. An Installer unit is equal to one-twelfth the height of the 10-point MS Sans Serif font size. The following BBControl Table records ties controls to billboards.

    BBControl Table (partial)

    Billboard BBControl Type X Y Width Height Attributes Text
    BB1 Text Text 100 30 280 280 3 First Billboard
    BB1 Bitmap1 Bitmap 0 0 100 100 3 Software
    BB1 Bitmap2 Bitmap 380 0 100 100 3 Music
    BB2 Text Text 100 30 280 20 3 Second Billboard
    BB2 Bitmap1 Bitmap 0 0 100 100 3 Music
    BB2 Bitmap2 Bitmap 380 0 100 100 3 Software

     

  5. To display a billboard on the ActionDialog dialog box, you must subscribe the billboard control to SetProgress ControlEvent by adding a record to the EventMapping Table. When the Installer publishes the SetProgress ControlEvent that is specified in the Event column, the Installer sets the control attribute that is specified in the Attribute field. The Event field contains the string identifier (without quotes) of the SetProgress ControlEvent. The Attribute field contains the string identifier (without quotes) of the attribute to be set. The Dialog_ and Control_ fields identify the Billboard Control and should match those fields in the Control Table. For example, the following EventMapping Table subscribes a control to an event.

    EventMapping Table (partial)

    Dialog_ Control_ Event Attribute
    ActionDialog Billboard SetProgress Progress