NO

Author Topic: CHM's  (Read 5804 times)

JohnF

  • Guest
CHM's
« on: June 26, 2014, 01:12:23 PM »
Does anyone know how to start a .CHM file and search for a keyword from commandline.

This starts the CHM
hh.exe thefile.chm

But what switches are needed?

Thanks for any help, I've surfed but no luck.

John
« Last Edit: June 26, 2014, 02:00:14 PM by JohnF »

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2096
Re: CHM's
« Reply #1 on: June 26, 2014, 02:01:27 PM »
Maybe here?
It is better to be hated for what you are than to be loved for what you are not. - Andre Gide

JohnF

  • Guest
Re: CHM's
« Reply #2 on: June 26, 2014, 02:40:36 PM »
Yes I've seen that but it's as clear as mud, can't work out what's required to run from the commandline.

I'm guessing but,

hh.exe [something here] help.chm

John


JohnF

  • Guest
Re: CHM's
« Reply #3 on: June 26, 2014, 04:04:42 PM »
Didn't get anywhere with commandline so wrote a small app.

Code: [Select]
#include <windows.h>
#include <htmlhelp.h>

int WINAPI WinMain(HINSTANCE hinst, HINSTANCE hinstPrev,
CHAR *lpCmdLine, int nCmdShow)
{
char s[400];
strcpy(s, lpCmdLine);
HH_AKLINK link;
link.cbStruct = sizeof(HH_AKLINK);
link.fReserved = FALSE;
link.pszKeywords = s;
link.pszUrl = NULL;
link.pszMsgText = "HtmlHelp Error";
link.pszMsgTitle = NULL;
link.pszWindow = NULL;
link.fIndexOnFail = FALSE;
HWND h = HtmlHelp(GetDesktopWindow(),
"D:\\help.chm",
HH_KEYWORD_LOOKUP, (DWORD) & link);

while(IsWindow(h)){
Sleep(100);
}
return (0);
}

John

czerny

  • Guest
Re: CHM's
« Reply #4 on: June 26, 2014, 07:32:16 PM »

JohnF

  • Guest
Re: CHM's
« Reply #5 on: June 26, 2014, 08:19:44 PM »
http://www.help-info.de/de/Help_Info_HTMLHelp/hh_command.htm

Czerny, thanks, I've seen the English version of that page, it doesn't help as the commandline is asking for a .htm

See my previous post, I made a small app to do the job.
 
John


czerny

  • Guest
Re: CHM's
« Reply #6 on: June 28, 2014, 11:49:53 AM »
Code: [Select]
"D:\\help.chm",
John, what help file have you used?

JohnF

  • Guest
Re: CHM's
« Reply #7 on: June 28, 2014, 12:41:29 PM »
It is vccore.chm.

I've just installed VC6 on Win7 so wanted that help file usable from within the IDE.

John

czerny

  • Guest
Re: CHM's
« Reply #8 on: June 28, 2014, 05:43:08 PM »
I do not own VC6, so I have used an other help file:

JohnF

  • Guest
Re: CHM's
« Reply #9 on: June 28, 2014, 07:30:26 PM »
Thanks.

Yes that's quite good, only both cpp.chm and vccore.chm are a little dated - they don't list the more modern functions.

The reason for using it in VC6, is that VC6 only supports the older functions! The best one to use is the PellesC chm file.

vccore.zip is too big to upload here.

EDIT: And thanks for the command line strings.

John
« Last Edit: June 28, 2014, 09:21:08 PM by JohnF »