User Tools

Site Tools


c:conio.h:gettext

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

c:conio.h:gettext [2013/02/08 19:47]
127.0.0.1 external edit
c:conio.h:gettext [2024/02/16 01:05] (current)
Line 1: Line 1:
 ====== gettext ====== ====== gettext ======
 <code c> <code c>
 +int gettext(int left, int top, int right, int bottom, void *dst)
 </code> </code>
  
 ==== description of gettext ==== ==== description of gettext ====
-gettext is in work by code-reference.com \\  +copy text from a text mode window in memory. 
-if you are faster... don't hasitate and add it+ 
 +stores the text content of the rectangular area of ​​the screen, which is defined by left, top, right and bottom, and also stores it in the storage area pointed to by dst
 +all coordinates are absolute screen coordinates, not window-basedThe top left corner has coordinates (1,1)sequentially reads the contents of the rectangle from the left to right and from top to bottom in the memory. 
 +each screen position is represented by 2 bytes in memory: The first byte contains the characters present in the cell, and the second byte contains the graphic attribute of the cell. The memory requirement for a rectangle with a width of w and a height of h columns goals is defined as follows: 
 + 
 +bytes = (h line) x (w columns) x 2 
 + 
 +returns returns 1 if the operation was successful else 0
  
 <code c> <code c>
-no example at the moment+#include <conio.h> 
 +  
 +int main(void) 
 + { 
 +     
 +    int i; 
 +    char buffer[79]; 
 +    cprintf("This will be stored in the buffer"\n); 
 +    cprintf("This also"\n); 
 +    gettext(1, 1, 80, 25, buffer); 
 +    gotoxy(1, 25); 
 +    clrscr(); 
 +    gotoxy(1, 25); 
 +    cprintf("hit some key to restore"); 
 +    getch(); 
 +    puttext(1, 1, 80, 25, buffer); 
 +    gotoxy(1, 25); 
 +    return 0; 
 + }
 </code> </code>
  
 ===== output of gettext c example ===== ===== output of gettext c example =====
-    no example at the moment+    This will be stored in the buffer 
 +    This also 
 +    hit some key to restore 
 + 
 +    This will be stored in the buffer 
 +    This also 
 +    ...
  

on the occasion of the current invasion of Russia in Ukraine

Russian Stop this War
c/conio.h/gettext.1360349265.txt · Last modified: 2024/02/16 01:03 (external edit)

Impressum Datenschutz