Announcing Property Window Selection Tracking
If you want to work with the Properties window or the Property pages, for example, a form, text, or a selection for which you want to see properties, then you must have complete knowledge of how you coordinate selection. For example, you must know whether you have single selection or multiple selections. You then need to announce your selection type (single or multiple) to the IDE using the ITrackSelection interface. This interface provides information required by the Properties window.
To announce selection to the environment
The selection container object can use either single or multiple selections and contains the selection information in an IDispatch object. Calling the OnSelectChange method notifies the Properties window that the selection has changed. The Properties window then uses the objects on ISelectionContainer to determine whether single or multiple selections have occurred, and what the actual object selections are.
If you specify a multiple selection, then the Properties window finds the intersection between common properties for the objects. If you specify a single object selection, then the Properties window displays all of the properties for the one object.