Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Using Multiple .hlp files in a C++ App

Posted on 1998-04-29
6
Medium Priority
?
284 Views
Last Modified: 2010-04-10
The default behavior is for each application to use a single .hlp file.  How would I go about using multiple .hlp files?
0
Comment
Question by:burnsm
  • 4
  • 2
6 Comments
 
LVL 11

Accepted Solution

by:
alexo earned 100 total points
ID: 1167403
Your application can call the WinHelp() function any number of times with different .HLP files.
0
 

Author Comment

by:burnsm
ID: 1167404
The standard WinHelp function only takes 2 parameters, the correct syntax to use the appropriate WinHelp function is as follows:

      ::WinHelp(this->m_hWnd, strPath, HELP_CONTENTS, 0);

0
 
LVL 11

Expert Comment

by:alexo
ID: 1167405
Huh?  The "standard" Win32 WinHelp() takes 4 arguments:

BOOL WinHelp(
    HWND hWndMain,      // handle of window requesting Help
    LPCTSTR lpszHelp,      // address of directory-path string
    UINT uCommand,      // type of Help
    DWORD dwData       // additional data
   );      

Now, if you're talking about MFC abominations like CWinApp::WinHelp(), then it's a different ballgame.  In general, when calling any Win32 API from an MFC program (or a C++ program that uses any library that wraps API calls) you should use the "::" global scope qualifier.

But you didn't ask the question in the MFC area and you didn't mention MFC at all, did you?

0
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!

 
LVL 11

Expert Comment

by:alexo
ID: 1167406
Was that the reason for the bad grade?
0
 

Author Comment

by:burnsm
ID: 1167407
Yes, that was the reason for the bad grade - it appears that there was a communication breakdown.   I was unaware of the differences between CWinApp::WinHelp() and the Win32 API.  (Online help for Visual C++ only talks about the CWinApp::WinHelp() method).

Your lastest response does a very good job at clarifying the differences between the 2 and for that response I feel you deserve high marks.  Thanks for the clarification.
0
 
LVL 11

Expert Comment

by:alexo
ID: 1167408
>> Online help for Visual C++ only talks about the CWinApp::WinHelp() method.

Nope, The code I quoted was taken straight from the online help of MSVC.  Maybe your default subsets are set wrong?  Check the "help" submenu.

BTW, it is possible (and appropriate) to ask for clarifications before graiding an answer...

0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
Suggested Courses

971 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