Microsoft KB Archive/241624

{|
 * width="100%"|

HOWTO: Disable the MMC Help File From Displaying by Clicking F1

 * }

Q241624

-

The information in this article applies to:


 * Microsoft Management Console, versions 1.1, 1.2

-

SUMMARY
When you develop an Microsoft Management Console (MMC) Snap-in, it is very common to have a help file associated with the Snap-in. This help file can be displayed using the MMC help features that are available to the Snap-in developer.

MORE INFORMATION
The MMC architecture sends a MMCN_CONTEXTHELP notification to the Component::Notify handler when F1 is selected, or the Help menu item is clicked for the Snap-in. Typically, most developers would like to have the normal help behavior that MMC provides. By default, MMC will bring up the MMC help file in a separate window if a WinHelp Help file is loading using the WinHelp API. If you use IDisplayHelp::ShowTopic to display an HTMLHelp help file, MMC will merge the help file with the default MMC Help. There are times when you do not want the default MMC help to be displayed.

In the Component::Notify handler code segment that processes the MMCN_CONTEXTHELP notification, simply return an S_OK as the HRESULT. Returning an S_OK will cause MMC not to load the default MMC help file.

The following is an example of a Component::Notify handler that demonstrates how to do this:

 STDMETHODIMP CComponent::Notify {   LPDATAOBJECT     ipDataObject, MMC_NOTIFY_TYPE MmcEvent, LONG            nArg, LONG            nParam } {    HRESULT hr = S_OK; switch( MmcEvent )

{     case MMCN_CONTEXTHELP: hr = S_OK; // hr = S_FALSE MMC Help will be displayed. // hr = S_OK then MMC help will not be displayed. break; }

return hr; } //end Notify Additional query words: HTMLHelp, WinHelp, MMCN_CONTEXTHELP, Disabling, Help File

Keywords : kbGrpDSPlatform kbMMC110 _IK kbhowto kbMMC120

Issue type : kbhowto

Technology : kbAudDeveloper kbMMCSearch kbMMC110 kbMMC120