Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How To call a .chm file from PB 1

Status
Not open for further replies.

zakkar

Programmer
Dec 3, 2002
72
GR
Hello ,
I'm using robohelp the last version to make a file .chm which there i can include my online manual.I design it in the robo and when i compile it the robo makes an chm file.So far enerything is ok.But the problem starts with powerbuilder 7.03.PB has ready function to call hlp files but it doesn't have function to call chm files.I have tried to declare an local external function to call an api.I wrote the following code in the declaration area
"Function long HtmlHelp(long hwndCaller,string pszFile, long uCommand , any dwData ) Library "HHCtrl.ocx" "
HHCtrl.ocx is an active x control which can call htmlhelp function where you can pass arguments.I wrote down the following code
"ll = HtmlHelp(0, "c:\zakshare\testhelp\resources.chm", HH_DISPLAY_TOPIC , "c:\zakshare\testhelp\poroi.htm" )" but the main problem exists.I cannot open the chm file.Can you help me ???Thank you
 
Hello , I had already tried that.The code that i have wrotten is :

long ll

ll = Run("c:\HelpFiles\Resources.Chm", Normal!)

The command returns -1.
Any more suggestions??I also tried to insert an ole_control .I have registered it and import the hhctrl.ocx on my screen .I have tried to call the function show of the control but an error has occured.There is an API which i can call but i don't know what Api method is.Do you Know this?
Thnaks Anyway. :)
 
Well! There should be an app that launches the .chm files that accepts a .chm file as an argument and opens it (eg: c:\windows\Notepad.exe c:\Documents\demo.txt). You could give the name of the executable that launches the .chm file and give the .chm file-name as a command-line parameter.

If your users have the .chm launcher in different locations on their computers, you may copy this executable to a central place such as a network file-server and hard-code the pathname of the executable into the Run() function with the parameter of the .chm file.

Regards,

--
PowerObject!
-----------------------------------------
PowerBuilder / PFC Developers' Group
 
I am try to find the programme which launches this file.But i don't know it.I will keep searching.Thank you
 
The name of the executable is HH.exe (HTML Help Executable). On my machine, it is in the Windows folder and it works fine when executed with a parameter.

Good luck!

--
PowerObject!
-----------------------------------------
PowerBuilder / PFC Developers' Group
 
Thank you very much PowerObject.My best wishes to You.Merry Christmas and a happy new year to you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top