How to run a C++ Console Program in full screen ? , using VS2008
Just a workaround: You could use some sort of earlier DOS video modi, for example...
asm
{
mov ax, 13h
push bp
int 10h
pop bp
}
...to have a resolution of 320x200 pixels.
But I'm not sure if this would work for a windows application... Probably not!
There are not a lot of video adapters around these days that still support this. Run cmd.exe and press Alt+Enter. If you get a message box that says "This system does not support fullscreen mode" then you're done. If it does switch to full screen then you can use SetConsoleDisplayMode() in your main() function. Of course, you don't know what your customer's machine is like, best not to pursue this.
Just tested this with cl fullscreen.cpp
:
#include <iostream>
#include <windows.h>
#pragma comment(lib, "user32")
int main()
{
::SendMessage(::GetConsoleWindow(), WM_SYSKEYDOWN, VK_RETURN, 0x20000000);
std::cout << "Hello world from full screen app!" << std::endl;
std::cin.get();
}
Unfortunatelly it had duplicated the text on the second monitor :)
I'm not sure if this will help
http://msdn.microsoft.com/en-us/library/ms683193(VS.85).aspx
and
http://msdn.microsoft.com/en-us/library/ms686125(v=VS.85).aspx