Export (0) Print
Expand All

InkCollector.Enabled property

Applies to: desktop apps only

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

This property is read/write.

Syntax

HRESULT put_Enabled(
  [in]           VARIANT_BOOL Collecting
);

HRESULT get_Enabled(
  [out, retval]  VARIANT_BOOL *Collecting
);

Property value

VARIANT_TRUE to collect pen input; otherwise, VARIANT_FALSE.

Error codes

NameMeaning
S_OK

Success.

E_INK_COLLECTOR_BUSY

The object is currently collecting ink. The object could not be disabled.

E_INK_EXCEPTION

An exception occurred.

E_INK_OVERLAPPING_INPUT_RECT

The window input rectangle overlaps with an enabled object's window input rectangle.

E_INK_WINDOW_NOT_SET

The HWND has an invalid value before setting the Enabled parameter to TRUE.

E_INVALIDARG

The specified mode is invalid.

E_POINTER

The Enabled parameter is an invalid pointer.

Remarks

If an enabled object's window input rectangle (set in the constructor or with the SetWindowInputRectangle method) of an enabled object overlaps the window input rectangle of another enabled object, the E_INK_OVERLAPPING_INPUT_RECT error is returned. Overlap can occur without an error as long as only one of the input rectangles is enabled at any known time.

While an object is not enabled, you receive no events.

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

You cannot set the Enabled property to FALSE while the object is collecting ink (CollectingInk property is TRUE).

We recommend that you set Enabled set to FALSE when the application shuts down.

Note  Setting this property within certain message handlers can result in the underlying function being re-entered, causing unexpected results. Take care to avoid a reentrant call when handling any of the following messages: WM_ACTIVATE, WM_ACTIVATEAPP, WM_NCACTIVATE, WM_PAINT; WM_SYSCOMMAND if wParam is set to SC_HOTKEY or SC_TASKLIST; and WM_SYSKEYDOWN (when processing Alt-Tab or Alt-Esc key combinations). This is an issue with single-threaded apartment model applications.

This property must be set to FALSE before setting or calling specific properties and methods of the object. If you try to change the specified properties or 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

Requirements

Minimum supported client

Windows XP Tablet PC Edition

Minimum supported server

None supported

Header

Msinkaut.h (also requires Msinkaut_i.c)

Library

InkObj.dll

See also

InkCollector Class
AttachMode Property
CollectingInk Property
CollectionMode Property [InkCollector Class]
EditingMode Property [InkOverlay Class]
hWnd Property
Ink Property [InkCollector/InkOverLay Class]
MarginX Property
MarginY Property
SetAllTabletsMode Method
SetSingleTabletIntegratedMode Method
SetWindowInputRectangle Method

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012

Community Additions

ADD
Show:
© 2014 Microsoft