Solved

Getting the scrollbar ctrl of a CTreeCtrl

Posted on 1997-11-23
1
1,167 Views
Last Modified: 2013-11-20
Hi,

I'm writing a VC++ 5.0 application. I have a CTreeCtrl that I would like to programmatically scroll. I could not find a way to get the CScrollBar associated with a CTreeCtrl so can
scroll the window. I know that if I use a CTreeView then the GetScrollBarCtrl() function works and returns the CScrollBar object; however I do not have a CTreeview, just a CTreeCtrl.

Thanks,
Ralph.
0
Comment
Question by:rakhras
1 Comment
 
LVL 7

Accepted Solution

by:
galkin earned 50 total points
Comment Utility
I Examined tree control with Spy and found that scrollbar of tree control is actually not a window but a frame control( only drawing) so you can't get it handle. To scroll a tree view control use SendMessage(WM_VSCROLL, SB_LINEUP). Replace the second argument if you need to scroll it to another space.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now