InkDesktopHost.CreateAndInitializeInkPresenter method

Creates an IInkPresenterDesktop object on an application thread, connects it to the app's DirectComposition visual tree, and sets the size of the object.

Syntax

HRESULT CreateAndInitializeInkPresenter(
  [in]  IUnknown *rootVisual,
  [in]  float    width,
  [in]  float    height,
  [in]  REFIID   riid,
  [out] void     **ppv
);

Parameters

  • rootVisual [in]
    The IDCompositionVisual of the app.

  • width [in]
    The width, in pixels, of the inking area.

  • height [in]
    The height, in pixels, of the inking area.

  • riid [in]
    A reference to the interface identifier of an IInkPresenterDesktop object.

  • ppv [out]
    Address of a pointer variable that receives the interface pointer identified by riid.

Return value

If successful, returns the requested interface pointer. Otherwise, returns NULL.

Requirements

Minimum supported client

Windows 10

Minimum supported server

None supported

Header

InkPresenterDesktop.h

IDL

InkPresenterDesktop.idl

IID

IID_IInkDesktopHost is defined as 4ce7d875-a981-4140-a1ff-ad93258e8d59

See also

InkDesktopHost

Pen and stylus interactions

Samples

Ink sample

Simple ink sample

Complex ink sample