Solved

How to change what the help file is?

Posted on 2006-11-19
4
200 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
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.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

771 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now