Solved

How to change what the help file is?

Posted on 2006-11-19
4
210 Views
Last Modified: 2013-11-20
I have a program, Sample.exe, developed with MFC in VC 6.0. I use a Sample.rtf to build a Sample.hlp. This is used when the user hits Help>Contents, and also when the user hits F1 on any screen.

For international localization, during execution I need to be able to swtich to a different help file, Sample_French.hlp under program control.

How do I do this?
0
Comment
Question by:DickStone
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 5

Expert Comment

by:Alkali_Guy
ID: 17977145
You can override the WM_HELPINFO (OnHelpInfo) handler and use the WinHelp function to open the help file you want.  If selecting the help menu item does not open the correct file, you can replace that handler with your own as well, and have it call the same OnHelpInfo handler.  There may be some remaining stickiness associated with context-sensitive help.  E.g.:

WinHelp(m_hWnd, "C:\FooApp\Sample.hlp", HELP_CONTENTS, 0);
0
 
LVL 5

Accepted Solution

by:
Alkali_Guy earned 400 total points
ID: 17977205
This PDF explains a more general way to reroute help functionality.  It focuses on adapting a project for HtmlHelp, but the principle is the same.  Apparently you have to override CFrameWnd::WinHelp.

http://www.smountain.com/resource/CPPHTMLHelp.pdf
0
 
LVL 22

Expert Comment

by:mahesh1402
ID: 17977253
Whats exact problem ? Regarding invoking right help file on langauge detection ??

Note that you can just keep all .hlp files in one folder under your application installation path and runtime copy needed file as Sample.hlp to invoke same everytime when you detect your language-id. You may just use CopyFile() to copy file and on application exit delete the same using DeleteFile()/CFile::Remove().


-MAHESH
0
 

Author Comment

by:DickStone
ID: 17980101
Yes -- I'm trying to switch to a French hep file when it detects that French is the dialog/messages language.

The CopyFile is the easiest solution, but would have to be done for both English and French -- slowing the startup.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question