VCL.XPAppWiz Sample
From RAD Studio Code Examples
Language:
This sample shows how to create a Windows XP Application Wizard.
Contents |
Location
You can find the XPAppWiz sample project at:
- Start > Programs > Embarcadero RAD Studio > Samples and then navigate to Delphi\VCL\ToolsAPI\XPAppWiz
- Subversion Repository for Delphi: http://sourceforge.net/p/radstudiodemos/code/HEAD/tree/branches/RadStudio_XE4/Delphi/VCL/ToolsAPI/XPAppWiz/
Description
This wizard enables you to create projects that will participate in the new XP Themes look. It creates a manifest file for your project and adds it to the executable as a resource.
How to Use the Sample
- Navigate to Start > Programs > Embarcadero RAD Studio > Samples and open XPAppWiz.dproj.
- Build XPAppWiz.bpl.
- Install XPAppWiz.bpl.
Files
XPAppExpt contains all the classes needed to create the project wizard.
Classes
- TXPAppProjectCreator is the creator class for the XP Themed Application.
- TXPAppModuleCreator is the creator class for a form file.
- TXPAppProjectWizard is the class that adds the new item XP Themed Application to the File > New > Other collection.
- TXPProjectSource handles the source file of the project.
- TXPModuleSource handles the source file of a form.
Implementation
- TXPAppProjectCreator.GetCreatorType sets the project type as a default application.
- TXPAppProjectWizard.GetGalleryCategory returns the category where the new application type will appear
- TXPAppProjectWizard.GetPersonality sets that the project is a Delphi project.
- Global Register procedure installs the new project wizard.
- InitModuleResources initializes the source files to the template defined in XPAPPCODE.txt.