IRealTimeStylus::GetTablet method

Retrieves an IInkTablet Interface object to the caller.

Syntax


HRESULT GetTablet(
  [out, retval] IInkTablet **ppiSingleTablet
);

Parameters

ppiSingleTablet [out, retval]

A pointer to the IInkTablet Interface object.

Return value

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

Remarks

This method returns, ppiSingleTablet will contain NULL when the RealTimeStylus is receiving data from more that one tablet. For instance, when the IRealTimeStylus::SetAllTabletsMode Method is called with a value of TRUE on a machine with a digitizer and mouse.

Examples

The following C++ example code gets a pointer to the IInkTablet Interface object and uses that pointer to get the tablet's Plug and Play identifier.


// 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 [desktop apps only]

Minimum supported server

None supported

Header

RTSCom.h (also requires RTSCom_i.c)

DLL

RTSCom.dll

See also

IRealTimeStylus
RealTimeStylus Class
RealTimeStylus Class
IInkTablet Interface

 

 

Show: