Skip to main content
February 26, 2015
Question

How to launch Robohelp generated WebHelp from C++ application?

  • February 26, 2015
  • 2 replies
  • 1118 views

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

This topic has been closed for replies.

2 replies

sdancer75
Participant
April 25, 2016

Hi

I am in the same situation. Did you find any solution ?

Jeff_Coatsworth
Community Expert
Community Expert
April 26, 2016

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.

sdancer75
Participant
April 26, 2016

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.

Willam van Weelden
Inspiring
February 26, 2015

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

February 26, 2015

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

Willam van Weelden
Inspiring
March 3, 2015

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)