The MASM Forum Archive 2004 to 2012

General Forums => The Workshop => Topic started by: Nonameo on September 04, 2005, 12:33:57 AM

Title: Getting the Currently Selected Item on a TreeView control
Post by: Nonameo on September 04, 2005, 12:33:57 AM
Hey guys, does anyone know how i can retrive the handle to the currently selected TreeView item ?

i've tried some stuff already, mainly using sendmessage and checking some big structures to see if they differ when i click on a different item, but no success.

if somones knows how to do this i would appreciate it

Thanks

-Nonameo-
Title: Re: Getting the Currently Selected Item on a TreeView control
Post by: hutch-- on September 04, 2005, 01:47:07 AM
NoName,

I moved the topic to the Workshop si you would get more answers. The MASM32 subforum is for project related topics.
Title: Re: Getting the Currently Selected Item on a TreeView control
Post by: ToutEnMasm on September 04, 2005, 05:36:54 AM
Hello,
With winhelp , there is no problem to get it.The problem would be in your code.
A little resume on how to proceed.
WM_NOTIFY
         TVN_SELCHANGED
            ;get the item here

Put your code here , if you want someone help you modify it
                           
                          ToutEnMasm
   
Title: Re: Getting the Currently Selected Item on a TreeView control
Post by: wizzra on September 05, 2005, 07:11:50 AM
http://www.codeproject.com/treectrl/treeview.asp

hope my artcle will help you.
Title: Re: Getting the Currently Selected Item on a TreeView control
Post by: Manos on October 08, 2006, 09:00:21 PM
You have to send a TVM_GETNEXTITEM message to the TreeView Control,
with flag TVGN_CARET

Manos.
Title: Re: Getting the Currently Selected Item on a TreeView control
Post by: Shantanu Gadgil on January 07, 2007, 04:34:51 PM
Old topic, I know...but this works perfect. Thanks...

QuoteYou have to send a TVM_GETNEXTITEM message to the TreeView Control,
with flag TVGN_CARET

Regards,
Shantanu