User's Guide > User Interface: Dialogs > Using Resource Files
Using Resource Files
Resource files are text files that describe the overall structure of a dialog box.
*For most Creo TOOLKIT applications, it is not required to use resource files. Instead you can use the functions described in the previous sections to create, lay out, and populate dialog boxes directly. Information in this section is provided for the few applications that still require resource files.
When the Creo TOOLKIT application wants to show a dialog box to the Creo Parametric user, it simply asks Creo Parametric to load the dialog box from the resource file. The first task for the Creo TOOLKIT user who wants to display a dialog box is to write the resource file.
The resource file describes:
Overall attributes of the dialog box.
A list of components it contains.
Attributes of the components themselves and the relative positions of the components.
Rules for how they behave when the user resizes the dialog box.
Many of the dialog box and component attributes can also be read and modified programmatically with Creo TOOLKIT functions.
A resource file must be called dialog_name.res where dialog_name is the name of the dialog box. The name of the resource file should be in the lower case. Resource files used by the Creo TOOLKIT application must be stored under the text directory referred to by the text_dir statement in the Creo TOOLKIT registry file.
Was this helpful?