Announcement

Collapse
No announcement yet.

Treeview lparam question for windows experts

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Treeview lparam question for windows experts

    I've read some MSDN references and it appears that the LPARAM member of the TV_ITEM structure is maintained entirely by the application. Supposing that I don't need to use it in a notification message, is there any way at all that Windows can trample on this value?

    What attracts me to using LPARAM is that the same treeview can be used to get a rules selection from the user in the conventional way and also to drive processing based on the selected rules by walking the tree, providing that the decisions and actions are referenced by a member of the TV_ITEM structure, for example by using LPARAM to contain a function address.

    I doubt if I am the first coder to come up with this idea, but if there are examples of this in the forums, I missed them!

  • #2
    TV_ITEM.lparam is yours, 100%. Windows never steps on it.

    The listview has a row-level lparam, too.
    Michael Mattias
    Tal Systems (retired)
    Port Washington WI USA
    [email protected]
    http://www.talsystems.com

    Comment


    • #3
      Thanks!

      Comment


      • #4
        So do comboboxes and listboxes (offer 'row level lparam' which is yours and yours alone).

        In all these cases, these 'row level lparams' are in ADDITION to the 'control level lparam' value which may be stored at %GWL_USERDATA.

        MCM
        Michael Mattias
        Tal Systems (retired)
        Port Washington WI USA
        [email protected]
        http://www.talsystems.com

        Comment

        Working...
        X