Click to See Complete Forum and Search --> : icons from shell32


sublime99
March 4th, 2008, 11:24 AM
delete please

sublime99
March 4th, 2008, 11:40 AM
............

Marc G
March 4th, 2008, 12:39 PM
Try handling the NM_RCLICK message of the tree as follows:
void CMyTreeCtrl::OnNMRclick(NMHDR *pNMHDR, LRESULT *pResult)
{
CPoint pt;
GetCursorPos(&pt);
ScreenToClient(&pt);
HTREEITEM hSelected = HitTest(pt);
if (hSelected)
SelectItem(hSelected);

*pResult = 0;
} NOTE: This is MFC, but you can easily translate this to Win32 API.
And show your right click menu in your WM_CONTEXTMENU handler.