Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I've been out of the software game for some years now. I'm trying to refresh my memory with a small project for a friend. Basically I have a TreeControl within an outlookbar on the left hand side of the screen, part of the mainframe. When the user Dbl clicks on a node I need it to update some controls on my dialog, by passing the dialog some info from the tree node clicked on. I'm assuming the send message is the way to go but I'm unsure on how to implement it. Any help is greatly appreciated and desperately needed.

Many thanks

Wayne

What I have tried:

Researching the Sendmessage function only so far.
Posted
Updated 2-Feb-20 7:38am
Comments
Richard MacCutchan 2-Feb-20 9:14am    
It depends on the connection between the two objects. If they are independent objects then maybe SendMessage is the way to go. But if one is the parent of the other (a TreeControl within an outlookbar) then a simple method call may be easier.
Member 14641875 4-Feb-20 5:02am    
Thankyou for your advise. Do you have any example code that I could look at please? Is it as simple as having a member pointer to my dialog and using the postmessage option? The tree and the dialog are independent objects.

1 solution

You better use PostMessage for not waiting to the end the message handling. The sender needs the handle of target window in which you handle the message. If you want to handle the message in a different thread you should use PostThreadMessage.

Use the parameters for some details.
 
Share this answer
 
Comments
Member 14641875 4-Feb-20 5:02am    
Thankyou for your advise. Do you have any example code that I could look at please? Is it as simple as having a member pointer to my dialog and using the postmessage option? The tree and the dialog are independent objects.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900