You can transfer the character contents of designated parts of a window to a string, and vice versa, with the video string copy function, v_stcpy():
|
||
|
|
|
|
|
|
|
|
|
|
|
|
The window parts are listed in Table 26.1.
Table 26.1: Window Parts
| Window Part | Description |
| ROW | Entire row on which the virtual cursor is located. |
| ENDROW | From location of virtual cursor to end of row. |
| COL | Entire column on which the virtual cursor is located. |
| ENDCOL | From the location of virtual cursor to the last row in this column. |
| WN | Entire window buffer. |
| ENDWN | Row on which the virtual cursor is located to end of window. |
The window parts refer to parts of the window buffer. Thus, if you specify COL when copying a string from the window, the entire column of the buffer on which the virtual cursor is located is copied to the string. If you specify WN, the entire buffer associated with the window is copied.
If the direction argument in the call is specified as FROM_WN, the characters in the specified part of the window are copied into the string. A null terminator '\0' is appended.
If the direction argument is specified as TO_WN, the contents of the string are written to the specified part of the window. When you move a string into a window, it will be written with the current window attribute.
v_stcpy() returns the number of bytes it transferred, that is, the number of characters moved.