?
Solved

Getting the scrollbar ctrl of a CTreeCtrl

Posted on 1997-11-23
1
Medium Priority
?
1,256 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 7

Accepted Solution

by:
galkin earned 150 total points
ID: 1310669
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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Suggested Courses

764 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