Is this correct way? I have tried many ways, it seems that does not work properly
CString result;
result = ExecuteExternalProgram(L"c.txt", L"t.txt"); // return a CString
if (result == _T("one"))
MessageBox(NULL,result.GetBuffer(), L"one", MB_OK);
else
MessageBox(NULL,result.GetBuffer(), L"two", MB_OK);
C strings can’t be compared with
==—==compares whether the result pointer is the same as the pointer to your translated string. They won’t be equal. If you’re going to use C strings, then you should use C string comparison functions: