CTreeCtrl::SetInsertMark
This member function implements the behavior of the Win32 message TVM_SETINSERTMARK, as described in the Windows SDK.
BOOL SetInsertMark(
HTREEITEM hItem,
BOOL fAfter = TRUE
);
Параметры
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.
Возвращаемое значение
Nonzero if successful; otherwise 0.
Пример
// Set the insert mark to be before the item at the point myPoint.
UINT uFlags;
HTREEITEM hItem = m_TreeCtrl.HitTest(myPoint, &uFlags);
if ((hItem != NULL) && (TVHT_ONITEM & uFlags))
{
m_TreeCtrl.SetInsertMark(hItem, FALSE);
}
Требования
Header: afxcmn.h