When the cCompositeControls class is instanced, instances of
are created corresponding to the types of controls used. This provides intelli-sense friendly referencing of the individual controls and allows different control types to be managed separately.
The cCompositeControls instance also provides a global collection,,
which is used to store a reference to each object that is a part of the Composite Controls object model. This is useful in debugging memory leaks and ensuring all objects are properly destroyed.
Finally, the class instance provides a place to add custom code to manage the creation / destruction of Composite Control objects. Often, one object may require active references to other Composite Controls objects (i.e., a custom control will require an event
handler control for it's parent form). Rather than create a litany of circular references between the classes so that the classes can instantiate one another as needed, it is preferrable to manage this sort of work at the highest level and outside the
classes requiring the extra references. This significantly simplifies managing object creation and destruction and reduces debugging time.
The cCompositeControls instance is created and initialized on application startup, before forms requiring composite controls are loaded.
Default cCompositeControls Object Members
Custom cCompositeControls Object Members