Hi,
Im trying to compare a char entered in a text box with another char.
At the moment it works fine, if the whole of the data field in the text box matches the stored char. It works.
eg,
text box - 01212222567
stored char - 01212222567
A match is produced.
Ideally i would like the user to enter just a small number eg, 0121 and it would recognise that it matches part of 01212222567 for example.
How would i go about doing this?
Here is the code im using at the moment.
Code:
else if (cli==1)
{
int item_txt_cli = GetDlgItemText(u_hDlg, IDC_CLI, cCli, 20);
if (strcmp(utDtiLine[viLine].sANI, cCli) == 0)
{
sprintf(sEventMessage, " %-3.3d Drop call %s %s Cause %d", viLine, utDtiLine[viLine].sANI, utDtiLine[viLine].sDNI, viCause);
vLog(sEventMessage);
}
else
{
//do nothing
}
}
As you can see im using strcmp.
Thanks for anyhelp whatsoever,