Header File
conio.h
Category
Console I/O Routines
Prototype
int movetext(int left, int top, int right, int bottom, int destleft, int desttop);
Description
Copies text onscreen from one rectangle to another.
movetext copies the contents of the onscreen rectangle defined by left, top, right, and bottom to a new rectangle of the same dimensions. The new rectangle’s upper left corner is position (destleft, desttop).
All coordinates are absolute screen coordinates. Rectangles that overlap are moved correctly.
movetext is a text mode function performing direct video output.
Note:Do not use this function in Win32 GUI applications.
Return Value
On success, movetext returns nonzero.
On error (for example, if it failed because you gave coordinates outside the range of the current screen mode), movetext returns 0.
Example
#include <conio.h> #include <string.h> int main(void) { char *str = "This is a test string"; clrscr(); cputs(str); getch(); movetext(1, 1, strlen(str), 2, 10, 10); getch(); return 0; }
Portability
POSIX |
Win32 |
ANSI C |
ANSI C++ |
|
+ |
|
|
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|