Contents 

Welcome
About
Contact and support
Readme
Introducing Graphical Installer
Overview
Features
File <project>.iss
File <project>.graphics.iss
Useful Functions, Procedures and Variables
Graphical Installer core files
Implementation of Inno Setup Compiler
GraphicalInstaller_functions.nsh
BitmapCutter.exe
BitmapCutterGUI.exe
Wizard.exe
How GraphicalInstallerUI works
MessageBox Designer
SetupProjectsConverter
Using Graphical Installer Wizard
Description of Graphical Installer Wizard's pages
Visual & Installer
Configuration of Graphical Installer Wizard (Visual & Installer)
Launching a Graphical Installer Wizard (Visual & Installer)
RAD & Installer
Configuration of Graphical Installer Wizard (RAD & Installer)
Launching a Graphical Installer Wizard (RAD & Installer)
Inno Script Studio
Configuration of Graphical Installer Wizard (Inno Script Studio)
Launching a Graphical Installer Wizard (Inno Script Studio)
Standalone application
Configuration of Graphical Installer Wizard (Standalone application)
Launching a Graphical Installer Wizard (Standalone application)
F.A.Q.
Changelog
Bugs

Graphical Installer for Inno Setup Online Help

Prev Page Next Page
Useful Functions, Procedures and Variables

Graphical Installer contains many useful Functions, Procedures and Variables which may be handy when you want to change certain feature of installer or add a new one.

Tip:
Most of these snippets belong to [Code] section as they are Pascal based.

  • Global Variables

    These variables holds information about graphic elements used globally in whole project:

  • ButtonFont: TFont;

    Font used for Buttons.

  • DPI: Integer;

    Current Windows DPI;

  • Texts Colors

    Specification of all text colors in installer (Texts shown in all pages of installer and in main window):

  • swTextsColor: TColor;

    Color of all labels in installer. Labels are all static texts in installer window except the headers

  • swHeadersColor: TColor;

    Color of all header texts in installer. Headers are usually at the top of each page in installer..

  • swInversedColor: TColor;

    This color is used for TNewCheckListBox component - when some item is selected.


  • See the next picture to determine where each color is applied to.

    Buttons Texts Colors

    Specification of buttons texts colors in different situations:

  • swButtonNormalColor: TColor;

    Color of all button texts in installer. This color is applied to all buttons when button is in regular state.

  • swButtonFocusedColor: TColor;

    Color of all button texts in installer. This color is when button is focused.

  • swButtonPressedColor: TColor;

    Color of all button texts in installer. This color is applied when button is pressed down.

  • swButtonDisabledColor: TColor;

    Color of all button texts in installer. This color is applied when button is disabled.

  • Settings Progress Bar Colors

    Procedure for changing colors of progress bar (TNewProgressBar component) in Installation page (or any other page):

  • procedure SetProgressBarColors (Handle: HWND; Foreground, Background: String);

    Parameters:
    Handle: HWND - TNewProgressBar Handle.
    Foreground: String - Foreground color of progress bar (Format: $RRGGBB).
    Background: String - Background color of progress bar (Format: $RRGGBB).

    Note: This procedure uses String parameter for colors ($RRGGBB format), not TColor!

    Example of colored progress bar:

    Tip:
    To colorize the progress bar on Installing page (wpInstalling) use the WizardForm.ProgressGauge.Handle as HWND parameter.

  • Creating skinned Button

    Function creates clickable skinned button on desired position (most often in certains page):

  • function CreateSkinnedButton (Handle: HWND; Left, Top: Integer; Caption: String; ClickEvent: TNotifyEvent): HWND;

    Parameters:
    Handle: HWND - Page (or Form) Handle when button should be placed.
    Left: Integer - Button Left position (in pixels, relative to parent!).
    Top: Integer - Button Top position (in pixels, relative to parent!).
    Caption: String - Button text.
    ClickEvent: TNotifyEvent - event executed when the button is clicked.

    Return value:
    HWND: Handle to created button (0 on error).

    Warning:
    To place button on certain page use correct Handle (HWND). Wizard form is a little complicated as they are several components placed over themselves.
    The most common is using the WizardForm.InnerPage.Handle as parameter.

  • Skinned Button Visibility

    This procedure shows or hides the skinned button:

  • procedure ButtonSetVisibility (Handle: HWND; Value: Boolean);

    Parameters:
    Handle: HWND - Button Handle.
    Value: Boolean - Button visibility (True = Visible, False = Hidden).

    Tip:
    Call this procedure from procedure CurPageChanged(CurPageID: Integer); to show or hide button in desired page.

  • Dragging installer window

    This procedure enables to drag the installer window with mouse in the bottom area of WizardForm:

  • procedure EnableDragging ();

    No parameters.

    Tip:
    Perfect place to call this procedure is:
    procedure InitializeWizard();
    begin
        #ifdef GRAPHICAL_INSTALLER_PROJECT
          InitGraphicalInstaller();
          WizardForm.EnableDragging();
        #endif
    end;

  • Draggable area is at the bottom of the installer window, about 100 pixels high:

 

   
Converted from CHM to HTML with chm2web Pro 2.85 (unicode)