Windows Animation Library for Delphi

This is a Delphi translation of the Windows Animation Library header files.

The Windows Animation Manager (Windows Animation, aka Scenic Animation in beta version of Windows 7) is a new platform that enables rich animation of user interface elements. This library requires Windows 7 or later.

More information about Windows Animation can by found in the Microsoft MSDN Library under "Win32 and COM Development | User Interface | Windows Animation Manager".


The Windows Animation Library for Delphi is completely free and can be downloaded here (430 KB). Please read the included License.txt file for license information.

The Delphi Translation

Windows Animation is a single-threaded COM API that is translated to Delphi in the following way:

  • Types start with a "T" and use CamelCaps instead of underscores and uppercase characters. The original C(++) typenames are not preserved to avoid confusion.
    For example, the original type UI_ANIMATION_UPDATE_RESULT is renamed to TUIAnimationUpdateResult.
  • Elements of enumerations also use CamelCaps instead of underscores and uppercase characters.
    For example, the UI_ANIMATION_UPDATE_NO_CHANGE member of the enumeration above is renamed to UIAnimationUpdateNoChange.
  • Most methods use the "safecall" calling convention instead of returning an HResult. This way, error conditions are handled using exceptions instead of having to check the function result every time.
    Likewise, the final "out" parameter (if any) of each method has been turned into a function result.

    So, the following original C++ method:

    HRESULT CreateAnimationVariable(__in DOUBLE initialValue, __deref_out IUIAnimationVariable **variable);

    Has the following Delphi equivalent:

    function CreateAnimationVariable(const InitialValue: Double): IUIAnimationVariable; safecall;

Fallback Option for Windows XP and earlier

The Delphi version is independent from any Windows Animation implementation so that you can use Microsofts implementation or use your own one. As such, there are no CoClasses here for creating Windows Animation objects. Instead, there is a IUIAnimationFactory interface with methods for creating the various Windows Animation objects. The unit UIAnimationMS contains an implementation of this interface that uses Microsofts implementation for creating Windows Animation objects (which requires Windows 7 or later).

There is no implementation that works on earlier versions of Windows yet. But maybe, I'll try to write a custom implementation. Check for the latest version.

Demo Application

The Delphi version comes with a demo application that contains Delphi version of the sample applications that come with the Windows 7 SDK, as well as visualizations of the standard transitions that come with the Windows Animation Manager.

Demo Application

Note that the demo application can only be compiled with Delphi 2009 or later, because it uses my GDI+ Library for rendering the animations.

The Windows Animation Library itself does not have this restriction and should compile with most Win32 Delphi versions.