DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   C++ (http://www.daniweb.com/forums/forum8.html)
-   -   Help make Console App Open in fullscreen. (http://www.daniweb.com/forums/thread33838.html)

!=logical not Oct 13th, 2005 7:11 pm
Help make Console App Open in fullscreen.
 
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:

Dave Sinkula Oct 13th, 2005 7:32 pm
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?

!=logical not Oct 13th, 2005 10:13 pm
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.

Ancient Dragon Oct 13th, 2005 10:29 pm
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;
}

!=logical not Oct 14th, 2005 12:29 am
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.

bops Jan 25th, 2007 8:34 am
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.

bops Jan 25th, 2007 10:03 am
Re: Help make Console App Open in fullscreen.
 
Wait a minute, there is no SendKeys API I don't think :S anyway, I have found a way of simulating ALT & Enter...

void AltEnter()
{
    keybd_event(VK_MENU,
                0x38,
                0,
                0);
    keybd_event(VK_RETURN,
                0x1c,
                0,
                0);
    keybd_event(VK_RETURN,
                0x1c,
                KEYEVENTF_KEYUP,
                0);
    keybd_event(VK_MENU,
                0x38,
                KEYEVENTF_KEYUP,
                0);
    return;
}

found: http://www.adrianxw.dk/SoftwareSite/...Consoles6.html


All times are GMT -4. The time now is 12:26 pm.

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