Full screen in Console app

Hi , i am kind of a noob in C++ So i was wondering how can i make my console application full screen... give me an example of how to do it in a hello world!
code ..... ex:
1
2
3
4
5
6
7
8
9
#include<iostream>
using namespace std;
int main()
{
cout<<"Hello World! "<<endl;
cin.get();
return 0;
}

introduce the example in the code above :D
Thanks in advance
Hrm, I believe that (at least on Windows) the console is supposed to be 70 (80?) characters wide and doesn't like being stretched beyond that (there is a way, but I don't recall it offhand...)
when i was learning c/c++ i spent a while trying to figure that exact question out. as far as i found out, only the user can change that... that's why i taught myself windows api. good luck
well some people did it before ... just added windows.h and change the console to full screen... , i tryed it but it didnt work on my code so i was asking if thers a simple example for it
If you are using Windows Vista is impossible to have the console running fullscreen.
If you aren't using Vista, this should work: SetConsoleDisplayMode(GetStdHandle(STD_OUTPUT_HANDLE),CONSOLE_FULLSCREEN_MODE,0);
Last edited on
I owe u but its kinda too late i found this
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include<windows.h>
#include<iostream>
using namespace std;
void fullscreen()
{
keybd_event(VK_MENU,0x38,0,0);
keybd_event(VK_RETURN,0x1c,0,0);
keybd_event(VK_RETURN,0x1c,KEYEVENF_KEYUP,0);
keybd_event(VK_MENU,0x38,KEYEVENTF_KEYUP,0);
}


int main()
{
cout<<"Hello World!"<<endl;
cin.get();

return 0;
}

i think urs is easier but it says that something is not declared i think
Topic archived. No new replies allowed.