zuckera
asked on
how to set wide-char html to CHtmlEditCtrl
Hi,
I've got a WCHAR * variable which holds html with non-english characters in it (could be chinease, turkish, japanese, hebrew, whatever)
I need to get that html into my CHtmlEditCtrl 's document. So i use:
CString temp(lpWideCharStr);
CHtmlEditCtrl::SetDocument HTML(temp) ;
Problem is, I see that lpWideCharStr holds the correct value, but temp already has an invalid value (q. marks instead of the characters)
How do i create a CString with the correct value? if this is not the way to do it, then how??
I need it ASAP so I guess 500 points would be appropriate.
Thanks!
I've got a WCHAR * variable which holds html with non-english characters in it (could be chinease, turkish, japanese, hebrew, whatever)
I need to get that html into my CHtmlEditCtrl 's document. So i use:
CString temp(lpWideCharStr);
CHtmlEditCtrl::SetDocument
Problem is, I see that lpWideCharStr holds the correct value, but temp already has an invalid value (q. marks instead of the characters)
How do i create a CString with the correct value? if this is not the way to do it, then how??
I need it ASAP so I guess 500 points would be appropriate.
Thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for your response!!
Is there a way to do it locally to the function and not affect the whole project?
Is there a way to do it locally to the function and not affect the whole project?
ASKER
ok, your suggestion worked, i didn't use it since it's not an option (the project is too big to change to unicode w/o investing a lot of time in the conversion.)
BUT, I suppose you deserve the points :)
BUT, I suppose you deserve the points :)
If UNICODE char set is used, it will be a const wchar_t, if not, will be a const char *.
If you're not using VC++.NET, but VC++6.0, define UNICODE and _UNICODE in your project settings, preprocessor definitions.