CTerminalEmulator::GetLine Method  
 
INT GetLine(
  INT nRow,  
  LPTSTR lpszBuffer,  
  INT nMaxLength  
);
INT GetLine(
  INT nRow,  
  CString& strBuffer  
);

The GetLine method copies a block of text from the specified virtual display into a string buffer.

Parameters

nRow
The row in the virtual display to return the line of text from. The first row in the display is zero. If the value -1 is specified, the row where the cursor is currently located will be used.
lpszBuffer
Pointer to the buffer that the display text will be copied to, terminated with a null character character.
cbBuffer
Maximum number of characters that may be copied into the specified buffer, including the null character terminator.

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 GetLine method allows the application to copy the contents of the display at a specific row. Note that the buffer must be large enough to accommodate the text and the null character terminator. Unlike the GetText method, any trailing whitespace in the specified row is not copied to the buffer.

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

GetText, Update, Write