This project is read-only.

cCompositeControls Object

When the cCompositeControls class is instanced, instances of cCompositeControlManager 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,, gObjectReferences 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.

Other References

Default cCompositeControls Object Members
Custom cCompositeControls Object Members

Last edited Dec 25, 2010 at 12:16 PM by vba_junkie, version 10


No comments yet.