Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Text popups in HtmlHelp
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Text popups in HtmlHelp
Miscellaneous
Thread ID:
00256881
Message ID:
00256881
Views:
47
Dear All

I have a nice WinHelp API function that raises text popups nicely:

**********************************
PROCEDURE ContextHelp
LPARAMETER ContextID
LOCAL HWND

#DEFINE HELP_CONTEXTPOPUP 8
#
DECLARE INTEGER WinHelp IN USER32 INTEGER, STRING, INTEGER, INTEGER
DECLARE INTEGER GetActiveWindow IN USER32

* parameters FOR WinHelp from WIN32API.HLP
* HWND hwnd, // handle of window requesting Help
* LPCTSTR lpszHelp, // address of directory-path string
* UINT uCommand, // type of Help
* DWORD dwData // additional data

HWND = GetActiveWindow()
= WinHelp(HWND, "POPUP.HLP", HELP_CONTEXTPOPUP, ContextID)
CLEAR DLLS
ENDPROC
**********************************

But I'm using HtmlHelp now. I cannot get a rewrite, or any of the alternatives, to work in HtmLHelp. For example:

**********************************
PROCEDURE ContextHelp
LPARAMETER nContextID
LOCAL hWnd

#DEFINE HH_DISPLAY_TEXT_POPUP 14

DECLARE INTEGER HtmlHelp IN HHCTRL.OCX INTEGER, STRING, INTEGER, INTEGER
DECLARE INTEGER GetActiveWindow IN USER32

hWnd = GetActiveWindow()
= HtmlHelp(hWnd, "POPUP.CHM", HH_DISPLAY_TEXT_POPUP, nContextID)
CLEAR DLLS
ENDPROC
**********************************

This brings up the right help file but causes an instant GPF. I don't even know if it is syntactically correctly to declare 'HtmlHelp IN HHCTRL.OCX'. Also, HHCTRL.OCX doesn't behave like a normal ActiveX that can be put in a class library.

Another way, where 2001 is mapped to a .topic in a file specified in the [TEXT POPUPS] section in HtmlHelp workshop:

**********************************
THIS.WhatsThisHelpID = 2001
THIS.ShowWhatsThis
**********************************

This raises "HH_HELP_CONTEXT called without [MAP] section Error".
See: http://206.86.100.18:8080/fvisualbasicexplorerhtmlhelp
for a lot of other people who can't figure out how to crack this one.

I have wasted a fair amount of time with no success. Any ideas?
John Burton
Next
Reply
Map
View

Click here to load this message in the networking platform