CopyToScreenMemory

Copies a rectangular region into screen memory

Local Servers:nonblocking
Remote Servers:N/A
Classification:3.x, 4.x, 5.x, 6.x
Service:Screen Handling

Syntax

  #include <nwconio.h>  
   
  void CopyToScreenMemory  (  
     WORD    height,   
     WORD    width,   
     BYTE   *Rect,   
     WORD    beg_x,   
     WORD    beg_y); 
  

Parameters

height

(IN) Specifies the number of rows in the rectangular region.

width

(IN) Specifies the number of columns in the rectangular region.

Rect

(IN) Points to the data to be copied into screen memory.

beg_x

(IN) Specifies the starting column in the rectangular region.

beg_y

(IN) Specifies the starting row in the rectangular region.

Remarks

The CopyToScreenMemory function copies a rectangular region, whose size is specified by width and height, into screen memory, starting from column beg_x and row beg_y.

Ensure that:

  • beg_x + width is less than or equal to the number of columns on the screen (currently always 80).

  • beg_y + height is less than or equal to the number of rows on the screen (currently always 25).

The rectangle is clipped to the screen’s borders if it is too big.

If either beg_x or beg_y is greater than either SCREEN_COLUMNS or SCREEN_ROWS, the function returns without doing anything to the screen.

The size of the array Rect must be:

  (2 * width * height) 
  

The array Rect is an array of char attribute pairs:

     struct cell {  
        char   charValue;  
        char   attribute;  
     }; 
  

See Also

CopyFromScreenMemory