How to make console programs full screen?

Reply

Join Date: Sep 2005
Posts: 42
Reputation: j1979c is an unknown quantity at this point 
Solved Threads: 0
j1979c's Avatar
j1979c j1979c is offline Offline
Light Poster

How to make console programs full screen?

 
0
  #1
Sep 2nd, 2005
err....... is there any command line in Dos to make it full screen, so that i can put it into a system(" ") line in my c++ console program? Thanks in advance.
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 7,541
Reputation: Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute 
Solved Threads: 704
Team Colleague
Narue's Avatar
Narue Narue is offline Offline
Code Goddess

Re: How to make console programs full screen?

 
0
  #2
Sep 2nd, 2005
No, you have to simulate a few keystrokes with the Windows API function keybd_event. IIRC:
  1. keybd_event ( VK_MENU, 0, 0, 0 );
  2. keybd_event ( VK_RETURN, 0, 0, 0 );
  3. keybd_event ( VK_RETURN, 0, KEYEVE­NTF_KEYUP, 0 );
  4. keybd_event ( VK_MENU, 0, KEYEVENT­F_KEYUP, 0 );
I'm here to prove you wrong.
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,152
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1437
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Most Valuable Poster

Re: How to make console programs full screen?

 
0
  #3
Sep 2nd, 2005
This works with Dev-C++ but not with VC++ 6.0 (I think it is a compiler bug)

  1. HWND hWnd = GetConsoleWindow();
  2. ShowWindow(hWnd,SW_SHOWMAXIMIZED);
Reply With Quote Quick reply to this message  
Join Date: May 2005
Posts: 149
Reputation: Electrohead is an unknown quantity at this point 
Solved Threads: 1
Electrohead's Avatar
Electrohead Electrohead is offline Offline
Junior Poster

Re: How to make console programs full screen?

 
0
  #4
Sep 6th, 2005
Dev-C++ has a built in function in project options i believe
: :: Click here to join my website :: :
Brand new online community! Help my forum grow!
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC