Solved

How to change what the help file is?

Posted on 2006-11-19
4
204 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
  • 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Creating Labels and Frequency list style reports in SAS code 9 105
Looking for a specific application/software 2 114
has77  challenge 9 89
Message not shown 5 67
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

840 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