MFC Ctreectrl使用中遇到个有关问题
MFC Ctreectrl使用中遇到个问题
如上,在树的双击事件中删除节点会报错,那位老师有着经验啊
------解决方案--------------------
item != NULL
void CDeletetreeitemDlg::OnDblclkTree(NMHDR* pNMHDR, LRESULT* pResult)
{
// TODO: Add your control notification handler code here
HTREEITEM item = m_tree.GetSelectedItem();
if(item)
{
m_tree.DeleteItem(item);
}
*pResult = 0;
}
如上,在树的双击事件中删除节点会报错,那位老师有着经验啊
------解决方案--------------------
item != NULL