Mr. Linares -> Error Message on .CHM-Help
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Günther,
You can not use numbers for topics when using CHM files. It does not work. Please use strings. i.e:
HelpTopic("Setup") // this works fine with your CHM file
Use strings that correspond to one of the Contents entries, or a specific opic string from your CHM builder tool.
Regarding the use of lShow, what we do is to avoid the show of help if the help is already displayed. It can't be a CLASSDATA or you will be limited a just one shown help from your app, when you can have several simultaneously (not the same as "recursive", that is what lShow controls).
You can not use numbers for topics when using CHM files. It does not work. Please use strings. i.e:
HelpTopic("Setup") // this works fine with your CHM file
Use strings that correspond to one of the Contents entries, or a specific opic string from your CHM builder tool.
Regarding the use of lShow, what we do is to avoid the show of help if the help is already displayed. It can't be a CLASSDATA or you will be limited a just one shown help from your app, when you can have several simultaneously (not the same as "recursive", that is what lShow controls).
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Günther,
Please test this EXE using your CHM file (not included):
http://rapidshare.com/files/142115491/testhelp.zip.html
Please test this EXE using your CHM file (not included):
http://rapidshare.com/files/142115491/testhelp.zip.html
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Antonio, please download this ZIP and read testhelp.txt.
All others can also download the files to test the helptest.exe with the helpfile.
http://byte-one.com/helptest.zip
All others can also download the files to test the helptest.exe with the helpfile.
http://byte-one.com/helptest.zip
I have now tested with a dialog called from a dialog. The same thing! First called the help from the shown dialog, then called the help from parent dialog and at end the help from main window. The right ding is to only show the help from focused dialog or window and NOT call all the helps from the complete hierarchie!
Popup help is functioning but should only called with the"?" symbol in dialogmenu. F1 should shown the normal help for this dialog or window. For popup help should the file to be set with a function like SetHelpPopup( popupfile )!
Popup help is functioning but should only called with the"?" symbol in dialogmenu. F1 should shown the normal help for this dialog or window. For popup help should the file to be set with a function like SetHelpPopup( popupfile )!
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Günther,
> Antonio, please download this ZIP and read testhelp.txt.
There is NO a "goto" topic in your CHM file.
Change your example to use "Setup" topic, that does exists!
DEFINE DIALOG oDlg NAME "test" TITLE "Help-Test-Dialog with Help-ID 11" HELPID "Setup"
REDEFINE BUTTON ID 104 OF oDlg ACTION HelpTopic( "Setup" )
I have the feeling that you don't read what I am telling you...
> Antonio, please download this ZIP and read testhelp.txt.
There is NO a "goto" topic in your CHM file.
Change your example to use "Setup" topic, that does exists!
DEFINE DIALOG oDlg NAME "test" TITLE "Help-Test-Dialog with Help-ID 11" HELPID "Setup"
REDEFINE BUTTON ID 104 OF oDlg ACTION HelpTopic( "Setup" )
I have the feeling that you don't read what I am telling you...
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Günther,
Fixed. This is the required change:
Here you have your modified PRG, RC and the EXE:
http://rapidshare.com/files/142429970/gunther.zip.html
I kindly ask other readers to test it and confirm how it works for you, thanks
Fixed. This is the required change:
Code: Select all
METHOD Help( nWParam, nLParam ) CLASS TDialog
local hWndChild := HelpCtrlHwnd( nLParam ), nAtChild
static lShow := .f.
::lHelpIcon = .f.
if ! lShow
lShow = .t.
if ( nAtChild := AScan( ::aControls, { | o | o:hWnd == hWndChild } ) ) != 0 .and. ;
! Empty( ::aControls[ nAtChild ]:nHelpID )
::aControls[ nAtChild ]:HelpTopic()
else
::HelpTopic()
endif
lShow = .f.
return 1 // NEW !!!!!!!!
endif
return nil
http://rapidshare.com/files/142429970/gunther.zip.html
I kindly ask other readers to test it and confirm how it works for you, thanks
Oh Antonio, its functioning! I am happy!!!!!!
The CHM you uploaded is defect!? On itself can not called any topics.
This points are also to view:
1.) Popup help is functioning but should only called with the"?" symbol in dialogmenu. F1 should shown the normal help for this dialog or window.
2.) For popup help should the file to be set with a function like SetHelpPopup( popupfile )!
3.) The coordinates from the popup-help is the mouse-position. It should be the position from the control if the mouse-position could be on any position when F1 pressed. (only if point 1.) are aktive!)
The CHM you uploaded is defect!? On itself can not called any topics.
This points are also to view:
1.) Popup help is functioning but should only called with the"?" symbol in dialogmenu. F1 should shown the normal help for this dialog or window.
2.) For popup help should the file to be set with a function like SetHelpPopup( popupfile )!
3.) The coordinates from the popup-help is the mouse-position. It should be the position from the control if the mouse-position could be on any position when F1 pressed. (only if point 1.) are aktive!)
I have made some changes from this points:
to 3.) I have also changed control.prg (method __helpTopic()), help32.prg and helpchm.prg to set the coordinates relativ to the calling control!
Antonio, please show me an way to 1.). It is not good, when F1 on an get shows the popup-help from this get-control. It should show the HelpTopic from the dialog! Only the "?" in dialog sysmenu should show the popup!
If all points OK, I will publish you the changes to inspect.
to 2.) In the file helpchm.prg i defined the functions SetHelpPopup() and GetHelpPopup() to define the textfile embedded in the CHM.1.) Popup help is functioning but should only called with the"?" symbol in dialogmenu. F1 should shown the normal help for this dialog or window.
2.) For popup help should the file to be set with a function like SetHelpPopup( popupfile )!
3.) The coordinates from the popup-help is the mouse-position. It should be the position from the control if the mouse-position could be on any position when F1 pressed. (only if point 1.) are aktive!)
to 3.) I have also changed control.prg (method __helpTopic()), help32.prg and helpchm.prg to set the coordinates relativ to the calling control!
Antonio, please show me an way to 1.). It is not good, when F1 on an get shows the popup-help from this get-control. It should show the HelpTopic from the dialog! Only the "?" in dialog sysmenu should show the popup!
If all points OK, I will publish you the changes to inspect.