User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 392,057 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,244 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C++ advertiser:
Views: 4341 | Replies: 3
Reply
Join Date: Sep 2005
Location: Malaysia
Posts: 42
Reputation: j1979c is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
j1979c's Avatar
j1979c j1979c is offline Offline
Light Poster

Help How to make console programs full screen?

  #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.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Sep 2004
Posts: 6,022
Reputation: Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of 
Rep Power: 26
Solved Threads: 414
Super Moderator
Narue's Avatar
Narue Narue is offline Offline
Expert Meanie

Re: How to make console programs full screen?

  #2  
Sep 2nd, 2005
No, you have to simulate a few keystrokes with the Windows API function keybd_event. IIRC:
keybd_event ( VK_MENU, 0, 0, 0 ); 
keybd_event ( VK_RETURN, 0, 0, 0 ); 
keybd_event ( VK_RETURN, 0, KEYEVE­NTF_KEYUP, 0 ); 
keybd_event ( VK_MENU, 0, KEYEVENT­F_KEYUP, 0 );
Member of: Beautiful Code Club.
Reply With Quote  
Join Date: Aug 2005
Location: near St Louis, Missouri, USA
Posts: 10,561
Reputation: Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of 
Rep Power: 36
Solved Threads: 860
Moderator
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Most Valuable Poster

Re: How to make console programs full screen?

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

HWND hWnd = GetConsoleWindow();
ShowWindow(hWnd,SW_SHOWMAXIMIZED);
Reply With Quote  
Join Date: May 2005
Location: London, UK
Posts: 145
Reputation: Electrohead is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 1
Electrohead's Avatar
Electrohead Electrohead is offline Offline
Junior Poster

Re: How to make console programs full screen?

  #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  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb C++ Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the C++ Forum

All times are GMT -4. The time now is 11:41 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC