Share via


InkEnabled Property

InkEnabled Property

Gets or sets a value that specifies whether the InkPicture control collects pen input (in-air packets, cursor in range events, and so on).

Declaration

[C++]

[propput] HRESULT put_InkEnabled ([in] VARIANT_BOOL InkEnabled);
[propget] HRESULT get_InkEnabled ([out, retval] VARIANT_BOOL*
    InkEnabled);

Property Value

VARIANT_BOOL The Boolean value that specifies whether the InkPicture control collects pen input.

Value Description
TRUE Default. The InkPicture control collects pen input.
FALSE The InkPicture control collects pen input. No pen-related events fire.

This property is read/write.

Return Value

HRESULT value Description
S_OK Success.
E_INK_COLLECTOR_BUSY The control is currently collecting ink and could not be disabled.
E_POINTER The InkEnabled parameter is an invalid pointer.
E_INK_OVERLAPPING_INPUT_RECT The window input rectangle overlaps an enabled object's window input rectangle.
E_INVALIDARG The specified mode is invalid.
E_INK_EXCEPTION An exception occurred.

Remarks

The InkPicture control collects ink in Microsoft® Windows® XP Tablet PC Edition or any edition of Windows 2000, Windows Server 2003, or Windows XP on which the Windows XP Tablet PC Edition Software Development Kit (SDK) is installed. However, handwriting recognition occurs only if Windows XP Tablet PC Edition is installed.

In any edition of Windows 2000, Windows Server 2003, or of Windows XP other than Windows XP Tablet PC Edition, the InkEnabled property is always FALSE if the Tablet PC SDK is not installed.

If the window input rectangle of an enabled object (set in the constructor or with the InkPicture::SetWindowInputRectangle method) overlaps the window input rectangle of another enabled object, the E_INK_OVERLAPPING_INPUT_RECT error is returned.

Note: Overlap can occur without an error as long as only one of the input rectangles is enabled at any time.

While the InkPicture control is not enabled, you receive no events.

When the Enabled property of a container InkPicture control is set to FALSE, all of its contained controls are disabled as well.

You cannot set this property to FALSE while the InkPicture control is collecting ink (the CollectingInk property is TRUE).

For best results, set the Enabled property to FALSE when an application shuts down.

This property must be set to FALSE before setting or calling specific properties and methods of the control. If you try to change the specified properties or call the specified methods, an error occurs. The following properties and methods cannot be set or called unless the Enabled property is first set to FALSE:

  • Properties:
  • Methods:

Applies To