动态控件数组是应用程序设计中经常用到的重要手段之一。合理地使用动态控件数组不但能简化程序、方便维护,还可以节约内存空间,对动态控件数组的研究有助于增加应用程序灵活性,能有效提高编程效率。鉴于此,提出了在C++Builder环境下基于容器对象的动态控件数组实现方案,分别给出利用三种容器对象TList,DynamicArray和Vector实现动态控件数组的思想,对三者的性能进行比较分析,并总结了实现动态控件数组的原理、方法和技巧。
Dynamic control arrays are often used in application programming.Reasonably using dynamic control arrays can simplify application procedures and their maintenance,save memory space,increase the flexibility of application procedure,and effectively improve the efficiency of application programming.The schemes of dynamic control arrays based on container object under C++Builder are presented.Three kinds of container objects TList,DynamicArray and Vector are used to realize dynamic control arrays,whose performance are analyzed and compared.The principle,methods and technique of dynamic control arrays are summarized.