Multi selection and the Data Objects Used For Communication

[This is preliminary documentation and subject to change.]

If snap-in items are included in multiselection includes, the console queries the snap-ins for a multiselect data object. This is done by passing the special cookie MMC_MULTI_SELECT_COOKIE to the QueryDataObject call.

The snap-in provided multiselection data object (SI-MS-DO) that will be returned MUST provide the list of object types of all the currently selected items put by the snap-in in the CCF_OBJECT_TYPES_IN_MULTI_SELECT clipboard format. The data for this format will be cast as a pointer to SMMCObjectTypes structure.

The console will use this structure to determine the extension snap-ins.

The console also creates a composite data object consisting of an array of these snap-in provided multiselection data objects from all the selected snap-ins, (MMC-MS-DO). The clipboard format for the array of snap-in provided multiselection data object is CCF_MULTI_SELECT_SNAPINS, and the data can be cast as a pointer to SMMCDataObjects structure.

The data object passed to the snap-in for notifications when multiple items are selected is shown in the table at the end of this section.

Another data object, CUTORMOVE_DO, is best understood in terms of the paste process. If objects that are being pasted need to be deleted at the source as a result of a previous cut or move operation, then the param for MMCN_PASTE will be a pointer to a boolean or a pointer to LPDATAOBJECT, depending on whether one item is selected or multiple items are selected (determined from the data object). If the paste is successful, the destination snap-in should return TRUE for single-selection data objects. For multiple-selection data objects, the destination snap-in should return the CUTORMOVE_DO data object, which in turn will be passed to the source snap-in for the MMCN_CUTORMOVE notification. The format to communicate the list of items successfully pasted should be defined by the source snap-in. Note that the param for MMCN_PASTE will be 0, if it does not involve a previous cut or move operation.

Notification Data object sent
MMCN_BTN_CLICK MMC-MS-DO
MMCN_CONTEXTMENU MMC-MS-DO
MMCN_CUTORMOVE CUTORMOVE_DO
MMCN_DELETE SI_MS_DO
MMCN_QUERY_PASTE MMC-MS-DO
MMCN_PASTE SI_MS_DO
MMCN_SELECT SI_MS_DO