minifiredragon
Programmer
When I do the GetLength() I get an error when I check the number. No matter what length I make it, it always is wrong.
Here is what I have, and quite frankly I don't see any error in the code.
void CInsertDlg::OnOK()
{
// TODO: Add your specialized code here and/or call the base class
//ESM Code
//Check Input for proper number
CheckNum(m_sCardNum);
CDialog::OnOK();
}
void CInsertDlg::CheckNum(CString number)
{
int length;
ten = 1;
length = number.GetLength();
if ( length < 10 )
AfxMessageBox("Error, incorrect number", MB_ICONSTOP | MB_OK);
}
Here is what I have, and quite frankly I don't see any error in the code.
void CInsertDlg::OnOK()
{
// TODO: Add your specialized code here and/or call the base class
//ESM Code
//Check Input for proper number
CheckNum(m_sCardNum);
CDialog::OnOK();
}
void CInsertDlg::CheckNum(CString number)
{
int length;
ten = 1;
length = number.GetLength();
if ( length < 10 )
AfxMessageBox("Error, incorrect number", MB_ICONSTOP | MB_OK);
}