Windows Dev Center

IRealTimeStylus3::MultiTouchEnabled property

Indicates whether the IRealTimeStylus3 object has multitouch input enabled.

This property is read/write.

Syntax


HRESULT put_MultiTouchEnabled(
  [in]  BOOL fEnable
);

HRESULT get_MultiTouchEnabled(
  [out] BOOL fEnable
);

Property value

BOOL

Error codes

On success, returns S_OK; otherwise, returns an error code.

Remarks

The following table lists the defined opt-in options for multitouch.

NameDescriptionValue
TABLET_ENABLE_MULTITOUCHDATAIndicates opt-in for multitouch data.0x01000000

 

Examples

The following example demonstrates how to enable multitouch using the RealTimeStylus3 interface.



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

The following example shows how to explicitly set the TABLET_ENABLE_MULTITOUCHDATA property on a window.


    
    //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;
    }    


Requirements

Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

Header

Rtscom.h

See also

IRealTimeStylus3

 

 

Community Additions

ADD
Show:
© 2015 Microsoft