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. Hold redraw until view resizing is finished

Hold redraw until view resizing is finished

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
4 Posts 1 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.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    I have a view with complex dawing that takes a while. When I resize the window, Windows tries to draw, draw, draw, and it makes the whole sizing thing really hateful, even on a fast machine. What I absolutely cannot figure out, is how to turn off updating until the window resizing is *finished*. I can find no message for "user released the mouse, resizing is done". It seems like this ought to be straightforward, but this is Windows, right? Anyone know how to do this?

    L 2 Replies Last reply
    0
    • L Lost User

      I have a view with complex dawing that takes a while. When I resize the window, Windows tries to draw, draw, draw, and it makes the whole sizing thing really hateful, even on a fast machine. What I absolutely cannot figure out, is how to turn off updating until the window resizing is *finished*. I can find no message for "user released the mouse, resizing is done". It seems like this ought to be straightforward, but this is Windows, right? Anyone know how to do this?

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      LockWindowUpdate( ) doesn't allow the window to be moved, but I don't know if that automatically means the window also cannot be sized.

      1 Reply Last reply
      0
      • L Lost User

        I have a view with complex dawing that takes a while. When I resize the window, Windows tries to draw, draw, draw, and it makes the whole sizing thing really hateful, even on a fast machine. What I absolutely cannot figure out, is how to turn off updating until the window resizing is *finished*. I can find no message for "user released the mouse, resizing is done". It seems like this ought to be straightforward, but this is Windows, right? Anyone know how to do this?

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        Modify the window's class not to have the CS_HREDRAW and CS_VREDRAW styles set.

        L 1 Reply Last reply
        0
        • L Lost User

          Modify the window's class not to have the CS_HREDRAW and CS_VREDRAW styles set.

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          This doesn't do anything. I assume you mean to set these in the AfxRegisterWndClass() command. I tried doing that in both the CView class and the CMDIChildWnd class. Neither place did I notice any effect. The IOnSize message gets called anyway every time the frame window size changes a little bit. Is there another place to set these flags to get the desired effect? Mike Newberry ================== The original message was: Modify the window's class not to have the CS_HREDRAW and CS_VREDRAW styles set.

          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