Solved

Open help from an app.

Posted on 1998-11-30
4
248 Views
Last Modified: 2013-11-20
I´ve made an Dialog based app. And now I´ve also made a myhlp.hlp file. I have a button on my MFC app and now I want´to know the code for launching my hlp file when I click the button. I would really like the code for this since I´m new at MFC.
Thenx...
0
Comment
Question by:Ffaze
[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 2

Expert Comment

by:prasanth
ID: 1325563
Simply handle the button press like any other button and call AfxGetApp()->WinHelp(<helpid>) where <helpid> is the identifier of the topic in the help file.
0
 

Author Comment

by:Ffaze
ID: 1325564
I´m sorry but it doesn´t work, I´ve tried many different ways. I need to call the right help file also I tried to use the name but I don´t understand what you mean with HelpId, I´ve tried using the Id that I use when I call the topics in the Help file but that doesn´t work it comes up as undeclared identifier.
I would like some more help please....
0
 
LVL 2

Accepted Solution

by:
wyy_cq earned 50 total points
ID: 1325565
this API can do that for you :


hWnd=GetSafeHwnd();
::WinHelp(hWnd,"c:\\help.hlp",HELP_CONTENTS ,0);

or you can modify the CWinApp:: m_pszHelpFilePath
and then call CWinApp::OnHelp();

 

0
 

Author Comment

by:Ffaze
ID: 1325566
Thank you very much, it should be HELP_FINDER instead of HELP_CONTENTS.
0

Featured Post

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

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.
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…

691 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