NO

Author Topic: CHM's  (Read 1612 times)

Offline JohnF

  • Member
  • *
  • Posts: 1114
    • http://www.johnfindlay.plus.com/
CHM's
« on: June 26, 2014, 12: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, 01:00:14 PM by JohnF »

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 1571
Re: CHM's
« Reply #1 on: June 26, 2014, 01:01:27 PM »
Maybe here?

Offline JohnF

  • Member
  • *
  • Posts: 1114
    • http://www.johnfindlay.plus.com/
Re: CHM's
« Reply #2 on: June 26, 2014, 01: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


Offline JohnF

  • Member
  • *
  • Posts: 1114
    • http://www.johnfindlay.plus.com/
Re: CHM's
« Reply #3 on: June 26, 2014, 03: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, 06:32:16 PM »

Offline JohnF

  • Member
  • *
  • Posts: 1114
    • http://www.johnfindlay.plus.com/
Re: CHM's
« Reply #5 on: June 26, 2014, 07: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, 10:49:53 AM »
Code: [Select]
"D:\\help.chm",
John, what help file have you used?

Offline JohnF

  • Member
  • *
  • Posts: 1114
    • http://www.johnfindlay.plus.com/
Re: CHM's
« Reply #7 on: June 28, 2014, 11:41:29 AM »
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, 04:43:08 PM »
I do not own VC6, so I have used an other help file:

Offline JohnF

  • Member
  • *
  • Posts: 1114
    • http://www.johnfindlay.plus.com/
Re: CHM's
« Reply #9 on: June 28, 2014, 06: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, 08:21:08 PM by JohnF »