I think strings need to be converted into numerical values
int x = atoi(szText.Mid(0,2));
int y = atoi(szText.Mid(2,2));
int z = atoi(szText.Mid(4));
incase of Unicode Strings better use mfc Macro's
int x = atoi(W2A(szText.Mid(0,2)));
int y = atoi(W2A(szText.Mid(2,2)));
int z = atoi(W2A(szText.Mid(4)));