Save System Resources with One Control per Control ClassLast reviewed: April 7, 1997Article ID: Q80084 |
3.00 3.10
WINDOWS
kbprg kbfile
The information in this article applies to:
SUMMARYWhen an application is designed to gather a large amount of information from the user, the application can quickly consume many system resources due to the number of controls that it creates. Rather than creating many of the same type of control, an application can create one control and move it around. The ONEEDIT sample in the Software/Data Library demonstrates this technique. Download ONEEDIT.EXE, a self-extracting file, from the Microsoft Software Library (MSL) on the following services:
system and resources and heap and user and gdi MORE INFORMATIONONEEDIT demonstrates collecting data for multiple fields with a single edit control. It collects the following data by moving one control:
Name (First, Middle, Last) Sex Social Security Number Birthday (Month, Day, Year) Address City State Zip Code PhoneThe results of using this technique are transparent to the user; however, an application designed in this way consumes far fewer system resources because one edit control is used rather than many edit controls. Fifteen fewer controls are required by ONEEDIT because it uses this technique. This savings becomes more significant as the number of controls within an application increases. The ONEEDIT source includes an application programmer's interface (API) that can be added to an application. For more information on the API, see the file API.TXT included in the ONEEDIT archive file. The remainder of this article lists some of the other techniques implemented in ONEEDIT.
|
Additional reference words: limit control window user heap 3.00 3.10
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |