I want to write a scroll text function for a console mode application for win32 but I have no idea how to do that. This scroll function should be the same as it is in windows. I need some tips and ideas how to write a scroll funtion.

Now, when I'll press the DOWN button the (line 8) will appear and (line 1) will disappear. If i press UP button (line 8) will disappear and (line 1) will appear. Get it?!

How to do that ???

I'm using VC++ .NET on WinXP.

And thank you in advance for your help.

07-13-2002

Hammer

You could store all lines in an array, called say "lines", which would have 8 indexes.
>lines[8];
Then, simply have an int that represents the first array index to be displayed (called Top), and another denoting the number of lines to be displayed (ScreenSize). When the users presses up/down, change the value of the Top, and redraw.