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. Redraw the full screen?

Redraw the full screen?

Scheduled Pinned Locked Moved C / C++ / MFC
question
6 Posts 3 Posters 0 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.
  • R Offline
    R Offline
    Rage_bla
    wrote on last edited by
    #1

    How can I redraw the full screen (all the windows)?

    F D 2 Replies Last reply
    0
    • R Rage_bla

      How can I redraw the full screen (all the windows)?

      F Offline
      F Offline
      FarPointer
      wrote on last edited by
      #2

      i guees you are talking of invalidate,or then go for GetDesktopWindow()(desktop handle) then invalidate that,i havent done its just a guess ,if you mean one from program then just invalidate().

      R 1 Reply Last reply
      0
      • F FarPointer

        i guees you are talking of invalidate,or then go for GetDesktopWindow()(desktop handle) then invalidate that,i havent done its just a guess ,if you mean one from program then just invalidate().

        R Offline
        R Offline
        Rage_bla
        wrote on last edited by
        #3

        Thanks for the response. Unfortunately it didn't work :(( The reason I need to erase/redraw/invalidate everything is becouse I am drawing on the screen DC (GetDC(NULL)) but at the some point I want to revert changes. I guess enumerating all windows and invalidating the visible ones could work but I tought the might be a better way...

        R 1 Reply Last reply
        0
        • R Rage_bla

          Thanks for the response. Unfortunately it didn't work :(( The reason I need to erase/redraw/invalidate everything is becouse I am drawing on the screen DC (GetDC(NULL)) but at the some point I want to revert changes. I guess enumerating all windows and invalidating the visible ones could work but I tought the might be a better way...

          R Offline
          R Offline
          Rage_bla
          wrote on last edited by
          #4

          InvalidateRect(NULL, NULL, TRUE) will invalidate all windows. Now I need something like UpdateWindow or RedrawWindow, but for all windows. -- modified at 13:22 Saturday 1st October, 2005

          1 Reply Last reply
          0
          • R Rage_bla

            How can I redraw the full screen (all the windows)?

            D Offline
            D Offline
            douglasjordan
            wrote on last edited by
            #5

            Enumerate all the windows and if the WS_VISIBLE style bit is 1, then set it to zero then back to 1 and this toggle will force a repaint. Send an F5 keystroke to the desktop window and it will redraw all the icons etc. OR since you want to use the entire screen, create a window with no frame or menu and size it to the display then get the DC for that window. When that window is closed/destroyed all the other windows/desktop will redraw on their own. This is how many screen savers work!

            R 1 Reply Last reply
            0
            • D douglasjordan

              Enumerate all the windows and if the WS_VISIBLE style bit is 1, then set it to zero then back to 1 and this toggle will force a repaint. Send an F5 keystroke to the desktop window and it will redraw all the icons etc. OR since you want to use the entire screen, create a window with no frame or menu and size it to the display then get the DC for that window. When that window is closed/destroyed all the other windows/desktop will redraw on their own. This is how many screen savers work!

              R Offline
              R Offline
              Rage_bla
              wrote on last edited by
              #6

              Thank you. I think one of your methods will be perfect...

              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