The following example illustrates how you can use batched notification when multiple shapes are added to or removed from TShapeList. This approach allows TShapeView to receive only one notification and perform one invalidation for all of the shapes, rather than process a notification and perform an invalidation for each shape individually.
Batched notification is an optimization that requires the cooperation of both sender and receiver in order to receive its benefits. See "Optimizing using batched notification" on page 43 for more information.