You can use the "compare" function.

Say, you have 2 CStrings StringA and StringB.
You can compare them like :
Code: CPP
if ( StringA.compare(StringB) == 0 ) cout << StringA << " and " << StringB << " are not equal.";

So, your code can be modified as :
Code: CPP
CString Instring;
CString Automesg[2];
Automesg[0]="test 1";
Automesg[1]="Test Example2";
if(Instring.compare(Automesg[0])==0)
{      Sleep(1000);   }