Re: How can I get the TreeNode from a System.Windows.Forms.Message message?
From: Aaron Queenan (aqueenan_DieSpammerDie__at_contingent.com.au)
Date: 05/09/04
- Next message: Andrew S \(Infragistics\): "Re: ScrollBar 1447 error"
- Previous message: Bob Powell [MVP]: "Re: Cycling between images increases memory usage"
- In reply to: Claes Bergefall: "Re: How can I get the TreeNode from a System.Windows.Forms.Message message?"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 9 May 2004 17:35:59 +0200
Thanks, Claes.
"Claes Bergefall" <claes.bergefall.nospam@frontec.se> wrote in message
news:%23Ft$%23QANEHA.2996@TK2MSFTNGP12.phx.gbl...
> Take your pick:
> 1. Loop through all you nodes until you find the one with a matching
handle,
> or
> 2. Use reflection and call the internal method TreeView.NodeFromHandle
>
> Personally I would use a combination of both; try 2 first and if that
fails
> revert to 1
>
> /claes
>
> "Aaron Queenan" <aqueenan_DieSpammerDie_@contingent.com.au> wrote in
message
> news:#B5oen3MEHA.2468@TK2MSFTNGP11.phx.gbl...
> > "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
> > news:2fv0hrF2jfu6U7@uni-berlin.de...
> > > * "Aaron Queenan" <aqueenan_DieSpammerDie_@contingent.com.au>
scripsit:
> > > > I want to add functionality to my TreeView that requires knowing
when
> > nodes
> > > > are added or deleted. What is the best way of doing this?
> > > >
> > > > At the moment, I'm handling the TVM_DELETEITEM message in WndProc.
Is
> > there
> > > > any way to get the TreeNode from this message?
> > >
> > > 'lParam' holds a handle to the item.
> >
> > Yes, but how can I get a .NET object pointer from that?
> >
> > Thanks,
> > Aaron.
> >
> >
>
>
- Next message: Andrew S \(Infragistics\): "Re: ScrollBar 1447 error"
- Previous message: Bob Powell [MVP]: "Re: Cycling between images increases memory usage"
- In reply to: Claes Bergefall: "Re: How can I get the TreeNode from a System.Windows.Forms.Message message?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|