函数参考


_WinAPI_GetThemeTransitionDuration

Gets the duration for the specified transition.

#Include <WinAPIEx.au3>
_WinAPI_GetThemeTransitionDuration ( $hTheme, $iPartId, $iStateIdFrom, $iStateIdTo, $iPropId )

参数

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

返回值

Success The transition duration, in milliseconds.
失败: 返回 0 并设置 @error 标志为非 0 值, @extended 标志可能包含一个系统错误代码.

注意/说明

本函数需要 Windows Vista 或更高版本系统.

相关

详情参考

在MSDN中搜索


示例/演示


#Include <APIConstants.au3>
#Include <WinAPIEx.au3>

Opt('MustDeclareVars', 1)

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

If _WinAPI_GetVersion() < '6.0' Then
    MsgBox(16, 'Error', 'Require Windows Vista or later.')
    Exit
EndIf

Global $hTheme, $Val

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

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