Problem with oppenning HTML with CWinApp::OnHelp()
Posted by leykl
on 06/12/2006 03:53am
First of all thanks for a good description and explanation.
I am working on VC7.
I have added: "EnableHtmlHelp();"
m_pszHelpFilePath = _tcsdup(_T(".......chm"));
When i try to run it, i get "Failed to Lunch Help"
The strange thing that if i use with CWinApp::OnHelpFinder
then it works propperly.
ON_COMMAND(ID_HELP, CWinApp::OnHelpFinder) - works.
ON_COMMAND(ID_HELP, CWinApp::OnHelp) - doesn't work
What could be the problem?
Posted by Franek
on 10/13/2006 05:38am
Same for me but even with this command, i don't have anything...What could be the problem ?Thanks
Has anyone had a problem with the latest version of hhctrl.ocx (5.2.3790.233 (srv03_gdr.040918-1552))?
I'm finding that when this version is present on the PC (probably updated automatically by the windows update process), my contents pages won't display. I have to revert back to the version 5.2.3735.0 and then it's ok again.
Nicely written about HTML Help, but the methods suggested for displaying it in MFC are not quite correct.
You should open the constructor of your CWinApp-derived class (eg CMyApp::CMyApp) and add a sole line there:
That would do everything you need! Replace .htm to .chm in the path, call CWnd::HtmlHelp instead of WinHelp on F1, and a dozen other useful things. Try it out :)
Even like this
Posted by Franek
on 10/13/2006 05:31am
I'm working on MFC with VC7 and even like this, meaning with EnableHtmlHelp() and others,i do not have my help file displayed.Instead i've got "Failed to launch help"... Could you help me please ?Thanks
First of all thanks Joep for a good description and explanation. It really helped me.
Here is a better solution that replaces the need of MAKEIDH.EXE
Put this in the custom build step of resource.h for generating the .hm file:
makehm ID_,IDH_,0x10000 IDM_,IDH_,0x10000 resource.h >>"html\$(TargetName).hm"
makehm IDP_,IDH_,0x30000 resource.h >>"html\$(TargetName).hm"
makehm IDR_,IDH_,0x20000 resource.h >>"html\$(TargetName).hm"
makehm IDD_,IDH_,0x20000 resource.h >>"html\$(TargetName).hm"
makehm IDW_,IDH_,0x50000 resource.h >>"html\$(TargetName).hm"
echo. "replacing IDH_ with #define IDH_"
FIND /V "#define" < html\$(TargetName).hm > html\$(TargetName).hm1
FOR /F "tokens=1 delims=" %%i IN (html\$(TargetName)hm1) DO (
FIND "#define" < html\$(TargetName).hm >> html\$(TargetName).hm2
MOVE /Y html\$(TargetName).hm2 html\$(TargetName).hm
Can I use this for something else?
Posted by ajtruckle
on 05/26/2004 02:03am
I have not got this to work for myself yet. I would like to use it. But can I also use it to create a cshelp.h file which also has the IDH_ prefixes (but only for ID_ and IDC_ and that the numbers are left as integers and not hexadecimal.
Is this possible?