Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
HTML HELP file problem
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
HTML HELP file problem
Miscellaneous
Thread ID:
00905651
Message ID:
00905651
Views:
55
Hi All!!

The following code is working perfect in my development machine. Is the same code used in three different project. The code look like is working in two project in the user machine but fail to work in one project.
*!*	The functions GetFocus and HtmHelpA will cause an ignorable error
*!*	during compile.

*!*	Help related define statments from htmlhelp.h in the
*!* HTML Help WS folder.

#DEFINE HH_DISPLAY_TOPIC      0x0000
#DEFINE HH_DISPLAY_TOC        0x0001
#DEFINE HH_DISPLAY_INDEX      0x0002
#DEFINE HH_DISPLAY_SEARCH     0x0003 && not currently implemented
#DEFINE HH_HELP_CONTEXT       0x000F && display mapped numeric value
                                     && in dwData

*!*	Get the HelpContextID of the active control.
LOCAL cHelpFile, wHnd, nCommand, cTopic
*!*	HTML help topic page
cTopic = ""

*!*   This is a custom property on the form.
*!*   It can be set in a base/sub class definition
cHelpFile = THISFORM.HTMLHelpFile

*!*   This is a custom property on the object.
*!*   It can be set in a base/sub class definition
IF !USED("UANHEADER")
uanheadername = sys_dir+"uanheader.dbf"
USE (uanheadername) IN 0

ENDIF
SELECT uanheader
SET ORDER TO 1
GO top
LOCATE FOR helpcontex = THISFORM.HelpContextID
IF !EOF()
IF THISFORM.HelpContextID > 0
cTopic = ALLTRIM(UANHEADER.HELPDIR)+"\"+JUSTFNAME(ALLTRIM(uanheader.helptopic))
ELSE
cTopic = JUSTFNAME(ALLTRIM(uanheader.helptopic))
ENDIF
ELSE
GO top
ctopic = JUSTFNAME(ALLTRIM(uanheader.helptopic))
endif

*!*	Active window
wHnd = 0

*!* If there is not topic, goto TOC
nCommand = IIF(EMPTY(cTopic), HH_DISPLAY_TOC, HH_DISPLAY_TOPIC)
DECLARE INTEGER HtmlHelp IN "HHCtrl.ocx" ;
   INTEGER  nHWND, ;
   STRING   cHelpFile, ;
   INTEGER  nCommand, ;
   STRING   cTopic

*!*	Get the active window handle
DECLARE INTEGER GetFocus IN "user32" 

wHnd = GetFocus()

IF wHnd = 0
   =MESSAGEBOX("Unable to get window handle.")
   RETURN
ENDIF

*!*	Call the HTML help system
set help to sys_dir+"helpfiles\Uan_help.chm"
Set Topic Id To Thisform.HelpContextId 
HELP
Set Topic Id To Thisform.HelpContextId 

nRetVal = HtmlHelp(@wHnd, @cHelpFile, @nCommand, cTopic)

USE IN uanheader



RETURN
The only change we make in the project that is not working is change the location where the project is now located. But in my development machine we make the same change. I check the version of the OCX and all have the same version. Also check my header file for the htmlhelp.h and is missing in the user machine. But if this is the problem should fail the other project too. So any idea why my Help screen does not pop up when I press F1.
Gregorio J. Placeres
IT Analyst
Uniform Accounting Network
Auditor of State of Ohio
88 East Broad Street
P.O. Box 1140
Columbus, Ohio 43216-1140

Tel. 614-728-4694

Gregorio_J@MSN.COM

http://www.gjpproductions.com
Next
Reply
Map
View

Click here to load this message in the networking platform