CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Guest

    Eliminating flicker when using a custom resize function

    I'm using a custom resize function so that the dialog I'm using automatically resizes the controls on it to keep certain distances between the controls
    (Yes the controls grow if the dialog grows & shrink if the dialog shrinks)
    The only problem so far it that the dialog flickers when ever you start to resize and move the mouse while resizing.

    stopping the updating of the window won't help in the OnResize function

    I have tried to stop updating when the mouse button goes down (OnLButtonDown)
    but it looks like that function is never called when you hit the side of the dialog.

    An OnIdle functions to update if the updating is turned of doesn't work either
    never accessed in the dialog for some reason.

    What do I need to do to get a flicker free resize option ?


  2. #2
    Join Date
    May 1999
    Posts
    667

    Re: Eliminating flicker when using a custom resize function

    Look at WM_SIZING It is called whenever the user is sizing a window, when there done you see an LButtonUp (I have not found another way to know they are done). The other thing you could try is using BeginDeferWindowPos/DeferWindowPos/EndDeferWindowPos to move/size all the windows and when EndDeferWindowPos is called all the windows are moved at once therefore reducing flicker.


    HTH,
    chris




  3. #3
    Join Date
    May 1999
    Posts
    667

    Re: Eliminating flicker when using a custom resize function

    Correction, you know the user is done sizing when you receive a 'WM_EXITSIZEMOVE'message.

    Chris


  4. #4
    Guest

    Re: Eliminating flicker when using a custom resize function

    Thanks


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured