[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Splitter window and Tree View

Posted on 1998-05-14
2
Medium Priority
?
227 Views
Last Modified: 2013-11-20
I'm trying to figure out how to route the windows messages in the following scenario.

I have the following classes
CWLSFrame - This frame handles create a static splitter window.  There are only two windows.  The left window is assigned the my CWLSTreeView class, and the right window is assigned to my CWLSEntityView class.

CWLSTreeView - This class takes care of the TreeCtrl and inserts items into the tree.  It also receives the message when the user changes the currently selected tree item.

CWLSEntityView - A generic view class of the Tree.

CWLSSoundView - When the user selects a "sound item" in the tree, I want it to use this view.

I understand how to manipulate the above classes into the different views.  My question is, when a user changes their selection in the Tree.  How can I get this message to the CWLSFrame so that it can change the splitter window?

Thanks in advance
Chris Paalman
cpaalman@cnc-inc.com
0
Comment
Question by:cpaalman
[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
2 Comments
 
LVL 1

Accepted Solution

by:
guruprasad031298 earned 800 total points
ID: 1311008
In your case CWLSFrame is the parent frame of CWLSTreeView, hence you can do this :

1. Handle the TVN_SELCHANGED reflected message in your tree control class member of the TreeView

2. In the handler, which will most probably be OnSelChanged, make a call to GetParentFrame () and type cast the result with (CWLSFrame *) to get a pointer to the parent frame window, say pWLSFrame

3. Add an user defined message, say WM_CHANGESPLITTER (message to change your splitter) to the CWLSFrame class and a handler for the same. Put your 'splitter change' functionality in the handler sunction.

4. Send WM_CHANGESPLITTER message from OnSelChanged handler of the tree control, using

pWLSFrame->SendMessage (WM_CHANGESPLITTER, (WPARAM) 0, (LPARAM)0)

which should call your WM_CHANGESPLITTER handler (say OnChangeSplitter) in CWLSFrame.
0
 

Author Comment

by:cpaalman
ID: 1311009
WOW, this is the time I've been on this web site, and I asked my first question and in less than 2 hours I had the answer I needed.  Thanks!!!
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

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 …
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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.
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

656 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