BOOL SetInsertMark( HTREEITEM hItem, BOOL fAfter = TRUE );
Return Value
Nonzero if successful; otherwise 0.
Parameters
hItem
HTREEITEM that specifies at which item the insertion mark will be placed. If this argument is NULL, the insertion mark is removed.
fAfter
BOOL value that specifies if the insertion mark is placed before or after the specified item. If this argument is nonzero, the insertion mark will be placed after the item. If this argument is zero, the insertion mark will be placed before the item.
Remarks
This member function implements the behavior of the Win32 message TVM_SETINSERTMARK, as described in the Platform SDK.
Example
// The pointer to my tree control.
extern CTreeCtrl* pmyTreeCtrl;
// The point to test.
extern CPoint myPoint;
// Set the insert mark to be before the item at the point myPoint.
UINT uFlags;
HTREEITEM hItem = pmyTreeCtrl->HitTest(myPoint, &uFlags);
if ((hItem != NULL) && (TVHT_ONITEM & uFlags))
{
pmyTreeCtrl->SetInsertMark(hItem, FALSE);
}