Image of Navigational Map linked to Home / Contents / Search How to write Delphi Wizards

TIExpert Interface
Image of Line Break

The major reason why everybody thinks writing custom Wizards is difficult, is because they are not documented. Not in the manuals or on-line Help, that is (they are documented in my book The Revolutionary Guide to Delphi 2 and in my column in The Delphi Magazine). If you take a look at the documentation and source code on your harddisk, you'll find some important files and even two example Wizards that are installed automatically by Delphi itself. The important example files can be found in the DOC, SOURCE\VCL or SOURCE\TOOLSAPI subdirectories, and the main files are EXPTINTF.PAS, TOOLINTF.PAS, VIRTINTF.PAS and SHAREMEM.PAS. The first one shows how to derive and register our own Wizard, while the second one shows how to use the tool-services of Delphi to make the integration with the IDE complete.

In order to start working on a custom wizard, we have to take a look at the abstract base class definition TIExpert in EXPTINTF.PAS, which is as follows for the 32-bits versions of Delphi:

Type
  TExpertStyle = (esStandard, esForm, esProject, esAddIn);
  TExpertState = set of (esEnabled, esChecked);

  TIExpert = class(TInterface)
  public
    { Expert UI strings }
    function GetIDString: string; virtual; stdcall; abstract;
    function GetName: string; virtual; stdcall; abstract;
    function GetAuthor: string; virtual; stdcall; abstract;
    function GetStyle: TExpertStyle; virtual; stdcall; abstract;
    function GetMenuText: string; virtual; stdcall; abstract;
    function GetState: TExpertState; virtual; stdcall; abstract;
    function GetGlyph: HICON; virtual; stdcall; abstract;
    function GetComment: string; virtual; stdcall; abstract;
    function GetPage: string; virtual; stdcall; abstract;

    { Launch the Expert }
    procedure Execute; virtual; stdcall; abstract;
  end;

Image of Arrow linked to Next Article Image of Arrow linked to Next Article
Image of Line Break
[HOME] [TABLE OF CONTENTS] [SEARCH]