Developing and Running a Program
Although you can develop projects in LabWindows/CVI in many ways, you might
want to use the following development pattern:
- Open a User Interface Editor window to design a user interface for your
program. Consider using one the sample projects that come with LabWindows/CVI as the basis for your project.
- Assign constant names and/or callback functions to each control on your GUI.
- Save your GUI as a user interface (.uir) file. LabWindows/CVI automatically generates a corresponding .h include file.
If you attempt to open a .uir file you create in LabWindows/CVI 8.0 in LabWindows/CVI 7.1 or earlier, you might experience unexpected behavior, including a program crash. If you plan to open .uir files you create in version 8.0 in version 7.1, use the File»Save As or File»Save Copy As commands and select LabWindows/CVI 7.1 User Interface (*.uir) in the Save as type field.
When you save a LabWindows/CVI 8.0 .uir file in version 7.1 format, LabWindows/CVI removes any tab controls and images that include alpha-channel data from the .uir. LabWindows/CVI also removes any user interface features that were introduced in version 8.0, including graph annotations and menu images. You cannot save version 8.0 .uir files in pre-7.1 formats.
- Use CodeBuilder to create skeleton code for your source file. Refer to the Using CodeBuilder topic for more information.
- Edit the skeleton code that CodeBuilder generates. Add code to the callback
functions so that they take the appropriate actions in response to user interface events.
- Add the source code (.c), include (.h), and user interface (.uir) files to your project list and save the project (.prj) file.
If you edit the program and .uir file concurrently, you must recompile your program if you modify the .uir file before you run your program. You must recompile so that LabWindows/CVI
can update the .h file as necessary. To make recompiling automatic, enable Track include file dependencies in the Build OptionsBuild Options dialog box of the Workspace window.
If you do not pass absolute pathnames for .uir files to functions such as LoadMenuBar or LoadPanel, the .uir files must be in the same directory as your executable.