Hello,
Thanks for the reply. I have tried a different approach, but got a new issue. Hopefully someone can help.
Here is the code
And I am getting an error "error C2664: 'CWnd::SetDlgItemTextA' : cannot convert parameter 2 from 'char' to 'LPCTSTR' ...Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast"Code:{ CString myEdit1; char a; int i; const int KEY = 23; this -> GetDlgItemText(IDC_EDIT1, myEdit1); int length = myEdit1.GetLength(); char *p = myEdit1.GetBuffer(); for (i = 0; i < length; i++) { *(p + i) = (*(p + i) ^ KEY); } a = (char)*(p+1); SetDlgItemText(IDC_EDIT2, a); }
I am not sure how to sort this out. Hopefully someone can help.
Thanks in advance.
Seán




Reply With Quote