|
INT GetText( |
|
INT xPos, |
|
|
INT yPos, |
|
|
LPTSTR lpszBuffer, |
|
|
INT nLength |
|
); |
INT GetText( |
|
INT xPos, |
|
|
INT yPos, |
|
|
CString& strBuffer, |
|
|
INT nLength |
|
); |
INT GetText( |
|
LPTSTR lpszBuffer, |
|
|
INT nLength |
|
); |
INT GetText( |
|
CString& strBuffer, |
|
|
INT nLength |
|
); |
The GetText method copies a block of text from the
specified virtual display into a string buffer.
Parameters
- xPos
- The starting column where the display text will be copied from.
If the method is called where this argument is omitted, the text
will be copied from the current cursor position.
- yPos
- The starting row where the display text will be copied from. If
the method is called where this argument is omitted, the text will
be copied from the current cursor position.
- lpszBuffer
- Pointer to the buffer that the display text will be copied to,
terminated with a null character character. This argument may also be a
CString object which will contain the text when the method
returns.
- nLength
- Maximum number of characters that may be copied into the
specified buffer, including the null character terminator. If a CString
object is passed to the method, this value may be -1 which
specifies that all of the text from the specified position to the
last column and row should be copied to the buffer.
Return Value
If the method succeeds, the return value is the number of
characters copied into the buffer, not including the null character
terminator. If the method fails, it returns zero.
Remarks
The GetText method allows the application to copy the
contents of the display at a specific location. Note that the buffer
must be large enough to accommodate the text and the null character
terminator. To copy an entire row of text in the display, use the
GetLine method.
Requirements
Minimum Desktop Platform: Windows 7 (Service Pack 1)
Minimum Server Platform: Windows Server 2008 R2 (Service Pack 1)
Header File: cstools10.h
Import Library: csnvtv10.lib
Unicode: Implemented as Unicode and ANSI versions.
See Also
GetLine,
Update, Write
|
|