
240
USING ROBOHELP HTML 9
Context-sensitive Help
Last updated 12/14/2011
CWaitCursor wait;
// Get the path to the Help system
CWinApp* pApp = AfxGetApp();
ASSERT_VALID(pApp);
// Set the path to server-based help
CString csOnlineHelpPath = _T("http://RoboHelp Server:port/robohelp/server");
PrepareForHelp();
// must use top level parent (for the case where m_hWnd is in DLL)
CWnd* pWnd = GetTopLevelParent();
// finally, run the RoboHelp Help engine
if (!RH_ShowHelp(pWnd->m_hWnd, csOnlineHelpPath, nCmd, dwData))
AfxMessageBox(AFX_IDP_FAILED_TO_LAUNCH_HELP);
Note:
In WebHelp Pro projects, the new context-sensitive Help API is supported only with RoboHelp Server or
RoboEngine 3.0 or later.
Airplane Help for C++ applications
Syntax
void RH_AssociateOfflineHelp(const char * a_pszPrimaryHelpSource, const char *
a_pszBackupHelpSource)
Example
m_sOnline = "http://www.mycompany.com/roboapi.asp?project=myproject";
m_sOffline = "C:\Program Files\My App\WebHelp\StartPage.htm";
RH_AssociateOfflineHelp(m_sOnline, m_sOffline);
Note:
To specify different window names for online and offline Help, you can map windows to RH_AssociateOfflineHelp.
Follow this example for Visual Basic:
strOnline = "http://www.mycompany.com/roboapi.asp?project=myproject>RemoteWindow1"
strOffline = "C:\Program Files\My App\MyHelp.chm>LocalWindow1"
Public cshObject as new RoboHelp_CSH ' Should be global object
cshObject. RH_AssociateOfflineHelp strOnline, strOffline
strOnline = "http://www.mycompany.com/roboapi.asp?project=myproject>RemoteWindow2"
strOffline = "C:\Program Files\My App\MyHelp.chm>LocalWindow2"
cshObject. RH_AssociateOfflineHelp strOnline, strOffline
Note:
WebHelp Pro context-sensitive Help API is supported only with RoboHelp Server or RoboEngine 3.0 or later.
Program Help for Java applications
This information is for developers connecting context-sensitive Help topics to Java applications.
1
Open the project in your Java IDE (integrated development environment).
2
Add RoboHelp_csh.java to the project.
3
Call the function defined in RoboHelp_csh.java using any needed parameters.
Note:
Airplane Help is not supported in the Java API.
Function calls from Java applications
In the following examples, the API shares the same parameters regardless of output type. The only change made is the
location of the Help file.