Our company is migrating our help systems over to HTML5 format under Flare. We've also added Topic based access to the help systems using Flare CSHID's on the URI command line for accessing the topic directly, such as index.html#CSHID=GettingStarted
to launch the GettingStarted.html
help page.
Our apps are written in C++ and leverage the Win32 ShellExecute()
function to spawn the default application associated with HTTP to display the help system. We've noticed that ShellExecute()
works fine when no hashtag is specified, such as
ShellExecute(NULL, _T("open"), _T("c:\\Help\\index.html"), NULL, NULL, SW_SHOWNORMAL);
This function will launch the default browser associated with viewing HTML pages and in this case, the File:///
protocol handler will kick in, the browser will launch and you will see file:///c:/Help/index.html
in the address bar.
However, once you add the #
information for the topic, ShellExecute()
fails to open the page
ShellExecute(NULL,_T("open"),_T("c:\\Help\\index.html#cshid=GettingStarted"),NULL,NULL,SW_SHOWNORMAL);
If the browser opens at all, you'll be directed to file:///c:/Help/index.htm
l without the #cshid=GettingStarted
topic identification.
Note that this is only a problem if the File protocol handler is engaged through ShellExecute()
, if the help system lives out on the web, and the Http or Https protocol handler is engaged, everything works great.
For our customers, some of whom are on a private LAN, we cannot always rely on Internet access, so our help systems must ship with the application.
#cshid=<topic-id>
part of the URL? – Incapacitate