Solved

Using Multiple .hlp files in a C++ App

Posted on 1998-04-29
6
262 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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
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…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

743 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