如何定义 HTMLhelp 的字符集?
我的 C++ windows 程序使用 htmlhelp。结构 HH_POPUP 包含格式为 pszFont 的字段:“Facename[, point size[, CHARSET[, color[, PLAIN BOLD ITALIC UNDERLINE]]]]”,但我找不到任何有关定义字符集。我的俄语弹出帮助完全无法阅读。
HH_POPUP popupAttr;
memset(&popupAttr, 0, sizeof(popupAttr));
popupAttr.cbStruct = sizeof(popupAttr);
popupAttr.clrBackground = COLORREF(-1);
popupAttr.clrForeground = COLORREF(-1);
popupAttr.rcMargins.left = -1;
popupAttr.rcMargins.bottom = -1;
popupAttr.rcMargins.right = -1;
popupAttr.idString = UINT(helpInfo->dwContextId);
popupAttr.pt = helpInfo->MousePos;
popupAttr.pszFont = _T("Arial,18,HOW_TO_DEFINE_THIS_CHARSET"); // please!!!
CWnd::GetDesktopWindow()->HtmlHelp(reinterpret_cast<DWORD>(&popupAttr), HH_DISPLAY_TEXT_POPUP);
My C++ windows program uses htmlhelp. Structure HH_POPUP includes field pszFont in format: "Facename[, point size[, CHARSET[, color[, PLAIN BOLD ITALIC UNDERLINE]]]]", but I cannot find any info about way to define the charset. My russian popup help is totally unreadeable.
HH_POPUP popupAttr;
memset(&popupAttr, 0, sizeof(popupAttr));
popupAttr.cbStruct = sizeof(popupAttr);
popupAttr.clrBackground = COLORREF(-1);
popupAttr.clrForeground = COLORREF(-1);
popupAttr.rcMargins.left = -1;
popupAttr.rcMargins.bottom = -1;
popupAttr.rcMargins.right = -1;
popupAttr.idString = UINT(helpInfo->dwContextId);
popupAttr.pt = helpInfo->MousePos;
popupAttr.pszFont = _T("Arial,18,HOW_TO_DEFINE_THIS_CHARSET"); // please!!!
CWnd::GetDesktopWindow()->HtmlHelp(reinterpret_cast<DWORD>(&popupAttr), HH_DISPLAY_TEXT_POPUP);
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
(只是猜测。)可能需要在 HTML 帮助中定义字符集,而不是
HH_POPUP
结构。 HTML 帮助主题的META
标记中指定了字符集吗?例如:另外,你们的帮助文件是否指定了相应的语言?例如:
(Just a guess.) It might be that the charset needs to be defined in your HTML Help rather than the
HH_POPUP
structure. Is the charset specified in theMETA
tags of your HTML Help topics? E.g.:Also, is the corresponding language specified for your help file? E.g.:
通过将带有弹出标签的 txt 文件从 UNICODE 转换为 ANSI 解决了该问题。谢谢大家的帮助
The problem has solved by converting txt file with popup labels from UNICODE to ANSI. Thank you everyone for your help