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

Join 137,186 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 2,345 people online right now. Registration is fast and FREE... Join Now!




Fullscreen in Vista

 
Reply to this topicStart new topic

Fullscreen in Vista, My programs won't run fullscreen in Vista

lanec42
27 May, 2008 - 06:58 PM
Post #1

D.I.C Head
**

Joined: 25 Mar, 2008
Posts: 144


My Contributions
I bought a new laptop yesterday, and it has Vista. (sob)
A few of my C++ programs do a fullscreen thing in XP, but won't go in Vista. When I try to run them, I get a message saying "This system does not support fullscreen mode.", and then it works, just in the default cmd window size. I am using Dev-C++, but I don't think that that's where the problem is.

This is the way that I initiated fullscreen:
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);


Why won't fullscreen work with Vista, and is there a way that I can make it? I want something that will only exist within the program. (No external software.)
User is offlineProfile CardPM
+Quote Post

skater_00
RE: Fullscreen In Vista
28 May, 2008 - 12:58 AM
Post #2

D.I.C Head
Group Icon

Joined: 30 Apr, 2008
Posts: 173



Thanked: 4 times
Dream Kudos: 50
My Contributions
I always read your window needs a default Windows resolution to be able to go fullscreen. I have the same problem, I can't get one of my Windows applications to go fullscreen, because the resolution is 320x224, which is not a default Windows resolution. Console applications probably work the same way.

This post has been edited by skater_00: 28 May, 2008 - 01:05 AM
User is offlineProfile CardPM
+Quote Post

perfectly.insane
RE: Fullscreen In Vista
28 May, 2008 - 03:56 PM
Post #3

D.I.C Addict
Group Icon

Joined: 22 Mar, 2008
Posts: 558



Thanked: 46 times
Dream Kudos: 25
Expert In: C/C++

My Contributions
I would imagine that this has little to do with Vista and everything to do with your video driver and/or hardware. Full-screen command prompts use your video card's text modes. If your video driver does not support a certain text-mode, or any, then I would imagine that this would happen. Of course, your video hardware itself must support a limited set of VESA text-modes, and the kernel will support these irrespective of the driver at some level (bootup time), but I'm not sure of the requirements of device drivers in this respect.

The console resolution needs to be supported by your video card as a text-mode resolution, as skater_00 indicated.
User is offlineProfile CardPM
+Quote Post

lanec42
RE: Fullscreen In Vista
28 May, 2008 - 05:15 PM
Post #4

D.I.C Head
**

Joined: 25 Mar, 2008
Posts: 144


My Contributions
Hmmm...
First: How can I tell if command prompt is recognized as text mode resolution, and how can I change it?

Second: If that is true, then why did the programs work fullscreen on my XP box? The code ought to give the computer the same signal that pressing [ALT]+[ENTER] would, and that should make any program fullscreen, right? Seems to work with other programs (Internet Explorer, Dev-C++, Media Center, ect.).
User is offlineProfile CardPM
+Quote Post

perfectly.insane
RE: Fullscreen In Vista
28 May, 2008 - 06:04 PM
Post #5

D.I.C Addict
Group Icon

Joined: 22 Mar, 2008
Posts: 558



Thanked: 46 times
Dream Kudos: 25
Expert In: C/C++

My Contributions
QUOTE(lanec42 @ 28 May, 2008 - 06:15 PM) *

Hmmm...
First: How can I tell if command prompt is recognized as text mode resolution, and how can I change it?

Second: If that is true, then why did the programs work fullscreen on my XP box? The code ought to give the computer the same signal that pressing [ALT]+[ENTER] would, and that should make any program fullscreen, right? Seems to work with other programs (Internet Explorer, Dev-C++, Media Center, ect.).


Have you run XP on your new laptop?

Programs of the Console subsystem are not full-screened in the same way as programs in the Windows subsystem. Unless something has changed from XP to Vista, the screen is actually changed to a different video mode (this is more obvious when using CRT monitors due to the obvious delay involved when switching to full screen). Many console programs are written to expect a certain range of hardware video modes, and the command prompt is designed to provide a similar environment.

All other windows programs are full-screened in the currently running video mode, except in some special cases where doing so would not be possible (certain games, for example). I don't run Vista, but in XP, programs support full-screening on a case by case basis (meaning, it has to be implemented by the author of the software in question). Only in this case would the display device/driver be a factor.



User is offlineProfile CardPM
+Quote Post

perfectly.insane
RE: Fullscreen In Vista
28 May, 2008 - 06:09 PM
Post #6

D.I.C Addict
Group Icon

Joined: 22 Mar, 2008
Posts: 558



Thanked: 46 times
Dream Kudos: 25
Expert In: C/C++

My Contributions
QUOTE(lanec42 @ 28 May, 2008 - 06:15 PM) *

Hmmm...
First: How can I tell if command prompt is recognized as text mode resolution, and how can I change it?


Well, you could try 80 columns by 25 rows, which is the default mode on most systems before the operating system switches into graphical mode.

80x50 is another commonly implemented text-mode, though I can't recall a system (PC anyway) that did not start in 80x25 (before the OS is loaded).
User is offlineProfile CardPM
+Quote Post

lanec42
RE: Fullscreen In Vista
30 May, 2008 - 12:24 PM
Post #7

D.I.C Head
**

Joined: 25 Mar, 2008
Posts: 144


My Contributions
So, if I understand you correctly, I see two options:
Somehow use the program to adjust the video mode (might this be affected by differences in video cards/drivers?), or
Change the console output size... (how?)

BTW, I have not run XP on the machine I am referring to.

QUOTE(skater_00 @ 28 May, 2008 - 01:58 AM) *

I always read your window needs a default Windows resolution to be able to go fullscreen. I have the same problem, I can't get one of my Windows applications to go fullscreen, because the resolution is 320x224, which is not a default Windows resolution. Console applications probably work the same way.


Well, they worked in XP, and my monitor is 1024 x 800 (I think.)
User is offlineProfile CardPM
+Quote Post

perfectly.insane
RE: Fullscreen In Vista
30 May, 2008 - 07:11 PM
Post #8

D.I.C Addict
Group Icon

Joined: 22 Mar, 2008
Posts: 558



Thanked: 46 times
Dream Kudos: 25
Expert In: C/C++

My Contributions
QUOTE(lanec42 @ 30 May, 2008 - 01:24 PM) *

Change the console output size... (how?)


See the SetConsoleScreenBufferSize windows API function.

You can programmatically fullscreen your console window using SetConsoleDisplayMode (as opposed to simply sending keyboard messages to the console window).
User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 12/4/08 11:33AM

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