Click to See Complete Forum and Search --> : Tree views (controls)


Milton
March 31st, 1999, 07:27 AM
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.

real name
March 31st, 1999, 11:11 PM
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 )

{

...

}

}

real name
March 31st, 1999, 11:22 PM
or use NM_CLICK if you have not own derived class

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

t!