我想将所选中的树形菜单中的项显示在相应的Edit控件中
怎么做我只写了一句 m_GetData=m_ListData.GetSelectedItem();
m_GetData是Edit的变量,m_ListData为树形菜单的变量
可是有这样的提示错误error C2679: binary '=' : no operator defined which takes a right-hand operand of type 'struct _TREEITEM *' (or there is no acceptable conversion)怎么办
怎么做我只写了一句 m_GetData=m_ListData.GetSelectedItem();
m_GetData是Edit的变量,m_ListData为树形菜单的变量
可是有这样的提示错误error C2679: binary '=' : no operator defined which takes a right-hand operand of type 'struct _TREEITEM *' (or there is no acceptable conversion)怎么办
if (NULL != hItemSel)
{
m_GetData.SetWindowText(m_ListData.GetItemText(hItemSel));
}
在CString 中没找到合适的代替SetWindowText的
请高手指点
HTREEITEM hItemSel = m_ListData.GetSelectedItem();
if (NULL != hItemSel)
{
m_GetData = m_ListData.GetItemText(hItemSel);
this->UpdateData(FALSE);
}
在EDIT控件里面不显示,哭死
谢谢你哦
设个断点看m_GetData取到没有
刷新没有用么?
UpdateData(FALSE);
那这样GetDlgItem(IDC_EDIT1)->SetWindowText(m_Data);//调试的时候可以把m_Data换成"haha"看下.IDC_EDIT1就是你的那个编辑框控件的ID应该成功吧.