+ if (m_helpFile.IsEmpty())
+ return false;
+
+ return CallHtmlHelp(HH_HELP_CONTEXT, section);
+}
+
+/* static */
+bool
+wxCHMHelpController::DoDisplayTextPopup(const wxChar *text,
+ const wxPoint& pos,
+ int contextId,
+ wxWindow *window)
+{
+ HH_POPUP popup;
+ popup.cbStruct = sizeof(popup);
+ popup.hinst = (HINSTANCE) wxGetInstance();
+ popup.idString = contextId;
+ popup.pszText = text;
+ popup.pt.x = pos.x;
+ popup.pt.y = pos.y;
+ popup.clrForeground = ::GetSysColor(COLOR_INFOTEXT);
+ popup.clrBackground = ::GetSysColor(COLOR_INFOBK);
+ popup.rcMargins.top =
+ popup.rcMargins.left =
+ popup.rcMargins.right =
+ popup.rcMargins.bottom = -1;
+ popup.pszFont = NULL;
+
+ return CallHtmlHelp(window, NULL, HH_DISPLAY_TEXT_POPUP, &popup);
+}
+
+bool wxCHMHelpController::DisplayContextPopup(int contextId)
+{
+ return DoDisplayTextPopup(NULL, wxGetMousePosition(), contextId,
+ GetParentWindow());
+}