How can a list control respond a tree control message?

I create a list control (CMyList) and a tree control (CMyTree) and want to 
display different items when the selection changed in the tree control. What 
I have done is right click my tree control on resource editer and choose 'Add 
Event Handler...'. I choose TVN_SELCHANGED from Message type and CMyList from 
Class list. When I run my program and click different item in the tree 
control, the hangler function in class CMyList does respond it. Could anybody 
give me some suggestion for coping with the problem? 
Thanks in advance.

Rich
0
Rich (271)
8/19/2004 11:43:02 PM
vc.mfc 33608 articles. 0 followers. Follow

5 Replies
415 Views

Similar Articles

[PageSpeed] 34

I am not sure what you are asking? Do you want a list control to handle tree
control's notifications? If yes, you will need to do it yourself by passing
it on to list control from tree control.

--
Ajay Kalra [MVP - VC++]
ajaykalra@yahoo.com


"Rich" <Rich@discussions.microsoft.com> wrote in message
news:20A3E76D-2467-400F-99EE-D66B2D8B3275@microsoft.com...
> I create a list control (CMyList) and a tree control (CMyTree) and want to
> display different items when the selection changed in the tree control.
What
> I have done is right click my tree control on resource editer and choose
'Add
> Event Handler...'. I choose TVN_SELCHANGED from Message type and CMyList
from
> Class list. When I run my program and click different item in the tree
> control, the hangler function in class CMyList does respond it. Could
anybody
> give me some suggestion for coping with the problem?
> Thanks in advance.
>
> Rich


0
ajaykalra (6842)
8/20/2004 3:30:52 AM
Yep, that's what I want to do. Could you please tell me how I can pass a 
notification from a tree control to list control. Thanks for your kind 
response. 

Cheers, rich

"Ajay Kalra" wrote:

> I am not sure what you are asking? Do you want a list control to handle tree
> control's notifications? If yes, you will need to do it yourself by passing
> it on to list control from tree control.
> 
> --
> Ajay Kalra [MVP - VC++]
> ajaykalra@yahoo.com
> 
> 
> "Rich" <Rich@discussions.microsoft.com> wrote in message
> news:20A3E76D-2467-400F-99EE-D66B2D8B3275@microsoft.com...
> > I create a list control (CMyList) and a tree control (CMyTree) and want to
> > display different items when the selection changed in the tree control.
> What
> > I have done is right click my tree control on resource editer and choose
> 'Add
> > Event Handler...'. I choose TVN_SELCHANGED from Message type and CMyList
> from
> > Class list. When I run my program and click different item in the tree
> > control, the hangler function in class CMyList does respond it. Could
> anybody
> > give me some suggestion for coping with the problem?
> > Thanks in advance.
> >
> > Rich
> 
> 
> 
0
Rich (271)
8/20/2004 3:55:02 AM
Rich wrote:
 >>I am not sure what you are asking? Do you want a list control to 
handle tree
 >>control's notifications? If yes, you will need to do it yourself by 
passing
 >>it on to list control from tree control.
 >>
> Yep, that's what I want to do. Could you please tell me how I can pass a 
> notification from a tree control to list control. Thanks for your kind 
> response. 
> 
> Cheers, rich
> 

You must write code in the parent window to do it.

-- 
Scott McPhillips [VC++ MVP]

0
Scott
8/20/2004 5:31:14 AM
Thanks a lot guys. 
0
Rich (271)
8/22/2004 9:33:02 PM
Those values are just integers. If it just happens that TVN_SELCHANGED has the same
numeric value as LVN_SELCHANGED, then it will give you the illusion that it is working.
This is only an illusion. I suggest fixing the code to be correct.
					joe

On Thu, 19 Aug 2004 16:43:02 -0700, "Rich" <Rich@discussions.microsoft.com> wrote:

>I create a list control (CMyList) and a tree control (CMyTree) and want to 
>display different items when the selection changed in the tree control. What 
>I have done is right click my tree control on resource editer and choose 'Add 
>Event Handler...'. I choose TVN_SELCHANGED from Message type and CMyList from 
>Class list. When I run my program and click different item in the tree 
>control, the hangler function in class CMyList does respond it. Could anybody 
>give me some suggestion for coping with the problem? 
>Thanks in advance.
>
>Rich

Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15975)
8/23/2004 7:02:57 AM
Reply:

Similar Artilces:

How can I insert a cell reference in a footer (eg for variable foo #2
Any ideas on how to do this? I'm trying to create a template with the doc reference number in the footer However, I'm trying to avoid users having to edit the footer (because this just wont get done). Private Sub Workbook_BeforePrint(Cancel As Boolean) With ActiveSheet .PageSetup.LeftFooter = .Range("A1").Text End With End Sub This code should go in the ThisWorkbook code module. -- HTH RP (remove nothere from the email address if mailing direct) "wngg001" <wngg001@discussions.microsoft.com> wrote in message news:8A0F9D9E-269F-45CF-A6E3...

I can send but not receive emails in outlook
I have just installed Outlook 2003. I can send emails but cannot receive them. I have confirmed my internet settings with my ISP. If I return to Outlook Express which was installed with Microsoft Works I can still access my incoming mail from there Do you receive any errors when trying to receive? "TeeJay" <TeeJay@discussions.microsoft.com> wrote in message news:A1BA6E6F-2C25-460E-9F4F-8A6EB8C9CA96@microsoft.com... >I have just installed Outlook 2003. I can send emails but cannot receive > them. I have confirmed my internet settings with my ISP. If I return to >...

Junk E-Mail Lists Error in Outlook 2003 with Exchange 2003
I have seen several people post about this error message that comes up in Outlook, but so far I haven't seen anyone respond. I am running an Exchange 2003 server with SP1 and my client is Outlook 2003. I installed IMF a few weeks ago, and it appears that this message started soon afterwards. I have now uninstalled IMF, but am still receiving the message. My end users are getting frustrated, as am I. There also appears to be an error in the IMF deployment guide about adding a registry key to increase the list size in Exchange. It states to "right click System", but there is n...

error messages 03-03-10
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Email Client: pop Was syncing entourage with mailme when i got an error message. I clicked it off and they kept coming...at one time I had 20 on the screen. I had to close the program and then turn off my Macbook Pro, then turn it on. I cannot use Entourage without this happening...opened it and one popped right up. On 2010-03-02 22:09:33 -0500, padreruf@officeformac.com said: > Was syncing entourage with mailme when i got an error message. I > clicked it off and they kept coming...at one time I had 20 on the &...

Outlook newsgroup message not visable to OE clients
Suddenly last week, without any changes on my part (really), our Exchange 2003 SP1 server is handling newsgroup messages strangely. If an Outlook client in Exchange mode posts a message, the message is visable by the other Outlook corporate clients, but NOT by NNTP clients like Outlook Express and Thunderbird. Posts by NNTP clients are visable by both types of clients. It would seem to be a NNTP connector issue, but I'm finding no information or error messages. Any ideas? Dave ...

Outlook 2003 won't send 1 message
I'm having the same problem as Joshua..and it just started today after I loaded a lot of Windows XP Professional updates off the Microsoft site. One message is hung in my outbox; if I write a new message, it moves to the hung position and won't send. Any ideas? I am having the same problem with Outlook 2003. I just can't send the message. Anyone have any ideas? "kenc" <anonymous@discussions.microsoft.com> wrote in message news:085601c3bc08$e6e7ff70$a301280a@phx.gbl... > I'm having the same problem as Joshua..and it just > started today after I loa...

How do I install when "file ZF561407.CAB can not be found"
...

Windows Mail recovering messages
I need to reinstall Vista so what is the best way to save/recover existing mail messages/settings? See www.oehelp.com/backup.aspx You need to backup the message store and the relevant registry keys. Then, once reinstalled, just replace the location of the message store and merge the registry keys. Then before starting Winmail make sure the "Store Root" value in the registry correctly lists the location of the message store and if so then start Winmail and it should work fine, except you will have to put in your passwords again. steve "Therealdaddydo" ...

Owner draw buttons : 2D look...Can it be 3D?
hi, Priyanka here... i created owner draw buttons in my application. but the feel and look of these buttons is not the same as the CButtons. i mean when i click on the CButton, it gives a 3D feel as the text shows some offset and the button gives a pressed look. but in the owner draw buttons, there is no such 3D effect i can see. can we make it possible? Thanks Priyanka priya wrote: > hi, > Priyanka here... > i created owner draw buttons in my application. but the feel and look > of these buttons is not the same as the CButtons. i mean when i click > on the CButton, it gives...

Outlook Express Error message #8
The following message comes up each time I try to send email thru Outlook Express": Your server has unexpectedly terminated the connection. Possible cause for this indles server problem, network problems. or a long period of inactivity. Acct. 'IMAP.aol.com', Server:SMTP.aol.com Protocol:SMTP, Port 25, Secure(SSL) No. Socket Error 10061, Error #OX800CCOE. Try posting this in an Outlook Express news group - this is not one of them. Outlook is a part of Microsoft Office and is what this group supports. Outlook Express is a part of Internet Explorer and has its own news groups. Y...

Outlook XP and 2003
Weird Outlook 2002 and 2003 problem. If I start a message from within Outlook and attach a file it sends normally, but if I try and send by hitting the 'mail' button from within Word or Excel (filling in the pertinent info and hit send) the message just goes to the Outlook's outbox and will not go out no matter how many times I hit 'send and receive'. The same goes for files or pictures if I go to the file 1st and do a R-click send to mail. They just end up in the outbox and will not send. -- "I don't cheat to survive. I cheat to LIVE!!" - Alceryes ...

Can not create Matrix Item please Help RMS 2.0
RMS 2.0 Can not create Matrix Item please Help When trying to create any new items I receive error message This is the message (-2147217864) Row Cannot be located for updating. Some values may have been change since it was last read. Manger still creates standard items but still receives message with out this number in message -2147217864 ...

get a list of file in a directory
Hi. what would be the best way to return a list of files in a directory. I know in VB you could use the dir function, but what should i use in MFC. Doen anyone know of a class available where I could say return all the file in a certain directory and its sub directories Regards Dylan Take a look at the CFileFind MFC class. -- Cheers Check Abdoul [VC++ MVP] ----------------------------------- "Dylan Franklin" <dyl2000@lineone.net> wrote in message news:eHHBr0MxDHA.2436@TK2MSFTNGP09.phx.gbl... > Hi. > > what would be the best way to return a list of files i...

customizing the task list print options
I'd like to print my "tasks" list but with the complete Note field included. How does one accomplish that? I'm surprised it isn't a standard form provided in Outlook. -- ------------ Michael Bierman ...

Is there a work-a-round i can use for making a datagrid....
Hey all, I am trying to make a datagrid on a form that the user would input info, and once completed, it would be put in correct area's of the workbook. I cant use a datagrid as job doesn't alw downloads for net so i cant get the update needed to alw me to use datagrids( see post sugj: "Missing Control In Addin") is there a way i can use a text box or some other box or tool to do this? When you say "form", do you mean UserForm or worksheet set up to look like a data input form? If a UserForm, then yes, you can use TextBoxes, but you didn't supp...

importing Outlook Express messages to Outlook 2003
In Outlook Express the displayed Sent and Received date for messages sent out have the same date. The import function in Outlook 2003 to import Outlook Express messages changes the Received Date to the date/time of the import. Is there a way to retain the Sent Date as the Received Date or is there a way to convert the Received Date of a sent e-mail to be the same as the e-mail's Sent Date. Regards, Rannoch "rannoch" <anonymous@discussions.microsoft.com> wrote in message news:016c01c42631$4e3d7500$7d02280a@phx.gbl... > In Outlook Express the displayed Sent and ...

Some Messages Don't Download from Server
I've upgraded to Outlook 2003. Lately, it seems that some of the messages on my earthlink server are not downloaded when I use Send/Receive. There seems to be pattern as to which messages are downloaded and which remain on the server. Anybody got any ideas how to fix this? ...

Change Default When Selecting New Message From Form
Whenever I select New -> Choose Form, it defaults to "Organizational Forms Library" (which is empty). How can I make it default to "User Templates in File System"? Thanks. I've been looking for a way to do that for years, but have never found = one. FYI, there is a newsgroup specifically for Outlook forms issues = "down the hall" at microsoft.public.outlook.program_forms or, via web = interface, at = http://www.microsoft.com/office/community/en-us/default.mspx?dg=3Dmicroso= ft.public.outlook.program_forms --=20 Sue Mosher, Outlook MVP Author of Con...

SMTP Message 4.4.7
I am running Exchange 2003, SP2. The server sits behind ISA 2004. I am having periodic mail problems with other domains trying to send messages to my Exchange server. There is a domain that is having messages bounced back with the error code 4.7.7. I believe that most other domains get through just fine. Is there anything on the ISA firewall that might be causing this? MS gives work-around for may firewall products, but not for their own. Thanks. We had the same problem, and the same configuration. The problem is caused by the ISA firewall's SMTP filtering feature, and two partic...

Can anybody tell me what is wrong ...
/* I am trying to practice multidimensional array in a managed class using dynamical allocation. If I tried to compile the following codes, I would get the under mentioned c2440 error message. It is only practice. You may notice that I am not using "private" or constructor here. Can anybody tell me what is wrong and how I can rewrite that line right? Thanks a lot. */ #include "stdafx.h" #include <string.h> #include <string> #using <mscorlib.dll> #include <tchar.h> using namespace System; using namespace std; __gc class Month { public:...

scanner can't read barcodes on paper
My barcode scanner can't seem to read barcodes that I printed out. I will not barcodes on receipt either. any suggestions will be great. Thanks I had the same problem. I only had this problem with certain barcodes. When I looked at the ones that the scanner wasn't reading, I noticed that they all used lower case letters. As soon as I changed the letters to upper case I was able to scan the labels. "country" wrote: > My barcode scanner can't seem to read barcodes that I printed out. > I will not barcodes on receipt either. > > any suggestions will be g...

Migration: Migrated custom fields can't sync with plan
We migrated a set of enterprise global fields from 2003 to 2007. However, some of the post migration changes to these fields can't be reflected into project professional for all plans. Example, we have a project outline code in 2003 called Portfolio, which is a hierarchical set of values. In 2003, we allowed selection of non-leave node and didn't allow multi-selection. After migration, we changed the settings of the field to allow only leave node and multi-selection. However, these changes are neither picked up by migrated project plans nor newly created project plan....

Can you work this backwards
Previously I used 3 simple formulas (if statements) to calculate a charge, so if E9 =3D=A33000 then the formula for the charge was =3DIF(E9<=3D1000;E9*1.1;"=A3100") then =3DIF(AND(E9>1000;E9 <=3D2000);(E9-1000)*0.9;"=A3200") =3DIF(E9>2000;(E9-2000)*0.5;) Total Cost ... of above 3 items plus E9 (=A33000) Now people are asking to spend a total of =A33000 including the charge, so now Total Cost is to be =A33000 and then I have to work back to find E9. How is the best way to do this please. Bob Hi, Use the "Solver" utility in Excel. Let us suppose ...

Drop down list 03-27-10
Hello, Im trying to create a linked multiple drop down list in excel and im not sure if it can be done, such as in the first list of pipe diameter, second list wall thickness, pipe outer diameter, third list circumference and so on. when the an item from the first list is selected, the following lists are to show the specific value based upon the first selection. help would very much appreciated, thank you I think that www.contextures.com has some assistance to offer. Look at this first: http://www.contextures.com/xlDataVal02.html and if that's not exactly what you need...

Automatic justification of a new message
Greetings, I was wondering if there was a way to have a new mail message automatically be set up for "Justify" instead of "Left" for paragraph formatting. I'm using Outlook 2003 Thanks in advance ...