16,548
社区成员




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;
}