用HitTestHTREEITEM HitTest( CPoint pt, UINT* pFlags );其中根据pFlags就能判断鼠标点击的位置 flags: TVHT_ONITEMBUTTON On the button associated with an item. TVHT_ONITEMICON On the bitmap associated with an item. TVHT_ONITEMINDENT In the indentation associated with an item.
flags:
TVHT_ONITEMBUTTON On the button associated with an item.
TVHT_ONITEMICON On the bitmap associated with an item.
TVHT_ONITEMINDENT In the indentation associated with an item.
CPoint point( LOWORD(dwPos), HIWORD(dwPos) );m_tree.ScreenToClient(&point); m_tree.HitTest(point, pFlags);
....