| Author |
Message |
Simon Heffer

|
Posted: Visual C++ General, Help button get chm instead of hlp |
Top |
I have a application built around a CPropertySheet derived class. The help button is looking for 'app.hlp' file (this is the default MFC stuff, I've not added anything other than moving the button). How do I get it to look for a 'app.chm' file instead
I've tried the following using a test help file in InitInstance()
//First free the string allocated by MFC at CWinApp startup. //The string is allocated before InitInstance is called. free((void*)m_pszHelpFilePath); //Change the name of the .HLP file. //The CWinApp destructor will free the memory. m_pszHelpFilePath=_tcsdup(_T("C:\\filezilla\\filezilla.chm")); EnableHtmlHelp();
but i just get "Failed to launch help"
Visual C++2
|
| |
|
| |
 |
Ted.

|
Posted: Visual C++ General, Help button get chm instead of hlp |
Top |
|
| |
 |
Simon Heffer

|
Posted: Visual C++ General, Help button get chm instead of hlp |
Top |
Good point. Same result though 
|
| |
|
| |
 |
Simple Samples

|
Posted: Visual C++ General, Help button get chm instead of hlp |
Top |
This is a MFC question that really should be asked in a MFC newsgroup; see The scope of this forum.
I happen to have an article that might help with MFC for VC 6 but I assume that won't help you since this forum is for later versions of VC.
|
| |
|
| |
 |
Simon Heffer

|
Posted: Visual C++ General, Help button get chm instead of hlp |
Top |
I'm using VS 2005. I thought HtmlHelp was actually an SDK I don't mind cross -posting if I get an answer though!
|
| |
|
| |
 |
Ted.

|
Posted: Visual C++ General, Help button get chm instead of hlp |
Top |
It works for me. Here's what I did:
1) Launch Visual C++ 2005
2) Create a new MFC project (application)
3) In the wizard, enable HTML Help
4) In my CWinApp derived class InitInstance, just before the call to the base class CWinApp::InitInstance, insert the following code:
free((void*)m_pszHelpFilePath);
m_pszHelpFilePath=_tcsdup(_T("c:\\test.chm"));
5) Copy a test.chm to the root of my C drive
6) Build and launch the application
7) Chose Help - Help topics.
You'll see that the HTML Help file launches fine
|
| |
|
| |
 |
Viorel.

|
Posted: Visual C++ General, Help button get chm instead of hlp |
Top |
I think you can also consider calling of SetHelpMode(afxHTMLHelp) somewhere in your InitInstance function, without other changes. In this case MFC should look for CHM file instead of HLP.
I hope this works.
|
| |
|
| |
 |
Ted.

|
Posted: Visual C++ General, Help button get chm instead of hlp |
Top |
Actually in the wizard generated app I gave, the SetHelpMode is already done in the CWinApp derived constructor (where it should be done) in the call to EnableHtmlHelp (which is eqivalent to what you mentioned)
|
| |
|
| |
 |
Simple Samples

|
Posted: Visual C++ General, Help button get chm instead of hlp |
Top |
Note that you would get faster, more accurate and complete answers in the MFC newsgroup. Actually the fastest answers can be obtained in the documentation; this is something that would be in the documentation.
|
| |
|
| |
 |
Simon Heffer

|
Posted: Visual C++ General, Help button get chm instead of hlp |
Top |
Thanks Ted. Yes I tried it from scratch too and had no problem. My app is a CPropertySheet which is a CWnd. Not sure if that makes a difference
|
| |
|
| |
 |
Ayman Shoukry - MSFT

|
Posted: Visual C++ General, Help button get chm instead of hlp |
Top |
Sam,
For VC2005 MFC issues, these forums are the proper locations.
Thanks,
Ayman Shoukry
VC++ Team
|
| |
|
| |
 |
Simple Samples

|
Posted: Visual C++ General, Help button get chm instead of hlp |
Top |
Ayman Shoukry - MSFT wrote: | |
Sam,
For VC2005 MFC issues, these forums are the proper locations.
Thanks,
Ayman Shoukry
VC++ Team |
|
That sounds good to me. I posted some relevant comments in AfxGetThread from non-MFC thread.
|
| |
|
| |
 |
Ayman Shoukry - MSFT

|
Posted: Visual C++ General, Help button get chm instead of hlp |
Top |
Thanks for your understanding!
To be more clear. These forums are for VC++ 2005 specific issues.
The MFC is part of the libraries owned by the VC++ Team.
Thanks,
Ayman Shoukry
VC++ Team
|
| |
|
| |
 |
CARTHIC

|
Posted: Visual C++ General, Help button get chm instead of hlp |
Top |
I got the same error but in VISTA os...can u tell the way to clear the bug
|
| |
|
| |
 |
| |