I am new to C++, the question I have right now is how do I get the run window to go into full screen. We are useing Visual C++ 6.0
Thank You
WackoWolf
I am new to C++, the question I have right now is how do I get the run window to go into full screen. We are useing Visual C++ 6.0
Thank You
WackoWolf
Search and ye shall find.
When all else fails, read the instructions.
If you're posting code, use code tags: [code] /* insert code here */ [/code]
It will only streach up and down, will not streach from left to righ. I would like it to streach from left to right I don't care about top to bottom
I want to streach from left to right
Do you mean have a program change the screen size? If so, try this to set size:
or try this for full screen:Code:system("mode con:lines=50"); // or whatever numbers you want system("mode con:cols=75");And if you just mean do it manually, right click on the title, go to properties then layout.Code:keybd_event(VK_MENU,0x38,0,0); keybd_event(VK_RETURN,0x1c,0,0); keybd_event(VK_RETURN,0x1c,KEYEVENTF_KEYUP,0); keybd_event(VK_MENU,0x38,KEYEVENTF_KEYUP,0);
Last edited by PJYelton; 10-17-2004 at 07:05 PM.
Hi PJYelton,Originally Posted by PJYelton
That was very useful, thanks. Is there a similar code to position the console on the screen? I find that my extended console opens down off the screen a little the first time the program is run and I'd like to centre it if I can. I ran a search of google and this forum for "console positioning" but could find nothing relevant.
Thanks.
I believe this may be useful. Take a look at the last bit in the code example given.
http://cboard.cprogramming.com/showt...ighlight=COORD
There also may be something about this particular method in the FAQ, although I'm not totally sure.
**EDIT**
Here it is:
http://faq.cprogramming.com/cgi-bin/...&id=1043284385
The last line in the "Windows Option" is what you want.
Last edited by Hunter2; 10-21-2004 at 09:33 PM.
Just Google It. √
(\ /)
( . .)
c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.
Thanks Hunter2,
Does this actually position the console on the screen? Or just the cursor in the console?Code:SetConsoleCursorPosition(hConsole, coordScreen);
And do I need to include some of the other lines of the code together with the above line?
Like:
for example?Code:COORD coordScreen = { 0, 0 };
I have to admit that the syntax (all caps) is new to me so I'm not sure what goes with what. I guess they're tied into things in the windows header?
Thanks for your help.
Is there another way of doing this because I have a program that would work much better if it were a certain size, but for some reason it prevents mouse input (which I need as part of the program) if I use that method.Code:system("mode con:lines=50"); // or whatever numbers you want system("mode con:cols=75");
Thanks
Keyboard Not Found! Press any key to continue. . .
>>I guess they're tied into things in the windows header?
Yup. The console is really a console "window". Console windows are just specialized windows--they have many, but not the same, attributes of routine windows. You can manipulate the console, the cursor, etc. with WinAPI code found in windows.h.
>>And do I need to include some of the other lines of the code together with the above line?
Yes, you need to do the GetStdHandle line and the COORD line (but fill the COORD with the coordinates you want, not 0,0). Look those functions up on MSDN, if you still want more info after:
>>Does this actually position the console on the screen? Or just the cursor in the console?
Oops sorry, I thought you were asking about the cursor
In that case, I don't know how you'd centre the console on the screen Maybe there's a function called SetWindowPos() or something?
Just Google It. √
(\ /)
( . .)
c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.
Thanks Hunter2 and elad. I'll check out the windows.h header and see what I can find.