No announcement yet.

Sizing - Optimization Question...

  • Filter
  • Time
  • Show
Clear All
new posts

  • Sizing - Optimization Question...

    I currently size on WM_SIZE, but I think I read somewhere on this forum that WM_EXITSIZEMOVE was the best place to size controls. It would seem since this only fires once per size, it would substantially reduce flicker, and speed things up.

    I notice this only fires once each time you size a window, no matter how long you have hold of the non-client area for sizing or how far you move it.

    It does not fire when maximizing or restoring though. Is there any other situations where WM_EXITSIZEMOVE doesn't fire that WM_SIZE does?
    Adam Drake

  • #2
    I do all my resizing in the same place. I use this to fire it when my window has been restored.
    ' ~~~~~~~~~~~~~~~~~~~
    CALL PostMessage(hWnd, %WM_EXITSIZEMOVE, BYVAL 0, BYVAL 0)
    END IF
    FUNCTION = 0

    regards, Ian
    :) IRC :)


    • #3
      Funny you bring it up Adam

      I am working on a re-write of my app from years ago (correcting things that once went wrong) ( any quantum leap guys out there will get that one)

      I am working in the same zone, but will have to do some testing, but maybe subclassing would be the answer?

      sorry its a vague answer, but I am going back to docs and examples, and wonder why an example does one thing...and the doc says its "SUPPOSED" to do another kinda thing....and then experiment if the example is just cause "it WORKED" in their case, but maybe not in all cases?
      Engineer's Motto: If it aint broke take it apart and fix it

      "If at 1st you don't succeed... call it version 1.0"

      "Half of Programming is coding"....."The other 90% is DEBUGGING"

      "Document my code????" .... "WHYYY??? do you think they call it CODE? "


      • #4
        I always do control resizing in WM_SIZE. If there is a problem there then it could be caused by something else. Try calling the LockWindowUpdate function or using WM_SETREDRAW to halt redrawing before/after resizing the controls, or apply the WS_CLIPSIBLINGS style to each child window. That might help | Slam DBMS | PrpT Control | Other Downloads | Contact Me