_IManipulationEvents::ManipulationStarted 方法 (manipulations.h)

处理操作或惯性开始时的 事件。

语法

HRESULT ManipulationStarted(
  [in] FLOAT x,
  [in] FLOAT y
);

parameters

[in] x

用户定义坐标中的原点 x 坐标。

[in] y

用户定义的坐标中的原点 y 坐标。

返回值

如果该方法成功,则它会返回 S_OK。 如果失败,则返回 HRESULT 错误代码。

注解

操作事件是为 IInertiaProcessorIManipulationProcessor 接口生成的。 如果在调用 ProcessDown 时使用 TOUCHINPUT 结构中的值,则坐标将以百分之一像素为单位。

示例

以下代码演示 ManipulationStarted 方法的实现。


HRESULT STDMETHODCALLTYPE CManipulationEventSink::ManipulationStarted( 
    /* [in] */ FLOAT x,
    /* [in] */ FLOAT y)
{
    m_cStartedEventCount ++;

    // place your code handler here to do any operations based on the manipulation

    return S_OK;
}
    
    

要求

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

另请参阅

向非托管代码添加操作支持

处理非托管代码中的惯性

方法

_IManipulationEvents