ILMScrCapUserCallback2 Interface

This is a user callback interface that should be implemented and registered using SetCallbackObject2 method of the ILMScrCap interface.

This interface should be used for C++, .NET or other programming languages that can cast a LONGLONG (__int64) to a pointer.

Methods

HRESULT WindowDataProc (long lWindow, WindowSelectStatusConstants WindowStatus, LONGLONG pUserData)

Description

Reports the window selection events when the window selection tool is active.

Parameters

lWindow

The window handle of the window under the mouse cursor.

WindowStatus

A constant that specifies the event for which the method is called. Possible values are:

Value Meaning
WINDOW_SELECT_STATUS_UPDATE The mouse is moved over a new window.
WINDOW_SELECT_STATUS_SELECTED The left button is pressed; the selection is done.
WINDOW_SELECT_STATUS_CANCELED The selection process is canceled. The selection process can be canceled by pressing the Esc key.

pUserData

Pointer to user-defined data passed to pUserData parameter of SetCallbackObject2 method of the ILMScrCap interface.

Comments

This method will be called in the following situations:

  1. When the mouse moves, provided that the window under the cursor is different from the previously reported window.

  2. When the selection process is canceled. The selection process can be canceled by pressing the Esc key.

  3. When the selection process is concluded, by pressing the left button of the mouse.

Returns

Return Description
S_OK Successful.
S_FALSE Otherwise.

HRESULT RegionDataProc (long lLeft, long lTop, long lRight, long lBottom, LONGLONG pUserData)

Description

Reports thew region selection when the region selection tool is active.

Parameters

lLeft

left border of the selected region in screen coordinates.

lTop

top border of the selected region in screen coordinates.

lRight

right border of the selected region in screen coordinates.

lBottom

bottom border of the selected region in screen coordinates.

pUserData

pointer to user-defined data passed to pUserData parameter of SetCallbackObject2 method of the ILMScrCap interface.

Comments

This method is called only when the user releases the left button of the mouse indicating the end of region selection.

For more information on selecting a region, refer to the SelectRegionTool method of the ILMScrCap interface.

Returns

Return Description
S_OK Successful.
S_FALSE Otherwise.

HRESULT NotifyCallbackProc (NotifyCallbackConstants NotifyCallback, LONGLONG pUserData)

Description

The filter will call this method when the capture source window is closed, minimized, changed or the selected region dimensions exceeded the lower/upper width/height values.

Parameters

NotifyCallback

Constant that indicates the event for which this method was called. Possible values are:

Value Meaning
NOTIFY_CLOSE The window (capture source) has been closed.
NOTIFY_MINIMIZE The window (capture source) has been minimized.
NOTIFY_AREACHANGE The capture area of the window has been changed; this happens if the window was resized or the visible area was changed.
NOTIFY_CAPWIDTH_EXCEEDED_LIMIT The selected region width exceeded the values in LowerWidthLimit or/and UpperWidthLimit properties.
NOTIFY_CAPHEIGHT_EXCEEDED_LIMIT The selected region height exceeded the values in LowerHeightLimit or/and UpperHeightLimit properties.

pUserData

Pointer to user-defined data passed to pUserData to SetCallbackObject2 method of the ILMScrCap interface.

Returns

Return Description
S_OK Successful.
S_FALSE Otherwise.
Help Version 22.0.2023.2.15
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Filters C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.