CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8
  1. #1
    Join Date
    Oct 2010
    Location
    Russia
    Posts
    69

    CSplitterWnd. How to paint while separator is moving

    How to paint while separator is moving.

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: CSplitterWnd. How to paint while separator is moving

    What are you trying to paint? In what window?
    Victor Nijegorodov

  3. #3
    Join Date
    Oct 2010
    Location
    Russia
    Posts
    69

    Re: CSplitterWnd. How to paint while separator is moving

    When I moving separator window content does not changing. Content change after I released separator. I would like to update content while separator is moving.

  4. #4
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: CSplitterWnd. How to paint while separator is moving

    Handle WM_SIZE in every pane you want to change some content. Use Invalidate or InvalidateRect to invalidate controls/regions you want to update - WM_PAIT (or WM_DRAW in the case of CVIew derived class) will be called automatically in response to invalidation.
    Last edited by VictorN; October 25th, 2010 at 05:26 AM.
    Victor Nijegorodov

  5. #5
    Join Date
    Oct 2010
    Location
    Russia
    Posts
    69

    Re: CSplitterWnd. How to paint while separator is moving

    Quote Originally Posted by VictorN View Post
    Handle WM_SIZE in every pane you want to change some content. Use Invalidateor InvalidateRect to invalidate controls/regions you want to update - WM_PAIT (or WM_DRAW in the case of CVIew derived class) will be called automatically in response to invalidation.
    Unfortunately WM_SIZE is called when lbutton is released. WM_SIZE does not called when separator is moving.

  6. #6
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: CSplitterWnd. How to paint while separator is moving

    Quote Originally Posted by user008 View Post
    Unfortunately WM_SIZE is called when lbutton is released. WM_SIZE does not called when separator is moving.
    Again:
    Quote Originally Posted by VictorN View Post
    Handle WM_SIZE in every pane you want to change some content. Use Invalidate or InvalidateRect to invalidate controls/regions you want to update - WM_PAIT (or WM_DRAW in the case of CVIew derived class) will be called automatically in response to invalidation.
    Victor Nijegorodov

  7. #7
    Join Date
    Oct 2010
    Location
    Russia
    Posts
    69

    Re: CSplitterWnd. How to paint while separator is moving

    If I use Invalidate in WM_SIZE pane WM_SIZE does not call when separator is moving. Pane WM_SIZE is called when separator is released by left mouse button. I would like to call invalidate during separator is moving.

  8. #8
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: CSplitterWnd. How to paint while separator is moving

    Derive your own class from CSplitterWnd and override OnDrawSplitter
    Victor Nijegorodov

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