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

    How to show or hide a scrollbar dynamically in CScrollView?

    Hi,

    How can a scrollbar of CScrollView be dynamically hidden or shown as response to some message (e.g.ButtonClick)?

    Is that possible even, if the object of CScrollView is part of a splitter Window?

    Thanks,

    - Ralf

  2. #2
    Join Date
    May 1999
    Posts
    26

    Re: How to show or hide a scrollbar dynamically in CScrollView?

    I used:

    CRect TotalSize = GetClientRect()
    SetScaleToFitSize(CSize(TotalSize.right,TotalSize.right))



    and it worked.

    I don´t know if there is a better method or if it works with splitter windows.

    This function only sets the scroll size to the full window automatically. To show the scroll bars again use SetScrollSize(MM_TEXT,myDocSize).





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