I have a tree control
when I left click on anything it gets selected
but when I right click on it, it gets highlighted for the period that the mouse button is down and then, the highlight goes back to the branch that I had left clicked on before

do you know how I can select a branch when I right
clich on it too,
(for example in windows explorer, when you right click on something it gets selected and you see a drop down menu too)
I can create the drop down but the not the selection
[
void CTreeDlg::OnRclickTree(NMHDR* pNMHDR, LRESULT* pResult)
{
NMTREEVIEW* pNMTreeView = (NMTREEVIEW*)pNMHDR;
CTreeCtrl* pTree = (CTreeCtrl*)GetDlgItem(IDC_TREE);
HTREEITEM hSelected = pNMTreeView->itemNew.hItem;

if (hSelected != NULL)
{
]
hSelected is always NULL