Export (0) Print
Expand All
Expand Minimize

GetThemeTransitionDuration function

Gets the duration for the specified transition.

Syntax


HRESULT GetThemeTransitionDuration(
  HTHEME hTheme,
  int iPartId,
  int iStateIdFrom,
  int iStateIdTo,
  int iPropId,
  _Out_  DWORD *pdwDuration
);

Parameters

hTheme

Type: HTHEME

Handle of the theme data.

iPartId

Type: int

ID of the part.

iStateIdFrom

Type: int

State ID of the part before the transition.

iStateIdTo

Type: int

State ID of the part after the transition.

iPropId

Type: int

Property ID.

pdwDuration [out]

Type: DWORD*

Address of a variable that receives the transition duration, in milliseconds.

Return value

Type: HRESULT

If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Examples

The following example code retrieves the length of time it takes for a button to transition from the hot to the normal state (for example, when the user has moved the cursor away from the button).


DWORD duration;
HTHEME hTheme = OpenThemeData(hDlg, L"Button");
HRESULT hr = GetThemeTransitionDuration(hTheme, BP_PUSHBUTTON, PBS_HOT, PBS_NORMAL, 
        TMT_TRANSITIONDURATIONS, &duration);


Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Uxtheme.h

DLL

UxTheme.dll

 

 

Community Additions

ADD
Show:
© 2014 Microsoft