cmoboBox的使用问题

wmkevin2008 2010-06-11 09:14:00
现在在下拉表中可以选取对象,但是如果在下拉编辑框中输入一个完整的名称然后 打回车,就会报错
这是为什么呢?有没有谁知道解决方法,谢拉~
...全文
106 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
wmkevin2008 2010-06-11
  • 打赏
  • 举报
回复
不是啊,用的工具栏里的combobox。。。
上面那个是combobox里的代码
怎么改一下
让回车后不出错
现在点回车
会出现对话框 说内存错误
Eleven 2010-06-11
  • 打赏
  • 举报
回复
你自己自绘的CComboBox控件???
wmkevin2008 2010-06-11
  • 打赏
  • 举报
回复
总共60M.。。什么邮箱能发啊
zougangx 2010-06-11
  • 打赏
  • 举报
回复
把代码发给我,给你调试一下 zougangx@163.com
wmkevin2008 2010-06-11
  • 打赏
  • 举报
回复
因为我才发了2个帖。。。都没结呢,新手
void CMyDlg::OnEditchangeCombo3()
{
pointReady();
MSXML::IXMLDOMNodeListPtr nodelist1 = NULL;
nodelist1=pDoc3->selectNodes("root/point");
nodelist1->get_length(&nodecount3);
CString strcourse,str;
m_endposition.GetWindowText(strcourse);
if (strcourse!="")
{
m_e.Insert(0,strcourse);
int iCount=m_position.GetCount();
for(long i=0;i<iCount;i++)
m_endposition.DeleteString(0);
for(int j=0;j<nodecount3;j++)
{
str=allpoint[j].name;
if(str.Find(strcourse,0)!=-1)
{
m_endposition.AddString(str);
}
}
m_endposition.ShowDropDown();
SetCursor(LoadCursor(NULL,IDC_ARROW));
m_endposition.SetWindowText(strcourse);
m_endposition.SetEditSel(strcourse.GetAllocLength(),strcourse.GetAllocLength());
}
}

muzizongheng 2010-06-11
  • 打赏
  • 举报
回复
报什么错, 你贴出来, 要不然怎么知道你写的代码有问题,
还有, lz的结贴率0%。。。。。。。。。
acai1028 2010-06-11
  • 打赏
  • 举报
回复
先帮顶,一会我也试试

15,979

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 界面
社区管理员
  • 界面
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧