IInertiaProcessor::Reset 方法 (manipulations.h)

Reset 方法使用初始时间戳初始化处理器并重启惯性。

语法

HRESULT Reset();

返回值

返回 成功时S_OK ,否则返回错误代码,如 E_FAIL

注解

如果更改了当前由惯性操作的对象的属性,请在调用 Reset 之前调用 Complete

示例


    // set properties on the IInertiaProcessor interface
    this->m_spIInertProc->put_DesiredRotation(spin);    
	 
    // complete any unprocessed inertia
    this->m_spIInertProc->Complete();
	 
    // reset the processor
    this->m_spIInertProc->Reset();		  
	 
    // If you have implemented a timer that handles inertia processing,
    // this should be started as well and the processor will raise
    // Manipulation* events
		  

要求

要求
最低受支持的客户端 Windows 7 [仅限桌面应用]
最低受支持的服务器 Windows Server 2008 R2 [仅限桌面应用]
目标平台 Windows
标头 manipulations.h (包括 Manipulations.h)

另请参阅

完成

IInertiaProcessor

方法