Re: How can I get the TreeNode from a System.Windows.Forms.Message message?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Aaron Queenan (aqueenan_DieSpammerDie__at_contingent.com.au)
Date: 05/09/04


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.
> >
> >
>
>



Relevant Pages

  • Re: How can I get the TreeNode from a System.Windows.Forms.Message message?
    ... Loop through all you nodes until you find the one with a matching handle, ... Use reflection and call the internal method TreeView.NodeFromHandle ...
    (microsoft.public.dotnet.framework.windowsforms.controls)
  • Re: iterate through methods
    ... >> I would like to iterate through several methods and I cannot seem to find ... > I'm sure a loop of less methods would have made your problem clear:) ... but it can be done using reflection. ... an array of function pointers would be ...
    (comp.lang.java.programmer)
  • Re: RSGB RadCom December 2007 Issue
    ... "I suapect they are originating at the feedpoint, ... That would be a reflection from a virtual impedance bump wouldn`t it? ... The wave travels both wires of a feedline simultaneously, ... both ends of the loop at the same time. ...
    (rec.radio.amateur.antenna)
  • Append Query problem
    ... I have created an append query in vba code which is inside a For...Next loop. ... I create an SQL statement to find matching related records in one table, ... then insert these matching records into a temporary table. ...
    (microsoft.public.access.formscoding)
  • Append Query problem
    ... I have created an append query in vba code which is inside a For...Next loop. ... I create an SQL statement to find matching related records in one table, ... then insert these matching records into a temporary table. ...
    (microsoft.public.access.formscoding)