News:

Download Pelles C here: http://www.smorgasbordet.com/pellesc/

Main Menu

CHM's

Started by JohnF, June 26, 2014, 01:12:23 PM

Previous topic - Next topic

JohnF

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

frankie

"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

JohnF

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

Didn't get anywhere with commandline so wrote a small app.


#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


JohnF

Quote from: czerny on June 26, 2014, 07:32:16 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

Quote from: JohnF on June 26, 2014, 04:04:42 PM

"D:\\help.chm",

John, what help file have you used?

JohnF

It is vccore.chm.

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

John

czerny

I do not own VC6, so I have used an other help file:

JohnF

#9
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