1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| char *ptr,temp[MAX_LOADSTRING];
CString strValue;
ptr = temp;
... CODE ...
if (strValue.GetLength()>0) {
SendMessage(hEdtT,EM_SETSEL,TextLen,TextLen); // Placer le curseur à la fin
SendMessage(hEdtT,EM_REPLACESEL,0,(LPARAM)(LPCTSTR)strValue); // Ecrit le texte
TextLen += strValue.GetLength();
/*WideCharToMultiByte(CP_ACP,0,strValue,-1,temp,wcslen(strValue)+1,NULL,NULL); // CString->char
strValue.Format(L">%s<",temp);
SendMessage(hEdtT,EM_SETSEL,TextLen,TextLen); // Placer le curseur à la fin
SendMessage(hEdtT,EM_REPLACESEL,0,(LPARAM)(LPCTSTR)strValue); // Ecrit le texte
TextLen += strValue.GetLength(); // */
} |
Partager