Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Retrieves an array containing all of the currently active tablet context identifiers.
Syntax
HRESULT GetAllTabletContextIds(
[in, out] ULONG *pcTcidCount,
[out] TABLET_CONTEXT_ID **ppTcids
);
Parameters
[in, out] pcTcidCount
The number of tablet context identifiers.
[out] ppTcids
Pointer to the array of tablet context identifiers
Return value
For a description of the return values, see RealTimeStylus Classes and Interfaces.
Remarks
IRealTimeStylus::GetAllTabletContextIds Method method provides access to all the tablet context identifiers that are currently active. This method enables you to get these identifiers directly instead of caching data from IStylusPlugin::RealTimeStylusEnabled Method notifications.
The scope of the TabletContextID property is limited to a given instance of the RealTimeStylus Class; a Tablet object may have a different unique identifier for each instance of the RealTimeStylus Class.
Examples
The following C++ example code gets all the tablet context identifiers and uses the first tablet context identifier to get a pointer to the IInkTablet Interface object.
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);
}
}
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP Tablet PC Edition [desktop apps only] |
Minimum supported server | None supported |
Target Platform | Windows |
Header | rtscom.h |
DLL | RTSCom.dll |