Funktionreferenz


_WinAPI_GetThemeTransitionDuration


Gets the duration for the specified transition

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

Parameter

$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_*).

Rückgabewert

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

Bemerkungen

This function requires Windows Vista or later.

Siehe auch

Suche nach GetThemeTransitionDuration in der MSDN Bibliothek.

Beispiel

#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)