Solved

Using Multiple .hlp files in a C++ App

Posted on 1998-04-29
6
271 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
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.

 
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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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

What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
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.

828 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