void CPrdTreeView::OnRButtonDown(UINT nFlags, CPoint point)
{
CTreeView::OnRButtonDown(nFlags, point);
CMenu PopupMenu;
CMenu SubMenu;
SubMenu.CreateMenu();
SubMenu.AppendMenu(MF_STRING,1,"&new");
SubMenu.AppendMenu(MF_STRING,2,"&open");
PopupMenu.CreatePopupMenu();
PopupMenu.AppendMenu(MF_POPUP,(UINT)SubMenu.m_hMenu,"&file");
PopupMenu.AppendMenu(MF_STRING,3,"&view");
GetCursorPos(&point);
CPoint PointInTree = point;
ScreenToClient( &PointInTree);
HTREEITEM hCurItem = GetTreeCtrl().HitTest(PointInTree,&nFlags);
PopupMenu.TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, point.x, point.y,
this);
}