- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When you write reams of text to a console is there a way in which text that has rolled off the window can be retrieved ? It must be possible to endow the console window with scroll bars so that you can review whatever text was written to it no matter how many screens ago.
Hope you can help,
Gerry T.
Hope you can help,
Gerry T.
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Not that I know of. You can enlarge the console window to include scroll bars - on Windows NT/2000, you can configure the window to have as many lines as you want, but on Windows 9x, 50 is the maximum.
Steve
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes the CVF docs state that:
On a Windows NT or Windows 2000 system, the number of character lines is substantially larger than on Windows 98, Windows Me, and Windows 95 systems.
However, I haven't been able to find out how much larger nor how to set the number of lines. If you can find out I'd appreciate it as this would answer my question.
Thanks,
Gerry T.
On a Windows NT or Windows 2000 system, the number of character lines is substantially larger than on Windows 98, Windows Me, and Windows 95 systems.
However, I haven't been able to find out how much larger nor how to set the number of lines. If you can find out I'd appreciate it as this would answer my question.
Thanks,
Gerry T.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I found a clue in the CVF confunc sample. Essentially having AllocConsole(d), do
...
fhandle = GetStdHandle(STD_OUTPUT_HANDLE)
wsize.x = 80 ! must be >= currently set console window line length
wsize.y = 5000 ! must be >= currently set console window no of lines
! get a console buffer bigger than the console window which will give
! scroll bars on the console window to scroll through the console buffer
statConsole = SetConsoleScreenBufferSize(fhandle, wsize)
I post this on the off chance that it might be useful to someone else.
Two things:
1. what's the upper limit on wsize.x/y?
2. What's the difference between the 'handle' provided by GetStdHandle and by FindWindow? They are numerically different and seem to serve different purposes.
Ciao,
Gerry T.
...
fhandle = GetStdHandle(STD_OUTPUT_HANDLE)
wsize.x = 80 ! must be >= currently set console window line length
wsize.y = 5000 ! must be >= currently set console window no of lines
! get a console buffer bigger than the console window which will give
! scroll bars on the console window to scroll through the console buffer
statConsole = SetConsoleScreenBufferSize(fhandle, wsize)
I post this on the off chance that it might be useful to someone else.
Two things:
1. what's the upper limit on wsize.x/y?
2. What's the difference between the 'handle' provided by GetStdHandle and by FindWindow? They are numerically different and seem to serve different purposes.
Ciao,
Gerry T.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page