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. Sizing-End

Sizing-End

Scheduled Pinned Locked Moved C / C++ / MFC
questioncssdatabasetutorial
5 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.
  • B Offline
    B Offline
    baerten
    wrote on last edited by
    #1

    Hi everyone, in my project, i have a DataGrid. If i size the ChildWindow, i refresh the number of rows of the grid relative to the height. At the refresh-function i need to change and load some things ( for example a new record from the DB ) So it takes a certain duration. If i resize the Frame slowly, it works nice. But if i resize it very fast, so there a many callings to resize the form. For that reason i will lock the "Refresh-function" and only refresh at the end of the resizing. But how can i "see" that the user has stopped the resizing of the frame? Any ideas? Big thanks :)

    S 1 Reply Last reply
    0
    • B baerten

      Hi everyone, in my project, i have a DataGrid. If i size the ChildWindow, i refresh the number of rows of the grid relative to the height. At the refresh-function i need to change and load some things ( for example a new record from the DB ) So it takes a certain duration. If i resize the Frame slowly, it works nice. But if i resize it very fast, so there a many callings to resize the form. For that reason i will lock the "Refresh-function" and only refresh at the end of the resizing. But how can i "see" that the user has stopped the resizing of the frame? Any ideas? Big thanks :)

      S Offline
      S Offline
      spielehelfer
      wrote on last edited by
      #2

      Hmm when the resizing stops, the user as released the mouse... maybe you can catch this event and look everytime its called if there had been a resizement. Maybe by a "locking" variable in your "refresh Function" -> Mosedown -> lock enable refresh part not called -> Moseup -> lock release -> refresh/paint

      B 1 Reply Last reply
      0
      • S spielehelfer

        Hmm when the resizing stops, the user as released the mouse... maybe you can catch this event and look everytime its called if there had been a resizement. Maybe by a "locking" variable in your "refresh Function" -> Mosedown -> lock enable refresh part not called -> Moseup -> lock release -> refresh/paint

        B Offline
        B Offline
        baerten
        wrote on last edited by
        #3

        Yeah, i had the same idea, but the Resizing-Border of the View nor of the Frame will call a MouseUp-Event Trotzdem Danke ;)

        W 1 Reply Last reply
        0
        • B baerten

          Yeah, i had the same idea, but the Resizing-Border of the View nor of the Frame will call a MouseUp-Event Trotzdem Danke ;)

          W Offline
          W Offline
          Waldermort
          wrote on last edited by
          #4

          Trapping the mouse will have no effect when sizing, you should try using the WM_ENTERSIZEMOVE and WM_EXITSIZEMOVE. BTW. these two messages are only sent to the main window and not child controls. Another message you could try trapping is the WM_WINDOWPOSCHANGED.

          B 1 Reply Last reply
          0
          • W Waldermort

            Trapping the mouse will have no effect when sizing, you should try using the WM_ENTERSIZEMOVE and WM_EXITSIZEMOVE. BTW. these two messages are only sent to the main window and not child controls. Another message you could try trapping is the WM_WINDOWPOSCHANGED.

            B Offline
            B Offline
            baerten
            wrote on last edited by
            #5

            Great! Thanks ! :)

            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