다음을 통해 공유


CAnimationManagerEventHandler Class

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at CAnimationManagerEventHandler Class.

Implements a callback, which is called by the Animation API when a status of an animation manager is changed.

Syntax

class CAnimationManagerEventHandler : public CUIAnimationManagerEventHandlerBase<CAnimationManagerEventHandler>;  

Members

Public Constructors

Name Description
CAnimationManagerEventHandler::CAnimationManagerEventHandler Constructs a CAnimationManagerEventHandler object.

Public Methods

Name Description
CAnimationManagerEventHandler::CreateInstance Creates an instance of CAnimationManagerEventHandler object.
CAnimationManagerEventHandler::OnManagerStatusChanged Called when a status of animation manager has changed. (Overrides CUIAnimationManagerEventHandlerBase::OnManagerStatusChanged.)
CAnimationManagerEventHandler::SetAnimationController Stores a pointer to animation controller to route events.

Remarks

This event handler is created and passed to IUIAnimationManager::SetManagerEventHandler method, when you call CAnimationController::EnableAnimationManagerEvent.

Inheritance Hierarchy

CUIAnimationCallbackBase

CUIAnimationManagerEventHandlerBase

CAnimationManagerEventHandler

Requirements

Header: afxanimationcontroller.h

CAnimationManagerEventHandler::CAnimationManagerEventHandler

Visual Studio 2010 SP1 is required.

Constructs a CAnimationManagerEventHandler object.

CAnimationManagerEventHandler();

CAnimationManagerEventHandler::CreateInstance

Visual Studio 2010 SP1 is required.

Creates an instance of CAnimationManagerEventHandler object.

static COM_DECLSPEC_NOTHROW HRESULT CreateInstance(
    CAnimationController* pAnimationController,  
    IUIAnimationManagerEventHandler** ppManagerEventHandler);

Parameters

pAnimationController
A pointer to animation controller, which will receive events.

ppManagerEventHandler
Output. If the method succeeds it contains a pointer to COM object that will handle status updates to an animation manager.

Return Value

If the method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

CAnimationManagerEventHandler::OnManagerStatusChanged

Visual Studio 2010 SP1 is required.

Called when a status of animation manager has changed.

IFACEMETHOD(OnManagerStatusChanged)(
  UI_ANIMATION_MANAGER_STATUS newStatus,
  UI_ANIMATION_MANAGER_STATUS previousStatus);

Parameters

newStatus
New status.

previousStatus
Previous status.

Return Value

Current implementation always returns S_OK;

CAnimationManagerEventHandler::SetAnimationController

Visual Studio 2010 SP1 is required.

Stores a pointer to animation controller to route events.

void SetAnimationController(CAnimationController* pAnimationController);

Parameters

pAnimationController
A pointer to animation controller, which will receive events.

See Also

Classes