Outlook 窗体区域从右到左从 C++代码
在编辑代码本身时,如何将字符串设置为从右到左(U+200F 从右到左标记(RLM))unicode 字符?
意思是,我有给定的代码:
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));
}
}
不幸的是,在主题文本框的“高级属性”中添加方向和特殊字符是不够的,似乎一旦我更改了文本框的内容,方向就会重置为 LTR。
请帮忙:)
谢谢,
尼利
How can I set a string to have Right-to-Left (U+200F RIGHT-TO-LEFT MARK (RLM)) unicode char when editing the code itself?
Meaning, I have the given code:
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));
}
}
Unfortunately it is not enough to add the direction and the special character in the "advance properties" of the subject TextBox, it seems that once I change the content of the TextBox the direction is reset to LTR.
Please help :)
Thanks,
Nili
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
确保
subject
字符串确实包含 Unicode RLM 字符。尝试使用L"\u200F 某些 RTL 语言中的某些单词"
。如果\u200F
转义序列不起作用,请尝试使用\x200F
。Make sure that the
subject
string does contain the Unicode RLM character. Try withL"\u200F Some words in some RTL language"
. If the\u200F
escape sequence does not work, try\x200F
instead.