hWnd Property

hWnd Property

Gets or sets the handle value of the window on which ink is drawn.

Declaration

[C++]

[propput] HRESULT put_hWnd ([in] long hWnd);
[propget] HRESULT get_hWnd ([out, retval] long* hWnd);

[Microsoft® Visual Basic® 6.0]

Public Property Get hWnd As Long
Public Property Let hWnd(ByVal thehWnd As Long)

Property Value

long Gets or sets the pointer that specifies the handle value of the window on which ink is drawn.

The default value is NULL.

This property is read/write.

Return Value

HRESULT value Description
S_OK Success.
E_POINTER The hWnd parameter is an invalid pointer.
E_INK_EXCEPTION An exception occurred inside the method.

Remarks

If two or more windows exist, this property allows you to specify which window collects ink.

Note: The InkCollector object or the InkOverlay object must be disabled before setting this property. To disable the InkCollector or InkOverlay objects, set the Enabled property to FALSE. You can then set the hWnd property and re-enable the object by setting the Enabled property to TRUE.

In Automation, this property is called hWnd.

Example

[Visual Basic 6.0]

This Visual Basic 6.0 example returns the handle of the window on which ink is drawn.

'Get the previously assigned window handle from theInkCollector.
Dim theHandle As Long
theHandle = theInkCollector.hWnd

Applies To