Welcome to Dream.In.Code
Become a C++ Expert!

Join 149,938 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,417 people online right now. Registration is fast and FREE... Join Now!




Dos Window size

 
Reply to this topicStart new topic

Dos Window size

Whizzy
3 Dec, 2007 - 02:13 PM
Post #1

Unregistered





I am using DEV-C 4.9.9.2, a console app.

Hello all,

Can anyone tell me how to control the size of the Dos Window, or maybe go full screen? I thank you for your time and advice.

Whizzy

+Quote Post

Sunhay
RE: Dos Window Size
3 Dec, 2007 - 02:31 PM
Post #2

New D.I.C Head
*

Joined: 3 Jul, 2007
Posts: 31


My Contributions
im guessing its same as command prompt.
if it is....
rightclick header---> properties ----- look at displayoptions and check off "full screen"
User is offlineProfile CardPM
+Quote Post

Whizzy
RE: Dos Window Size
4 Dec, 2007 - 06:29 AM
Post #3

Unregistered





QUOTE(Sunhay @ 3 Dec, 2007 - 03:31 PM) *

im guessing its same as command prompt.
if it is....
rightclick header---> properties ----- look at displayoptions and check off "full screen"



I apologize. I see I failed to make myself clear. My bad!

Is there anyway to control the size of the dos box within the program.
Say I wanted to start off with the standard size box, and when you hit a certain point in the program, it automatically jumps to full screen mode.
Thank you.
Whizzy

+Quote Post

NickDMax
RE: Dos Window Size
4 Dec, 2007 - 08:26 AM
Post #4

2B||!2B
Group Icon

Joined: 18 Feb, 2007
Posts: 2,869



Thanked: 53 times
Dream Kudos: 550
My Contributions
Working from within windows (I assume that is what you mean by "DOS Window") you can do it (I can't speak for unix/linux).

First you need to know, do you want to maximize the window but still remain in a graphics mode, or do you want to jump into a non-graphics mode? I will assume you mean a non-graphics mode since you said "full screen" and the console does not really ever go "full screen" (though you can change the height/width in characters and maximize the window and cover most of the screen).

The WIN API fucntion you need is "SetConsoleDisplayMode", chances are that it is not defined in your wincon.h (it was not in mine anyway) but once you know the name of the API funciton you can search for it on google and find some answers:

the best version I have found is here.

Basically you use look up the function in the Kernal32.dll and use a function pointer to access it.

There is also the option of sending a ctrl+enter key combination to the window using SendMessage(), that should also change the window to text mode.

Note that windows Vista does not like text mode applications and will probably refuse the mode change.
User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 1/8/09 04:33PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month