1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| strValue= L"";
while (lirePort(ptr)>0) {
//strTmp.Format(L"%s",ptr);
//strValue = strValue+strTmp.Format(L"%s",ptr);
strValue.operator += (ptr);
//strValue.Format(L"%s",ptr);
//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();
}
if (strValue.GetLength()>0) {
//sprintf(temp,"");
//WideCharToMultiByte(CP_ACP,0,strValue,-1,temp,wcslen(strValue)+1,NULL,NULL); // Convertir CString en char
//strValue.Empty();
//strValue.Format(L">%d<",strValue.GetLength());
SendMessage(hEdtT,EM_SETSEL,TextLen,TextLen); // Placer le curseur à la fin
SendMessage(hEdtT,EM_REPLACESEL,0,(LPARAM)(LPCTSTR)strValue); // Ecrit le texte
//MessageBox(NULL,strValue,_T("Info2"),MB_OK);
//envoiClavier(temp);
TextLen += strValue.GetLength();
} |
Partager