CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 1999
    Posts
    18

    Tree views (controls)



    I have just written a program that uses Tree views (controls).


    What I want to do is to be able to launch a dialog box once the user clicks on any of the items in the Tree view. How can I do this.


    Thanks.

  2. #2

    Re: Tree views (controls)



    this is my code for double click message

    i think you need quite the same but for wm_l... message

    t!

    void CLayerTreeCtrl::OnLButtonDblClk(UINT nFlags, CPoint point)

    {

    CMultiTreeCtrl::OnLButtonDblClk(nFlags, point);

    UINT nHitFlags = 0;

    HTREEITEM hClickedItem = HitTest( point, &nHitFlags );

    if( nHitFlags & LVHT_ONITEMLABEL )

    {

    ...

    }

    }




  3. #3

    Re: Tree views (controls)



    or use NM_CLICK if you have not own derived class

    (in dialog editor right menu at tree ctrl and events item)

    t!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured