Aesthetics

I have a programm that has a title: "Bienvenido al Libro de Calificaciones" and I want it to remain there the time I want.

Is it possible to keep it there, no matter how much I write to the console? :/

And, is it possible to change the font of the console?
Yes. You want to create a scroll region or "subwindow" on the console.

This is, unfortunately, not all that simple, especially if you plan for your program to work cross-platform.

What you should do is look into NCurses (*nixen) / PDCurses (Windows). This is the simplest way to do it.

If you have already invested a lot into making your program work with the standard terminal streams, that is an easy fix. Write yourself a custom streambuf that outputs through the Curses functions, and at the beginning of your program make sure to swap out the standard streambuf with your custom one on the cout and cerr objects. (Make sure to do the same for cin if you want to be complete.)


Alternately, if you know that your application is going to be used in a GUI system, you can just set the window title. This is a pretty easy thing to do cross-platform on Linux, and very easy on Windows.

Good luck!
Thanks for you answer! :D Do you have a nice piece of code that can do that? :( I'm practicly starting and don't know how to do that.
Alas, there is a learning curve. Fortunately, there is a very good document to get you started:

http://tldp.org/HOWTO/NCURSES-Programming-HOWTO/

I have a number of working curses examples up, but I don't have the time ATM to find them all. You can pick through this if you want:
https://www.google.com/search?q=site%3Acplusplus.com+duoas+ncurses

Good luck!
Thanks man!
Topic archived. No new replies allowed.