VIEW PRINT in C(++) - Printable Version +- Qbasicnews.com (http://qbasicnews.com/newforum) +-- Forum: General (http://qbasicnews.com/newforum/forum-6.html) +--- Forum: General/Misc (http://qbasicnews.com/newforum/forum-18.html) +---- Forum: General Programming (http://qbasicnews.com/newforum/forum-20.html) +---- Thread: VIEW PRINT in C(++) (/thread-7835.html) |
VIEW PRINT in C(++) - rpgfan3233 - 08-02-2005 I was wondering if there was a C/C++ function that allows the freezing a certain part of the screen in a console program, similar to the VIEW PRINT statement in QB. I know of the gotoxy() function, which would kind of emulate it. Unfortunately, that is Borland-specific, and I'm using functions that are not compiler-specific where possible. By the way, I'm developing in Windows, using Dev-C++'s default compiler (MinGW32, I believe). Edit: Almost forgot to mention that I'm a newb to C/C++. VIEW PRINT in C(++) - eno_on - 08-02-2005 You can do it in DOS32 with DJGPP if you write your own locate statement. Otherwise, use FB. VIEW PRINT in C(++) - Mango - 08-07-2005 This is windows specific, but... I wrote some code that lets me write to arbitrary coordinates of the console window. It would be easy to use my code to make the equivalent of a view port. In case you are dev-c++ novice, save the 3 files shown below. Create an empty project. Give it a name. Then "add to project" the three files. Then compile. The first two files are needed to use this code in your own projects. The third file tests/demonstrates how to use the functions. The function is easy to use...eg: my::cout(x,y) << "your text here"; my_cout.h Code: #include <iostream> my_cout.cpp Code: #include "my_cout.h" my_cout_Tester.cpp Code: #include "my_cout.h" VIEW PRINT in C(++) - neuro - 10-09-2005 SetConsoleCursorPosition is win32 specific... it will do the trick if you don't care about cross-platform code. Otherwise, what you want to learn is probably ncurses. man ncurses. |