Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add an event to a treeview

Status
Not open for further replies.

9193

Programmer
Apr 25, 2008
4
Hello,
I have a class in MFC and I want to use this class in Windows forms. For that I create a .dll file using the MFC class and load that .dll file in to CLR project and draw that object in Windows form. But now I want to add an event to that new control. How can I do this?
eg:
I have a ctreeview in MFC and I create a .dll file using that MFC class and open a CLR project in VC++2008 and add a form to that project and load that .dll file. Then I can access that MFC class in my new Windows form ( in CLR project ). and it is working. But my current problem is that, I want to read selected node value from that tree node to my Windows forms's text entry. How can I do this? I think, for that we need to add an event ( After select ) to that control. But that control is loaded from .dll file.
How can I solve this problem?
Please help me.

 
With your current setup, you need to modify your class, test it with a driver program, and rebuild your DLL.

You can also have two projects in your workspace, the MFC/DLL project and the CLR project, so you can work on both at the same time.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top