DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   C++ (http://www.daniweb.com/forums/forum8.html)
-   -   How to make console programs full screen? (http://www.daniweb.com/forums/thread31665.html)

j1979c Sep 2nd, 2005 9:11 am
How to make console programs full screen?
 
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.

Narue Sep 2nd, 2005 9:19 am
Re: How to make console programs full screen?
 
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 );

Ancient Dragon Sep 2nd, 2005 2:05 pm
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)

HWND hWnd = GetConsoleWindow();
ShowWindow(hWnd,SW_SHOWMAXIMIZED);

Electrohead Sep 6th, 2005 6:45 am
Re: How to make console programs full screen?
 
Dev-C++ has a built in function in project options i believe


All times are GMT -4. The time now is 8:52 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC