TextGRAB SDK Documentation | ITextGRABSDK::RegisterSelectionNotify

Registers the notification receiver window

HRESULT RegisterSelectionNotify(

INT_PTR hwnd


[Visual Basic]

ByVal hwnd As INT_PTR


void ITextGRABSDK.RegisterSelectionNotify(

INT_PTR hwnd



[in] the window handle. If this parameter is NULL – window will be unregistered as WM_SELECTION receiver and won’t receive selection notifications any more.


If some window was registered using this function – it will receive WM_SELECTION message each time user completes the selection process. WM_SELECTION = WM_USER + 1024

Return Value(s)


Return Value(s) Definitions
S_OK (0x00000000) Operation was completed successfully.
E_FAIL (0x80004005) Error.
E_INVALIDARG (0x80070057) The hwnd parameter is not a valid window handle.
FAILED(hr) Appropriate error message.

See Also

ITextGRABSDK interface