IRealTimeStylus3::get_MultiTouchEnabled 方法 (rtscom.h)

指示 IRealTimeStylus3 对象是否启用了多点触控输入。

此属性是可读写的。

语法

HRESULT get_MultiTouchEnabled(
  BOOL *pfEnable
);

参数

pfEnable

返回值

备注

下表列出了多点触控的已定义选择加入选项。

名称 说明
TABLET_ENABLE_MULTITOUCHDATA 指示选择加入多点触控数据。 0x01000000
 

示例

以下示例演示如何使用 RealTimeStylus3 接口启用多点触控。


CComQIPtr<IRealTimeStylus3> spRealTimeStylus3 = g_spRealTimeStylus;
if(spRealTimeStylus3 == NULL)
{
    return FALSE;
}
HRESULT hr = spRealTimeStylus3->put_MultiTouchEnabled(TRUE);
if(FAILED(hr))
{
    return FALSE;
}

以下示例演示如何在窗口上显式设置 TABLET_ENABLE_MULTITOUCHDATA 属性。

    
    //Set the window property
    ATOM m_atom = ::GlobalAddAtom(MICROSOFT_TABLETPENSERVICE_PROPERTY);
    m_dwProperty = TABLET_ENABLE_MULTITOUCHDATA;
    ::SetProp(m_hwnd, (LPTSTR)m_atomPenService, (HANDLE)m_dwProperty);
     
    //A Window Property takes effect on the down action of the 1st finger.

    //process the LRESULT from WinProc:

    //A custom LRESULT CALLBACK
    GestureTest::WindowProcedure(      
      HWND hwnd,
      UINT uMsg,
      WPARAM wParam,
      LPARAM lParam)
    {
    case WM_TABLET_QUERYSYSTEMGESTURESTATUS:
        return TABLET_ENABLE_MULTITOUCHDATA;
    }    

要求

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

请参阅

IRealTimeStylus3