Though the library can be used in a GUI-less environment, many applications also require user interaction through a GUI. Who hasn't had the problem of changing or adding some program setting and/or internal parameter, then having to redesign and relayout the various user dialog boxes that control this setting? This is a tedious and error-prone task. Consequently, we also present an MFC class that automagically generates a tree-control-based dialog box for changing settings at runtime. It is automatically constructed from the same I/O routines described here. No additional machinery is needed. The dialog updates automatically (at runtime) whenever new parameter types, paths, and values are added, changed, or removed (see Figure 1). As an added bonus, if the value-name contains the word "FILENAME" (case insensitive) the edit box will automatically contain a [...] file-browse button for easy file navigation (based on [3]). To use it:
The same idea can be implemented in other GUI toolkits as well.
A.B. and A.S.
Back to Article