Currently my code have CString DisplayMessage, which is being used by my code all over to exchange DisplayMessage between clients and servers. Now as software is going international, I want DisplayMessage to have Unicode string message.
One technique I found is to
Create:
Class CDisplayMessage{ CString ASCIIMsg; CStringW UnicodeMsg; bool IsUnicode; ... };ASCII msg is required, So that I can make message backward compatible.
Replace data type of
CString DisplayMessagetoCDisplayMessage DisplayMessage.And then need to change all the places where it is being used (that is more headache). Usage is like:
DisplayMessage = some other CString; DisplayMessage = "sdfsdf";
Question:
Can anyone suggest me to provide some other solution or improve my solution, so that their is minimum change to do at all other places.
Note:
- Platform : MS VISUAL STUDIO (Windows), C++
- CharSet: Multi-Byte Character Set(can't change)