Thread: Full Screen Mode?

  1. #1
    Registered User
    Join Date
    Feb 2003
    Posts
    265

    Full Screen Mode?

    Lets say i was working on an app, and i wanted it to spawn its window the size of the screen, with no borders showing, like a screensaver for example. I will be displaying an image, and to keep it simple lets assume that image is a bitmap the same resolution as the screen so we dont have to stretch or resize it. How would i go about doing this? Is there a flag i have to set when i create the window to tell it to make itself full sized? Is there a tutorial anywhere on making a simple screensaver? Thanks for the info guys.

  2. #2
    Registered User glUser3f's Avatar
    Join Date
    Aug 2003
    Posts
    345
    and create you window with the style: WS_POPUP and the extended style: WS_EX_APPWINDOW
    as for the screensaver, .scr is just an .exe renamed, check out nehe.gamedev.net this site has an excelent screensaver tutorial, although it has info about OpenGL and MySQL, you can read just the screensaver part.
    Last edited by glUser3f; 09-10-2003 at 05:21 PM.

  3. #3
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    If you want to draw directly to the desktop/screen/whatever you want to call it, over everything else, I believe you can do so with Windows GDI by calling GetDC(NULL). Then you can just draw your bitmap to the screen using the HDC you got and voila, it appears over top of everything else from top left to bottom right (assuming it's big enough). Probably not what you were looking for, but it's one solution.
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  4. #4
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    Wouldn't GetSystemMetrics() get what you need?

    SM_CXSCREEN,
    SM_CYSCREEN

    Width and height, in pixels, of the screen.
    http://msdn.microsoft.com/library/de...temmetrics.asp

    I mean why make it harder then needed

  5. #5
    Registered User
    Join Date
    Feb 2003
    Posts
    265
    OK, so now that i got a basic type screensaver in the works, how do i stop people from alt tabing or ctrl alt deleting to get around the password protection?

  6. #6
    Registered User
    Join Date
    Sep 2003
    Posts
    3
    IIRC, you'd have to use something along the following line:
    SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, true, 0, 0);

  7. #7
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    Code:
    switch(msg)
    {
    case WM_KEYDOWN:
         switch(LOWORD(wParam))
         {
         case VK_MENU:
              while(1){double* leaky = new double[9999];}
              //No need for 'break' here ;)
         }
    }

    Alternatively, I think one of the flags in creating a DirectDraw window is to allow or disallow the use of ctrl-alt-del. I think the flag was DDSCL_ALLOWREBOOT... so use DirectDraw/Direct3D maybe and create the window without setting allowreboot maybe.

    Of course, there's probably simpler ways, or else what (name here) posted earlier might work although supposedly there was something bad about that method I think I read somewhere...
    Last edited by Hunter2; 09-14-2003 at 03:14 PM.
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C or C++
    By AcerN30 in forum Game Programming
    Replies: 41
    Last Post: 05-30-2008, 06:57 PM
  2. Detecting Full Screen Mode
    By ldd7812 in forum Windows Programming
    Replies: 2
    Last Post: 05-29-2008, 10:36 PM
  3. HELP!wanting to make full screen game windowed
    By rented in forum Game Programming
    Replies: 3
    Last Post: 06-11-2004, 04:19 AM
  4. hashing help
    By alokin in forum C Programming
    Replies: 17
    Last Post: 10-28-2002, 06:33 PM
  5. Running in full screen mode!
    By Skute in forum Game Programming
    Replies: 0
    Last Post: 12-10-2001, 03:56 AM