miércoles, 07 de marzo de 2012 6:44
I am not using MFC in my project and also runing with UNICODE. So I can't use "CString" class in my project and CString provide many functions(Format(), reverseFind(), Left(), etc) but I need "Format()" like function for for fomating the strings.
I am using "ICU" APIs and it provide "UnicodeString" class which can use on place of "CString", but there are few function not finding. If any one using "ICU" APIs then please tell me about "Format()" function or "Format()) like functiopn.
Todas las respuestas
miércoles, 07 de marzo de 2012 7:41
I think that you can replace CString::Format with your own function that uses vswprintf or StringCchVPrintfW. As a destination buffer use the value returned by UnicodeBuffer::getBuffer(...). If the buffer is insufficient, then make a loop that tries a larger one. Then call UnicodeBuffer::releaseBuffer(-1).
If you have the sources of ATL and MFC, then see how Format is done.
miércoles, 07 de marzo de 2012 12:00