944,110 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 12996
  • C++ RSS
Sep 2nd, 2005
0

How to make console programs full screen?

Expand Post »
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.
Similar Threads
Reputation Points: 13
Solved Threads: 1
Light Poster
j1979c is offline Offline
42 posts
since Sep 2005
Sep 2nd, 2005
0

Re: How to make console programs full screen?

No, you have to simulate a few keystrokes with the Windows API function keybd_event. IIRC:
C++ Syntax (Toggle Plain Text)
  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 );
Administrator
Reputation Points: 6442
Solved Threads: 1393
Bad Cop
Narue is offline Offline
11,807 posts
since Sep 2004
Sep 2nd, 2005
0

Re: How to make console programs full screen?

This works with Dev-C++ but not with VC++ 6.0 (I think it is a compiler bug)

C++ Syntax (Toggle Plain Text)
  1. HWND hWnd = GetConsoleWindow();
  2. ShowWindow(hWnd,SW_SHOWMAXIMIZED);
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2283
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,961 posts
since Aug 2005
Sep 6th, 2005
0

Re: How to make console programs full screen?

Dev-C++ has a built in function in project options i believe
Reputation Points: 10
Solved Threads: 2
Junior Poster
Electrohead is offline Offline
149 posts
since May 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: Old ammeture programmer.need help
Next Thread in C++ Forum Timeline: C++ reading,writing,displaying a file?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC