Microsoft KB Archive/298727

{|
 * width="100%"|

MMC SAMPLE: Implementing IExtendContextMenu

 * }

Q298727

-

The information in this article applies to:


 * Microsoft Management Console, version 2.0

-

SUMMARY
The sample project provided through this article demonstrates how to implement IExtendContextMenu to add items to the Management Console's default context menu.

MORE INFORMATION
The following file is available for download from the Microsoft Download Center:

"MMC_ContextMenu.exe" Release Date: Jun-12-2001

For additional information about how to download Microsoft Support files, click the article number below to view the article in the Microsoft Knowledge Base:

"Q119591 How to Obtain Microsoft Support Files from Online Services" Microsoft used the most current virus detection software available on the date of posting to scan this file for viruses. Once posted, the file is housed on secure servers that prevent any unauthorized changes to the file.

The MMC_ContextMenu.exe file contains the following files:

The MMC_ContextMenu.exe contains the C++ source files needed to build a Microsoft Management Console (MMC) snap-in that implements IExtendContextMenu.

To build the project, expand MMC_ContextMenu and open ContextMenu.dsw in Microsoft Visual C++ version 6.0 or later.

This project requires MMC 2.0 to run. MMC 2.0 is available with Windows XP or Whistler Beta 2 or later. Also required are the MMC 2.0 header files and libraries from the Microsoft Platform SDK for Whistler Beta 2 or later. These are available from the Microsoft Download Center:

"http://www.microsoft.com/downloads/search.asp"

Additional Product Features
This project includes a simple modeless dialog class. This class is implemented in the files CBaseDialog.h and CBaseDialog.cpp.

Because the MMC SDK samples do not have dependencies on Active Template Library (ATL) or Microsoft Foundation Classes (MFC), this class is included to simplify the adding of modeless dialog boxes in response to user interface events, such as selection of an item from a context menu. Note that modal dialog boxes and property sheets should never be used in a snap-in. Use of modal dialog boxes or property sheets blocks the Management Console's primary thread and prevents other snap-ins in the same console from functioning correctly.

Additional query words: MMC_ContextMenu MMC_Samples2

Keywords : kbfile kbDSupport

Issue type : kbinfo

Technology : kbAudDeveloper kbMMCSearch kbMMC200