473,398 Members | 2,343 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Changing size of Win2k/XP console?

Hi, I'm quite a newbie but I've managed to google around before asking
stupid Q's here.

I'm wrestling with little (amateurish) console program and I would like
change its size. I also know that it could be done with Windows API call. I
tried doing that myself but no good.

Could anyone help me?

Jul 21 '05 #1
5 2071
Sheeps United wrote:
Hi, I'm quite a newbie but I've managed to google around before asking
stupid Q's here.

I'm wrestling with little (amateurish) console program and I would like
change its size. I also know that it could be done with Windows API call. I
tried doing that myself but no good.

Could anyone help me?


Which Windows API call did you try using? Can you show us a line or two
of code that you tried? Most likely then someone will be able to point
out what went wrong and it will work. (Chances are that very few here
know the API call required, so by not mentioning it you're severely
limiting the number of answers you are likely to get.)

-Peter
Jul 21 '05 #2
"Peter Hansen" <pe***@engcorp.com> wrote in message
news:I9********************@powergate.ca...
Which Windows API call did you try using? Can you show us a line or two
of code that you tried? Most likely then someone will be able to point
out what went wrong and it will work. (Chances are that very few here
know the API call required, so by not mentioning it you're severely
limiting the number of answers you are likely to get.)


No actual code, yet.

I'm far from sure if it's the right one, but I think it could be
SetConsoleScreenBufferSize from Kernel32. Hrr, for some reason I have nasty
feeling in back of my head... That could also be totally wrong way of
approaching.

Jul 21 '05 #3
SetConsoleWindowInfo looks like a better candidate. See
http://tinyurl.com/budzk
(I.e.
http://msdn.microsoft.com/library/de...windowinfo.asp)

Haven't tried it though. Good luck!

Jul 21 '05 #4
Referring to the documenation you will have to use that function and
SetConsoleWindowInfo to get the effect you want. Basically
SetConsoleScreenBufferSize sets the size for the console and
SetConsoleWindowInfo sets the size for the window containing the console. The
window size can't be bigger that the console size. If the console size is
bigger than the window, you will end up with scrollbars.
http://msdn.microsoft.com/library/de...buffersize.asp
http://msdn.microsoft.com/library/de...buffersize.asp

You might want the get function as well:
GetConsoleScreenBufferInfo
http://msdn.microsoft.com/library/de...buffersize.asp

When in doubt about the Microsoft API see the MSDN.

-Chris

-Chris
On Thu, Jul 14, 2005 at 11:48:09PM +0300, Sheeps United wrote:
"Peter Hansen" <pe***@engcorp.com> wrote in message
news:I9********************@powergate.ca...
Which Windows API call did you try using? Can you show us a line or two
of code that you tried? Most likely then someone will be able to point
out what went wrong and it will work. (Chances are that very few here
know the API call required, so by not mentioning it you're severely
limiting the number of answers you are likely to get.)


No actual code, yet.

I'm far from sure if it's the right one, but I think it could be
SetConsoleScreenBufferSize from Kernel32. Hrr, for some reason I have nasty
feeling in back of my head... That could also be totally wrong way of
approaching.

--
http://mail.python.org/mailman/listinfo/python-list

Jul 21 '05 #5
Sheeps United wrote:
I'm far from sure if it's the right one, but I think it could be
SetConsoleScreenBufferSize from Kernel32. Hrr, for some reason I have nasty
feeling in back of my head... That could also be totally wrong way of
approaching.


I have the source code to a win32-console program lying around, and it
uses SetConsoleScreenBufferSize from C++ to do just that.
Jul 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Hal Vaughan | last post by:
I'm testing a GUI app on a couple Linux boxen and one Win2k box. I'm using Java 1.4.2 on each (or the closest on Win2k -- whatever version comes close). On one Linux box and the Win2k box the...
4
by: GujuBoy | last post by:
i have a ansi.py file that i use in LINUX to change the text color to STDOUT when i use the "print" function...but when i move this ansi.py file over the windows...it does not work is there a...
4
by: Brad Jones | last post by:
<Previously posted in microsoft.public.dotnet.framework.windowsforms> Hi all. Any suggestions here would be appreciated. Thanks for reading. I'm primarly a C++ developer but I've been trying to...
31
by: Arthur Shapiro | last post by:
I'm the webmaster for a recreational organization. As part of one page of the site, I have an HTML "Calendar at a Glance" of the organization's events for the month. It's a simple table of a...
6
by: alanknipmeyer | last post by:
Hi, I`m in the process of migrating a Access 2002 (Run in 2000 mode) from Windows 98 to Win2K Server. It is a shared resource via a file share on the 98 Server. Client systems are Win98 with the...
3
by: Dirk Reske | last post by:
Hello, I have the following struct: public struct WAVEFORMATEX { public UInt16 wFormatTag; //2 bytes public UInt16 nChannels; //2 bytes public UInt32 nSamplesPerSec; //4 bytes...
6
by: Ioannis Demetriades | last post by:
Hi, I need to change the printer's font to "control" -a printer font, and then send a sequence of characters to the printer. My problem is that I cannot change the printer's font. Can this be...
7
by: Jeffrey Spoon | last post by:
Hello, I'm a bit stuck trying to convert a text file which contains extended ASCII text and changing the ASCII values so they become readable. I do this by subtracting 127 from the ASCII value....
3
by: bulldog8 | last post by:
I am having problems with changing a frames source file for Mozilla (1.5.0.4). The followig code works for IE: <script type="text/javascript"> var imgP = new Image(); function...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.