如何定义 HTMLhelp 的字符集?

发布于 2024-08-26 13:27:15 字数 788 浏览 11 评论 0原文

我的 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

不寐倦长更 2024-09-02 13:27:15

(只是猜测。)可能需要在 HTML 帮助中定义字符集,而不是 HH_POPUP 结构。 HTML 帮助主题的 META 标记中指定了字符集吗?例如:

<META http-equiv="Content-Type" content="text/html" charset="Windows-1251">

另外,你们的帮助文件是否指定了相应的语言?例如:

<Project.hhp>

[OPTIONS]
Language=0x419 Russian (Russia)

(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 the META tags of your HTML Help topics? E.g.:

<META http-equiv="Content-Type" content="text/html" charset="Windows-1251">

Also, is the corresponding language specified for your help file? E.g.:

<Project.hhp>

[OPTIONS]
Language=0x419 Russian (Russia)
笑红尘 2024-09-02 13:27:15

通过将带有弹出标签的 txt 文件从 UNICODE 转换为 ANSI 解决了该问题。谢谢大家的帮助

The problem has solved by converting txt file with popup labels from UNICODE to ANSI. Thank you everyone for your help

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文