Link to home
Start Free TrialLog in
Avatar of burnsm
burnsm

asked on

Using Multiple .hlp files in a C++ App

The default behavior is for each application to use a single .hlp file.  How would I go about using multiple .hlp files?
ASKER CERTIFIED SOLUTION
Avatar of alexo
alexo
Flag of Antarctica image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of burnsm
burnsm

ASKER

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);

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?

Was that the reason for the bad grade?
Avatar of burnsm

ASKER

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.
>> 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...