次の方法で共有


Using List Views: Implementation Details

To implement a list view

  1. Implement the IComponent::GetResultViewType method. The ppViewType parameter specifies the view type. For standard list views, the value of the parameter should be NULL, indicating that MMC should display the default view type (list view). Specify the view options with the pViewOptions parameter. Use the MMC_VIEW_OPTIONS_NONE option to specify no view options.

    Alternately, if IComponent::GetResultViewType returns S_FALSE, MMC will automatically set the view type to list view and the view options to MMC_VIEW_OPTIONS_NONE.

  2. Handle the MMCN_ADD_IMAGES notification message, which MMC sends to the snap-in's IComponent implementation to request images for the result pane.

  3. Handle the MMCN_SHOW notification message, which MMC sends to the snap-in's IComponent implementation to indicate that the result pane has the focus. In response to the notification, the snap-in should:

  4. Implement the IComponent::GetDisplayInfo method. After the snap-in returns from the MMCN_SHOW notification handler, MMC calls its IComponent::GetDisplayInfo implementation once for each item in the result pane to request the item's display information.

  5. Handle the MMCN_SELECT notification message, which MMC sends after MMCN_SHOW to indicate which item in the scope pane is currently selected. In the notification handler, the snap-in has the opportunity to update the standard verbs for the scope item. See Enabling MMC Standard Verbs for details.

    MMCN_SELECT is also sent when a result item is selected, at which time the snap-in can update the standard verbs for the selected item in the result pane.

Using List Views: Interfaces