Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 1997-10-15
1
Medium Priority
?
237 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 5

Accepted Solution

by:
y96andha earned 300 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I will show how to use the Ribbon IDs Tool Window to assign the built-in Office icons to a ribbon button.  This tool will help us to find the OfficeImageId that corresponds to our desired built-in Office icon. The tool is part of…
With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
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…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

721 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