# Source Code Connection

To establish the connection between the objects in your .uir files and your C source files you must prepare and include a header file with your source code, as follows:

1. Give each control a constant name. Constant names identify the controls on your GUI in calls to the User Interface Library functions. Several rules govern your choice of constant names.
2. As appropriate, assign callback functions to controls in the User Interface Editor. For example, if you wanted a function called AcquireData to be executed whenever the command button Acquire is clicked, you assign the callback function name AcquireData to the Acquire button in the User Interface Editor.
3. Save your .uir file. LabWindows/CVI then automatically generates the necessary header (.h) file which contains the callback functions and ID constant names that you declare.
4. Include this .h file in your application program using the #include preprocessor command. The #include directive allows your program to reference the resource IDs and callback functions for the user interface objects. In contrast, you obtain panel and menu bar handles at run time when you use the LoadPanel and LoadMenuBar functions.