Solved

how can I expand multiple ctreectrls in a splitter window

Posted on 2009-06-29
4
459 Views
Last Modified: 2013-11-20
I have a CSplitterWnd with two panes, A and B. In each pane, there is a CTreeCtrl. I want to be able to expand a node in the B tree control when the user clicks to expand a node in the A tree control. I want to save the user the step of expanding both CTreeCtrl. Sort of a "synchronized" Node Expansion. Is there some way to send a message from the A-pane (or CTreeCtrl-A) to the B-Pane (or CTreeCtrl-B) and tell it to expand?
0
Comment
Question by:jjjohnaug10
[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
  • 3
4 Comments
 
LVL 31

Assisted Solution

by:Zoppo
Zoppo earned 500 total points
ID: 24737493
Hi jjjohnaug10,

I'd suggest to add a user-message handler or function in the parent window of the splitter. You then can send that window a message or call that function from the pane window which contains the tree-ctrl when a TVN_ITEMEXPANDED notification was sent from the tree-ctrl.

Implementing this with a user defined message is maybe a little more work but the advantage would be the pane-windows don't need to know about the class/functions of the parent (so they don't need to include the class at all).

In both cases you'd have to pass some data to the called message handler/function, at least which control called it (the left or the right one, so the parent window knows in which control it has to synchronize the item) and the item in question itself.

Hope that helps,

ZOPPO
0
 

Author Comment

by:jjjohnaug10
ID: 24737533
Zoppo, thank you for your prompt response. I will give this a try and post back my results.
0
 

Accepted Solution

by:
jjjohnaug10 earned 0 total points
ID: 24738838
Zoppo, I think this is going to work. I need to make a few more tests before I "Accept And Award Points". Thank you.
0
 

Author Comment

by:jjjohnaug10
ID: 24739357
The solution worked for me.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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
Installing Microsoft R server on REDHAT or SUSE Linux 4 152
Process filename extension 3 209
ffmpeg - "rtsp://...... Operation not permitted" 4 89
lucky13 challenge 11 159
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

730 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