CTreeCtrl::EnsureVisible
트리 보기 항목을 볼 수 있도록 하려면이 함수를 호출 합니다.
BOOL EnsureVisible(
HTREEITEM hItem
);
매개 변수
- hItem
표시 되지 트리 항목의 핸들입니다.
반환 값
반환 TRUE 시스템 항목에서 지정 된 항목을 볼 수 있도록 트리 보기 컨트롤을 스크롤할 경우. 그렇지 않으면 반환 값이 거짓.
설명
필요한 경우 함수는 상위 항목을 확장 또는 항목을 볼 수 있도록 트리 보기 컨트롤을 스크롤합니다.
예제
HTREEITEM hItem = m_TreeCtrl.GetSelectedItem();
// hmyItem is the item that I want to ensure is visible.
HTREEITEM hmyItem = m_TreeCtrl.GetChildItem(hItem);
// Expand the parent, if possible.
HTREEITEM hParent = m_TreeCtrl.GetParentItem(hmyItem);
if (hParent != NULL)
m_TreeCtrl.Expand(hParent, TVE_EXPAND);
// Ensure the item is visible.
m_TreeCtrl.EnsureVisible(hmyItem);
요구 사항
헤더: afxcmn.h