Solved

Using Multiple .hlp files in a C++ App

Posted on 1998-04-29
6
265 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ADO Memory leak with DELPHI 2007 37 170
Prototype for MessageDlg in Embacadero XE 2 2 35
how to convert c++ code to Android App 3 82
Unable to start eclipse ? 17 132
When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
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 goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

911 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

20 Experts available now in Live!

Get 1:1 Help Now