请教大家个验证编辑框的内容是否为空的问题
我试图验证用户是否在编辑框中输入了内容,程序如下:
UpdateData(TRUE);
int i = m_ComBox.GetCurSel();
m_ComBox.GetLBText(i, m_strguestSex);
m_guestID.GetWindowTextW(m_strguestID);
m_guestName.GetWindowTextW(m_strguestName);
m_orderID.GetWindowTextW(m_strorderID);
m_roomID.GetWindowTextW(m_strroomID);
m_guestNation.GetWindowTextW(m_strguestNation);
m_guestPost.GetWindowTextW(m_strguestPost);
m_guestTel.GetWindowTextW(m_strguestTel);
if((m_strguestID.IsEmpty()) || (m_strguestName.IsEmpty()) || (m_strorderID.IsEmpty()) || (m_strroomID.IsEmpty()) || (m_strguestNation.IsEmpty()) || (m_strguestPost.IsEmpty()) || (m_strguestSex.IsEmpty()) || (m_strguestTel.IsEmpty()))
{
AfxMessageBox(_T("输入的数据不完整,请重新输入!"));
return;
}
编译通过了,可是在执行的时候一旦编辑框中真的没输入内容的话,就会弹出错误说atlsimpstr.h文件的Line 876 Expression:nLength>=0
请问大家这是什么意思啊?怎么解决这个问题呢?谢谢大家啦