Copy link to clipboard
Copied
Hi all,
Right now I'm using a trial version of Robohelp 11, because we want to redo our programs offline help. I'm a developer and trying to launch the Robohelp with the API from our C++ MFC application.
Steps I've taken:
Add the RoboHelp_CSH.cpp to the project
Add the RoboHelp_CSH.h to the project
Disabled the precompiled headers for the RoboHelp_CSH.cpp
Added the Psapi.lib, wininet.lib and Htmlhelp.lib to the Linker Input
Added the #include "RoboHelp_CSH.h" to my project
Generated a webhelp project using the Robohelp 11 trial program
My OS is Windows 7 Professional 64-bit, done all updates. My default browser is Google Chrome, latest version.
The thing is, my program compiles, but never launches a page. I have tried all kinds of things in my program, listing a few below. The result of the RH_ShowHelp() is always 1.
int i = RH_ShowHelp(0, "C:/Users/username/Desktop/Controller/index.htm#<str=controller.html>>newwnd=false", HH_HELP_CONTEXT, 0);
int i = RH_ShowHelp(0, "C:/Users/username/Desktop/Controller/index.htm#<str=controller.html", HH_HELP_CONTEXT, 0);
int i = RH_ShowHelp(0, "C:/Users/username/Desktop/Controller/index.htm", HH_HELP_CONTEXT, 0);
int i = RH_ShowHelp(0, "C:/Users/username/Desktop/Controller/index.htm#controller.html", HH_HELP_CONTEXT, 0);
int i = RH_ShowHelp(0, "C:/Users/username/Desktop/Controller/index.htm#controller", HH_HELP_CONTEXT, 0);
int i = RH_ShowHelp(0, "Controller/index.htm#controller.html", HH_HELP_CONTEXT, 0); (with the generated Webhelp folder in the executable folder)
int i = RH_ShowHelp(0, "Controller/index.htm#<controller.html", HH_HELP_CONTEXT, 0); (with the generated Webhelp folder in the executable folder)
int i = RH_ShowHelp(0, "Controller/index.htm", HH_HELP_CONTEXT, 0); (with the generated Webhelp folder in the executable folder)
What am I doing wrong?
(If more information is needed for an answer please say so, I'll gladly provide more info to get this to work.)
- Marleen
Copy link to clipboard
Copied
Is your application starting a browser or not doing anything at all?
The documentation (RoboHelp_CSH.h) says you can use -1 as first parameter to use IE. Does that help?
Kind regards,
Willam
Copy link to clipboard
Copied
Hi Willam,
Thanks for the quick reply.
All the options I mentioned in my first post did not show any effect, no browser started.
I tried your suggestion with -1 in this way:
int i = RH_ShowHelp((HWND)-1, "C:/Users/username/Desktop/Controller/index.htm", HH_HELP_CONTEXT, 0);
That does not open a window either. Also tried this with my program running as administrator just in case.
Any more suggestions by any chance?
- Marleen
Copy link to clipboard
Copied
No more ideas on c++ I'm afraid. I'm not a programmer, so I don't know where to look if the default API fails.
The only thing I can think of is to open a browser yourself and put in the correct URL. (See Calling Webhelp and Context sensitivity in WebHelp and FlashHelp)
Copy link to clipboard
Copied
Hi Willam,
The suggestion you offer, opening a browser with the correct URL, is exactly the workaround I'm using now, doing a ShellExecute commando with the help page I want to open. Which works alright, but I was hoping to use the proper API received with the RoboHelp trial.
Is there another forum where I can ask this developer question?
Thanks for your help and thoughts so far.
- Marleen
Copy link to clipboard
Copied
Hi marleens88897412‌,
If you are using the call for context sensitive help then you should also provide the mapno of the topic you want which is the fourth argument and it can not be zero.
If you want to open the First page of your WebHelp output then the third argument which is the command name should be HH_DISPLAY_TOPIC then fourth argument does not matter.
Please try the appropriate solution and revert if you face any problem.
Copy link to clipboard
Copied
Hi
I am in the same situation. Did you find any solution ?
Copy link to clipboard
Copied
Half the problem may be that you're trying to use Chrome with RH11 that may not be completely patched up with the latest browser security fixes.
Copy link to clipboard
Copied
Hi,
I think that is irrelative with the problem. Any security problems of any browser has nothing to do with the simple calling of opening a an html page. In my case - and of course the original question problem - is that the MFC App fails to call the default browser to open an html page.
If I do this directly ie, using ShellExecute or Naviagate2 functions it works fine, but if you need the CSH API to open a specific page then it fails fails.
PS : Adobe needs to do a better job on this, we dont own nothing to spent hours and hours trying to find out how the heck this thing works.