16,551
社区成员
发帖
与我相关
我的任务
分享void MySubTreeCtrl::OnClick(NMHDR* pNMHDR, LRESULT* pResult)
{
DWORD dw = GetMessagePos(); // Mouse position
CPoint p(GET_X_LPARAM(dw), GET_Y_LPARAM(dw));
this->ScreenToClient(&p);
UINT htFlags = 0;
HTREEITEM hHitItem= this->HitTest(p, &htFlags); // Find tree item which was clicked.
//hHitItem为当前选中的节点
*pResult = 0;
}