Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem open HTML HELP in a form with activex Control.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Problem open HTML HELP in a form with activex Control.
Divers
Thread ID:
00853504
Message ID:
00853504
Vues:
49
Hi All!

Following the example of "Whatthis.exe" I create a new method in my main form. The help work fine in the development machine but in the user machine did not open the screen of help. I read something about activex control got the focus and disable the F1 to call the help screen.

Somebody new how to avoid that?

this is my code that include the command HELP in order to avoid that. But I did not like to create the command twice in order to create my help form. In the development enviroment it produce two screen, as expected but in the user machine produce only the one call by HELP.
#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("CEMHEADER")
USE CEMheader IN 0

ENDIF
SELECT CEMheader
SET ORDER TO 1
GO top
LOCATE FOR helpcontex = THISFORM.HelpContextID
IF !EOF()
IF THISFORM.HelpContextID > 0
cTopic = ALLTRIM(cemheader.HELPDIR)+"\"+JUSTFNAME(ALLTRIM(cemheader.helptopic))
ELSE
cTopic = JUSTFNAME(ALLTRIM(cemheader.helptopic))
ENDIF
ELSE
GO top
ctopic = JUSTFNAME(ALLTRIM(cemheader.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 Topic Id To Thisform.HelpContextId 
HELP

nRetVal = HtmlHelp(@wHnd, @cHelpFile, @nCommand, cTopic) && this is the correct command but did not open with activex control.

USE IN cemheader
RETURN
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform