Function Reference


_WinAPI_GetThemeTransitionDuration

Gets the duration for the specified transition

#include <WinAPITheme.au3>
_WinAPI_GetThemeTransitionDuration ( $hTheme, $iPartID, $iStateIDFrom, $iStateIDTo, $iPropID )

Parameters

$hTheme Handle of the theme data.
$iPartID ID of the part.
$iStateIDFrom The state ID of the part before the transition.
$iStateIDTo The state ID of the part after the transition.
$iPropID The property ID ($TMT_*).

Return Value

Success: The transition duration, in milliseconds.
Failure: Sets the @error flag to non-zero, @extended flag may contain the HRESULT error code.

Remarks

This function requires Windows Vista or later.

See Also

Search GetThemeTransitionDuration in MSDN Library.

Example

#include <APIThemeConstants.au3>
#include <MsgBoxConstants.au3>
#include <WinAPISys.au3>
#include <WinAPITheme.au3>

Global Const $BP_PUSHBUTTON = 1
Global Const $PBS_NORMAL = 1
Global Const $PBS_HOT = 2

If Number(_WinAPI_GetVersion()) < 6.0 Then
        MsgBox(($MB_ICONERROR + $MB_SYSTEMMODAL), 'Error', 'Require Windows Vista or later.')
        Exit
EndIf

Local $hTheme = _WinAPI_OpenThemeData(0, 'Button')
Local $iVal = _WinAPI_GetThemeTransitionDuration($hTheme, $BP_PUSHBUTTON, $PBS_NORMAL, $PBS_HOT, $TMT_TRANSITIONDURATIONS)
_WinAPI_CloseThemeData($hTheme)

ConsoleWrite('Transition from "Hot" to "Normal" state: ' & $iVal & ' ms' & @CRLF)