Skip to content

Latest commit

 

History

History
125 lines (94 loc) · 5.17 KB

nf-rtscom-irealtimestylus-gettabletcontextidfromtablet.md

File metadata and controls

125 lines (94 loc) · 5.17 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:rtscom.IRealTimeStylus.GetTabletContextIdFromTablet
IRealTimeStylus::GetTabletContextIdFromTablet (rtscom.h)
Retrieves the TabletContextId property that is associated with a given tablet digitizer object.
9f4cc882-c25f-4862-8b78-4db108d0b5d4
GetTabletContextIdFromTablet
GetTabletContextIdFromTablet method [Tablet PC]
GetTabletContextIdFromTablet method [Tablet PC]
IRealTimeStylus interface
IRealTimeStylus interface [Tablet PC]
GetTabletContextIdFromTablet method
IRealTimeStylus.GetTabletContextIdFromTablet
IRealTimeStylus::GetTabletContextIdFromTablet
rtscom/IRealTimeStylus::GetTabletContextIdFromTablet
tablet.irealtimestylus_gettabletcontextidfromtablet
tablet\irealtimestylus_gettabletcontextidfromtablet.htm
tablet
9f4cc882-c25f-4862-8b78-4db108d0b5d4
12/05/2018
9f4cc882-c25f-4862-8b78-4db108d0b5d4, GetTabletContextIdFromTablet, GetTabletContextIdFromTablet method [Tablet PC], GetTabletContextIdFromTablet method [Tablet PC],IRealTimeStylus interface, IRealTimeStylus interface [Tablet PC],GetTabletContextIdFromTablet method, IRealTimeStylus.GetTabletContextIdFromTablet, IRealTimeStylus::GetTabletContextIdFromTablet, rtscom/IRealTimeStylus::GetTabletContextIdFromTablet, tablet.irealtimestylus_gettabletcontextidfromtablet
rtscom.h
Windows
Windows XP Tablet PC Edition [desktop apps only]
None supported
RTSCom.dll
Windows
19H1
IRealTimeStylus::GetTabletContextIdFromTablet
rtscom/IRealTimeStylus::GetTabletContextIdFromTablet
c++
APIRef
kbSyntax
COM
RTSCom.dll
IRealTimeStylus.GetTabletContextIdFromTablet

IRealTimeStylus::GetTabletContextIdFromTablet

-description

Retrieves the TabletContextId property that is associated with a given tablet digitizer object.

-parameters

-param piTablet [in]

Specifies the tablet object associated with a digitizer for which to get the unique identifier for the tablet context.

-param ptcid [out, retval]

The unique identifier for the tablet context.

-returns

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

-remarks

A digitizer context identifier is specific to an RealTimeStylus Class object. Two RealTimeStylus Class objects may have different context identifiers for the same digitizer object. A tablet context identifier is valid only while a RealTimeStylus Class object is enabled. If a RealTimeStylus Class object is disabled and then re-enabled, the TCID for each digitizer object might have a different value than it had when the RealTimeStylus Class object was first enabled.

This method can be called even if the RealTimeStylus Class object is not enabled as long as the RealTimeStylus Class has not finished processing data in the queue. This method can be called until the last asynchronous plug-in receives IStylusPlugin::RealTimeStylusDisabled Method.

Examples

The following C++ example code gets a pointer to the IInkTablet object and uses that to get the tablet context identifier. Then it displays the names of all the tablets attached to the system in the debug output window.

TABLET_CONTEXT_ID* pTcids = NULL;
TABLET_CONTEXT_ID tcid = 0;
ULONG ulTcidCount = 0;
IInkTablet* pInkTablet = NULL;

if (SUCCEEDED(g_pRealTimeStylus->GetAllTabletContextIds(&ulTcidCount, &pTcids)))
{
    TRACE("Got the tablet context ID array.\n");

    // Loop through all the tablets on the system
    for (ULONG i = 0; i < ulTcidCount; i++)
    {
        // Get the tablet from the context ID
        if (SUCCEEDED(g_pRealTimeStylus->GetTabletFromTabletContextId(pTcids[i], &pInkTablet)))
        {
            // Display the name of the tablet in debug output
            BSTR bstrName;
            if (SUCCEEDED(pInkTablet->get_Name(&bstrName)))
            {
                TRACE("The name of tablet %d is %s.\n", i, bstrName);
            }
        }
    }

    // Get the context ID from the tablet
    if (SUCCEEDED(g_pRealTimeStylus->GetTabletContextIdFromTablet(pInkTablet, &tcid)))
    {
        TRACE("The context ID of the tablet is %d\n", tcid);
    }
}

-see-also

IRealTimeStylus

IRealTimeStylus::GetTabletFromTabletContextId Method

RealTimeStylus Class