Store the text in a CString or a char* for example and parse through the string to lookup the character you are interesting in.
Otherwise, to stay within your code using GetWindowTextLength:
Code:
char* buffer = NULL;
length = GetWindowTextLength(whatever_control_box); //Like Edit box.
//Add one for the terminating character.
length++;
// Size the buffer to hold all the data;
buffer = new char[length];
//Fill the bufer with text
GetWindowText(whatever_control_box, buffer, length);
// Now iterate through "buffer" your C++ way.