I found useful and friendly a structure like this:
Include files:
I build a general .h file in which I store global variables, macros to use throghout the whole program and definitions for custom functions I develop.
Source files:
In every source file I #include the .h files for UIR and the general .h file made in the previous step (after the #include the CVI automatically adds while writing source code).
I also define a macro for every user interface file I use in the program, that way:
#define UIR1 "MyFile1.UIR"
#define UIR2 "MyFile2.UIR"
and obviously use those macros when opening a panel:
tmpH = LoadPanel (0, UIR1, MyPanel);
This is particularly useful in case of new releases: it's enough to modify the initial macros for the modified UIR files (I usu
ally change the name of the UIR file...) to have it changed in all the program whithout need to search and replace every occurrence of the UIR file name.
That way all works well: all definitions, macros and global variables are seen in all parts of my program and I can split it in how many source and UIR files I want.
Hope this helps
Roberto