944,171 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 17846
  • C++ RSS
Oct 13th, 2005
0

Help make Console App Open in fullscreen.

Expand Post »
Does anyone know how to make a console application open in fullscreen mode...Iv searched google,yahoo,MSDN, and other fourms and there was no specific C++ code for a console app fullscreen mode...Does anyone by anychance have an Idea on how to go about this?? :mrgreen:
Similar Threads
Reputation Points: 33
Solved Threads: 0
Newbie Poster
!=logical not is offline Offline
10 posts
since Oct 2005
Oct 13th, 2005
0

Re: Help make Console App Open in fullscreen.

I saw this at the bottom of this page under Similar Threads:

How to make console programs full screen?
Team Colleague
Reputation Points: 2780
Solved Threads: 312
long time no c
Dave Sinkula is offline Offline
4,790 posts
since Apr 2004
Oct 13th, 2005
0

Re: Help make Console App Open in fullscreen.

I saw that post...Thats why i posted a new one...That code didn't seem to work with my Dev C++ 4.9.
Reputation Points: 33
Solved Threads: 0
Newbie Poster
!=logical not is offline Offline
10 posts
since Oct 2005
Oct 13th, 2005
0

Re: Help make Console App Open in fullscreen.

This program was written for something else, but I added the code to do it in full screen (but its not really full screen on XP, just as big as the cmd prompt window can get :eek: )

#define _WIN32_WINNT  0x0500
#include <windows.h>
#include <Wincon.h>
#include <string>
#include <algorithm>
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <cctype>
using namespace std;

int main()
{ 
  HWND hWnd = GetConsoleWindow();
  ShowWindow(hWnd,SW_SHOWMAXIMIZED);    
    
	string str = "UPPER-CASE";
	transform(str.begin(),str.end(),str.begin(),(int(*)(int))std::tolower);
	cout << str << endl;
	cin.ignore();
	return 0;
}
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2283
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,963 posts
since Aug 2005
Oct 14th, 2005
0

Re: Help make Console App Open in fullscreen.

Thats Close...Do you have anything That would somewhat emulate Alt+Enter Cuz thats what im really lookin for. Thanks.
Reputation Points: 33
Solved Threads: 0
Newbie Poster
!=logical not is offline Offline
10 posts
since Oct 2005
Jan 25th, 2007
0

Re: Help make Console App Open in fullscreen.

Maybe try the SendKeys API to send the key combination of ALT & enter, probably won't give you the effect you want but it should make it fullscreen. I am searching for the same thing as we speak.
Reputation Points: 23
Solved Threads: 5
Posting Whiz in Training
bops is offline Offline
214 posts
since Aug 2005
Jan 25th, 2007
0

Re: Help make Console App Open in fullscreen.

Wait a minute, there is no SendKeys API I don't think anyway, I have found a way of simulating ALT & Enter...

C++ Syntax (Toggle Plain Text)
  1. void AltEnter()
  2. {
  3. keybd_event(VK_MENU,
  4. 0x38,
  5. 0,
  6. 0);
  7. keybd_event(VK_RETURN,
  8. 0x1c,
  9. 0,
  10. 0);
  11. keybd_event(VK_RETURN,
  12. 0x1c,
  13. KEYEVENTF_KEYUP,
  14. 0);
  15. keybd_event(VK_MENU,
  16. 0x38,
  17. KEYEVENTF_KEYUP,
  18. 0);
  19. return;
  20. }

found: http://www.adrianxw.dk/SoftwareSite/...Consoles6.html
Reputation Points: 23
Solved Threads: 5
Posting Whiz in Training
bops is offline Offline
214 posts
since Aug 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: little help :(
Next Thread in C++ Forum Timeline: Reading or writing a double into a bin file





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


Follow us on Twitter


© 2011 DaniWeb® LLC