使用相同的代码,VS2008和VS2013给出了不同的结果。隐藏线在VS2013中向右移动。
HTREEITEM hItemPartSets = m_wndBlockTree.InsertItem( _T("Big Block"), 0, 0, NULL);
HTREEITEM hItemDefault = m_wndBlockTree.InsertItem( _T("Default"), 0, 0, NULL);
m_wndBlockTree.SetItemState(hItemDefault, INDEXTOSTATEIMAGEMASK(2), TVIS_STATEIMAGEMASK);
HTREEITEM hItemProperties = m_wndBlockTree.InsertItem( _T("By Properties"), 0, 0, NULL);
m_wndBlockTree.SetItemState(hItemProperties, INDEXTOSTATEIMAGEMASK(2), TVIS_STATEIMAGEMASK);
HTREEITEM hItemMaterials = m_wndBlockTree.InsertItem( _T("By Materials"), 0, 0, NULL);
m_wndBlockTree.SetItemState(hItemMaterials, INDEXTOSTATEIMAGEMASK(2), TVIS_STATEIMAGEMASK);
HTREEITEM hItemElement = m_wndBlockTree.InsertItem( _T("By Element"), 0, 0, NULL);
m_wndBlockTree.SetItemState(hItemElement, INDEXTOSTATEIMAGEMASK(2), TVIS_STATEIMAGEMASK);