DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   C++ (http://www.daniweb.com/forums/forum8.html)
-   -   How set fullscreen under win 2000 pro(console)? (http://www.daniweb.com/forums/thread158832.html)

Icebone1000 Nov 21st, 2008 3:36 pm
How set fullscreen under win 2000 pro(console)?
 
Hi, i was tring to figure how set display mode to fullscreen under win2000, i saw at msdn that theres a SetConsoleDisplayMode, but that is for winXP +..

I tried

                        //sets the console window
                        //to fullscreen
void FullScreen(){

        HANDLE consolehandle;

        int sysmetrics_x=GetSystemMetrics(SM_CXFULLSCREEN);//get full width
        int sysmetrics_y=GetSystemMetrics(SM_CYFULLSCREEN);//get full height

        COORD full_size;
                full_size.X= sysmetrics_x;
                full_size.Y= sysmetrics_y;

        consolehandle=GetStdHandle(STD_OUTPUT_HANDLE);

        SetConsoleScreenBufferSize(consolehandle, full_size);
       
}// F FullScreen

But that really doesn't set fullscreen mode...
o.o theres a special function for it?

MosaicFuneral Nov 21st, 2008 4:13 pm
Re: How set fullscreen under win 2000 pro(console)?
 
Get DOS and use Mode 13h, lol ;)

You have to get the max console size, then use SetConsoleDisplayMode()

edit: Actually I think you need WinXP for it, sorry.

Narue Nov 21st, 2008 4:14 pm
Re: How set fullscreen under win 2000 pro(console)?
 
>theres a special function for it?
Nope. The usual suggested solution is to programmatically simulate Alt+Enter. I do believe that searching our forums will give you the code to do so.

Icebone1000 Nov 21st, 2008 5:10 pm
Re: How set fullscreen under win 2000 pro(console)?
 
tanx =D

void FullScreen(){

    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);       
       
}// F FullScreen

i dont have idea of what are those parameters, but it works

marco93 Nov 21st, 2008 10:34 pm
Re: How set fullscreen under win 2000 pro(console)?
 
Quote:

Originally Posted by Icebone1000 (Post 741674)
i dont have idea of what are those parameters, but it works

Read the doc instead of copying code that you even don't understand.


All times are GMT -4. The time now is 7:57 pm.

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