TextGRAB SDK Documentation | ITextGRABSDK::CaptureFromSelection

Captures the text from target window within target rectangle.

[C/C++]
HRESULT CaptureFromSelection(

INT_PTR hwndTarget,
tagRECT* rect,
BSTR* text

);

[Visual Basic]
object.CaptureFromSelection(

ByVal hwndTarget As INT_PTR,
ByRef rect As tagRECT,
ByRef text As String

)

[C#]
void ITextGRABSDK.CaptureFromSelection(

INT_PTR hwndTarget,
ref tagRECT rect,
ref string text

);

Parameters

hwndTarget
[in] target window handle.
rect
[in] target rectangle screen coordinates.
text
[out] captured formatted text.

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.
E_POINTER (0x80004003) The text parameter is NULL.
S_FALSE (0x00000001) The text could not be captured. Empty string was returned.
FAILED(hr) Appropriate error message.

See Also

ITextGRABSDK interface | tagRECT