Hi! It is not really a bug, but can you please tell me, what type of variable should I use with textFile.read(&buffer;, 1000) for &buffer.; When type is BYTE, by default, it reads well from non-unicode text documents, but I can not figure out, how to output loaded text with pBackBuffer->drawFormattedText, because it requers TCHAR type as 5th parametr. And if I set &buffer; variable as TCHAR type, or any other (not BYTE), it is not working with unicode, and none-unicode text documents, I mean it reads just some single characters like '[]' in to the &buffer; variable and thats is all. Maybe there is some way to convert from byte to tchar? I have read many manuals for this 4 days and just can't figure it out.
Meanwhile, you could use this ugly workaround:
- Code:
TCHAR text[15];
BYTE buffer[15];
root.read(buffer, 15);
for(int i=0; i<15; i++){
text[i] = (TCHAR)buffer[i];
}
text[14]=0;
ASAP we will bring you a solution.
Thank you for your Feedback!
Matias