Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Change Display mode???

Change Display mode???

Scheduled Pinned Locked Moved C / C++ / MFC
graphicsgame-devc++jsonhelp
4 Posts 3 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Lord_Vader
    wrote on last edited by
    #1

    Hello everybody, I come directly to the point. I want to make a simple game that starts with a DialogBox(using MFC probably?) and then the user can choose between windowed mode and fullscreen(graphics) mode so I could use the OpenGL libraries.The problem is that I can't figure out how to create the fullscreen mode after the user pushes the coresponding button.Do I have to use any API functions or MFC?

    Steve EcholsS Z 2 Replies Last reply
    0
    • L Lord_Vader

      Hello everybody, I come directly to the point. I want to make a simple game that starts with a DialogBox(using MFC probably?) and then the user can choose between windowed mode and fullscreen(graphics) mode so I could use the OpenGL libraries.The problem is that I can't figure out how to create the fullscreen mode after the user pushes the coresponding button.Do I have to use any API functions or MFC?

      Steve EcholsS Offline
      Steve EcholsS Offline
      Steve Echols
      wrote on last edited by
      #2

      http://nehe.gamedev.net/[^] has some good tutorials. I think Lesson 2 shows how to toggle between windowed and full screen mode.


      - S 50 cups of coffee and you know it's on!

      • S
        50 cups of coffee and you know it's on!
        Code, follow, or get out of the way.
      L 1 Reply Last reply
      0
      • L Lord_Vader

        Hello everybody, I come directly to the point. I want to make a simple game that starts with a DialogBox(using MFC probably?) and then the user can choose between windowed mode and fullscreen(graphics) mode so I could use the OpenGL libraries.The problem is that I can't figure out how to create the fullscreen mode after the user pushes the coresponding button.Do I have to use any API functions or MFC?

        Z Offline
        Z Offline
        Zac Howland
        wrote on last edited by
        #3

        Getting the basics done won't be too hard, but handling some more complex actions will be (I'll explain that in a minute). To create a full-screen window, you will need to create a window type that grabs the whole screen instead of the client area. You can look at some of the screen saver examples on this site for that, or look at some of the OpenGL and/or DirectX examples all over the internet. The tricky part is going to be handling things like Alt-Tab (which means a loss/restore of the screen device and all input devices). Instead of showing the dialog, you could approach it the way that most games do these days and allow for a command line switch (if you use the DirectX helper classes, this is built in for you). I'm not sure if the OpenGL libraries give that to you for free, but I've seen a number of samples that allow for it, so at the very least, it wouldn't be too difficult to find a solution for it. If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week Zac

        1 Reply Last reply
        0
        • Steve EcholsS Steve Echols

          http://nehe.gamedev.net/[^] has some good tutorials. I think Lesson 2 shows how to toggle between windowed and full screen mode.


          - S 50 cups of coffee and you know it's on!

          L Offline
          L Offline
          Lord_Vader
          wrote on last edited by
          #4

          Unfortunatelly NeHe doesn't explain how to do that using MFC,only using windows API and its very difficult to create a dialog box by this way

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups