Solved

Getting the scrollbar ctrl of a CTreeCtrl

Posted on 1997-11-23
1
1,191 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
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Whole sheet autoscrub still needed 19 51
zeroMAx challenge 20 113
sumHeights  challenge 17 74
mapBully challenge 6 152
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

828 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