开发者

CRichEditCtrl loads Unicode text incorrectly

开发者 https://www.devze.com 2023-03-26 13:22 出处:网络
I use CRichEditCtrl in my dialog, but when I pasted in it copied Vietnamese text, the text doesn\'t display correct text; odd characters are displayed where the 2 byte encoded chara开发者_运维百科cter

I use CRichEditCtrl in my dialog, but when I pasted in it copied Vietnamese text, the text doesn't display correct text; odd characters are displayed where the 2 byte encoded chara开发者_运维百科cters are shown.

Has any one run into this problem before? How can I fix this?


You should be using font like Arial Unicode MS which has Unicode characters for multi language support. Use CWnd::SetFont with your CRichEditCtrl object in CDialog::OnInitDialog. For creating font have an object of type CFont. Create font using CFont::CreatePointFont or CFont::CreateFont method.

0

精彩评论

暂无评论...
验证码 换一张
取 消