CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2005
    Posts
    2

    How to batch calls to ShowWindow

    I am updating a window by making several calls to ShowWindow() on the controls within the window. I can literally watch the controls coming and going, sometimes taking many seconds to complete. Is there a way I can freeze the window, make my calls to ShowWindow(), then unfreeze it, so that it paints only once?

  2. #2
    Join Date
    Feb 2002
    Posts
    4,640

    Re: How to batch calls to ShowWindow

    In the past, I've used the "LockWindowUpdate" function. However, it seems that this is not the proper use case. Check out the WM_SETREDRAW message. Send this message to the parent window of the controls.

    Viggy

  3. #3
    Join Date
    Aug 2000
    Location
    New York, NY, USA
    Posts
    5,656

    Re: How to batch calls to ShowWindow

    Quote Originally Posted by bobkohn View Post
    I am updating a window by making several calls to ShowWindow() on the controls within the window. I can literally watch the controls coming and going, sometimes taking many seconds to complete. Is there a way I can freeze the window, make my calls to ShowWindow(), then unfreeze it, so that it paints only once?
    Check out DeferWindowPos
    Vlad - MS MVP [2007 - 2012] - www.FeinSoftware.com
    Convenience and productivity tools for Microsoft Visual Studio:
    FeinWindows - replacement windows manager for Visual Studio, and more...

Tags for this Thread

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