Solved

How do I create a console window with a scrollbar in Win32/SDK?

Posted on 1997-10-15
1
223 Views
Last Modified: 2013-12-03
I have a Win-32 GUI application which uses a console window to display output of "printf" type functions.  I created the console window using AllocConsole(), and redirected the stream stdout to the console STDOUT.  However the console window does not appear with scroll bar so I cannot scroll up to see all of my output sent to the console
window.  Any suggestions on how to create console window with scrollbars?  

Thanks,
daniel


--
Daniel G. Chandran              Phone: (609) 386-8600  Ext: 127
Panasonic AVC American Labs.        Fax: (609) 386-4999
95D Conneticut Drive                e-mail: daniel@research.panasonic.com
Burlington, NJ 08016
0
Comment
Question by:danchandran
1 Comment
 
LVL 5

Accepted Solution

by:
y96andha earned 100 total points
ID: 1407605
Use the SetConsoleScreenBufferSize function to change the buffer size. By doing this, you can specify how many scrollback lines you want. The following code sample sets the buffer size to 500 lines.

COORD co;
co.X = 80;
co.Y = 500;
SetConsoleScreenBufferSize(GetStdHandle(STD_OUTPUT_HANDLE), co);

0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now