0

如何在编辑代码本身时将字符串设置为具有从右向左(U + 200F右向左标记(RLM))的unicode字符?从C++代码从右到左的Outlook表单区域

含义,我有给定的代码:

CComPtr<MSForms::IControl> spISubjectControl; 
spControls->_GetItemByName(_bstr_t(L"Subject"), &spISubjectControl); 
if (spISubjectControl != NULL) { 
    CComPtr<Outlook::_OlkTextBox> spSubject; 
    hr = spISubjectControl.QueryInterface(&spSubject); 
    if (spSubject != NULL) { 
     CString subject = L"Some words in some RTL language"; 
     spSubject->put_Text(_bstr_t(subject)); 
    } 
} 

遗憾的是,没有足够的添加方向和主题文本框的“超前性”的特殊字符,似乎一旦我改变TextBox的内容方向重置为LTR。

请帮助:)

感谢,

尼莉

回答

0

确保subject字符串确实包含的Unicode字符RLM。尝试使用L"\u200F ‏Some words in some RTL language"。如果\u200F转义序列不起作用,请尝试使用\x200F