Partager via


MMCN_SHOW message

The MMCN_SHOW notification message is sent to the snap-in's IComponent implementation when a scope item is selected or deselected.

Parameters

arg

TRUE if selecting. Indicates that the snap-in should set up the result pane and add the enumerated items.

FALSE if deselecting. Indicates that the snap-in is going out of focus and that it should clean up all result item cookies, because the current result pane will be replaced by a new one.

param

The HSCOPEITEM of the selected or deselected item.

Return value

S_OK

The snap-in successfully handled the notification.

S_FALSE

The snap-in does not handle the notification. MMC then performs a default operation for the notification.

Remarks

In their MMCN_SHOW notification handler, snap-ins that have a custom result pane (OCX or web) should cache the cookie (of the scope item) that was passed in the lpDataObject argument in the call to IComponent::Notify. The snap-in needs the cookie to identify the correct scope item when MMC sends it an MMCN_SELECT or MMCN_DESELECT_ALL notification message with a special data object (DOBJ_CUSTOMOCX or DOBJ_CUSTOMWEB). MMC sends the MMCN_SELECT or MMCN_DESELECT_ALL notification with a special data object when the result pane is selected or deselected. The notification is sent to the snap-in's IExtendControlbar::ControlbarNotify and IComponent::Notify method. The only way for snap-ins to identify the corresponding scope item is to use its cookie cached during MMCN_SHOW.

Also, snap-ins that have a custom result pane (OCX or web) can call IConsole2::QueryResultView to query for the OCX control object's IUnknown interface pointer during MMCN_SHOW.

Requirements

Minimum supported client
Windows Vista
Minimum supported server
Windows Server 2008
Header
Mmc.h