Export (0) Print
Expand All

IRealTimeStylus::SetSingleTabletMode method

Applies to: desktop apps only

Modifies the mode for RealTimeStylus Class (RTS) object to collect input from only one tablet object representing a digitizer attached to the Tablet PC. Stylus input from other digitizers is ignored by the RealTimeStylus.

Syntax

HRESULT SetSingleTabletMode(
  [in]  IInkTablet *piTablet
);

Parameters

piTablet [in]

The IInkTablet Interface object that represents the digitizer device attached to the Tablet PC.

Return value

For a description of the return values, see RealTimeStylus Classes and Interfaces.

Remarks

A RealTimeStylus Class can be set to one of two tablet-related modes:

  • All tablets mode (default)
  • Single tablet mode

If IRealTimeStylus::SetAllTabletsMode Method () was initially called and the RealTimeStylus is enabled, the TPC_E_INVALID_MODE HRESULT is returned.

Examples

The following C++ example code sets a IRealTimeStylus object, g_pRealTimeStylus, to single tablet mode so it can get the tablet and retrieve its plug-and-play identifier. Then it sets the IRealTimeStylus object back to all tablets mode.


// Must be in single tablet mode for GetTablet to succeed. This call to
// SetSingleTabletMode() would likely happen somewhere else in the app.
if (SUCCEEDED(g_pRealTimeStylus->SetSingleTabletMode(pInkTablet)))
{
    IInkTablet* pTablet = NULL;

    if ((SUCCEEDED(g_pRealTimeStylus->GetTablet(&pTablet))) && (NULL != pTablet))
    {
        BSTR bstrPnPID;

        if (SUCCEEDED(pTablet->get_PlugAndPlayId(&bstrPnPID)))
        {
            TRACE("The tablet's Plug-n-Play ID is: %s\n", bstrPnPID);
        }
    }

    // Restore all tablets mode.
    g_pRealTimeStylus->SetAllTabletsMode(TRUE);
}


Requirements

Minimum supported client

Windows XP Tablet PC Edition

Minimum supported server

None supported

Header

RTSCom.h (also requires RTSCom_i.c)

DLL

RTSCom.dll

See also

IRealTimeStylus
RealTimeStylus Class
RealTimeStylus Reference

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012

Community Additions

ADD
Show:
© 2014 Microsoft