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);
4

2 回答 2

0

该问题已通过将带有弹出标签的 txt 文件从 UNICODE 转换为 ANSI 来解决。谢谢你们每一个人的帮助

于 2011-04-08T08:25:21.717 回答
0

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

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

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

<Project.hhp>

[OPTIONS]
Language=0x419 Russian (Russia)
于 2010-03-24T16:39:17.533 回答