Presently I have the following scheme working : 2 DLLS, DLL2 creates the main GUI. DLL1 calls DLL2 to add an easyTab panel w/callback, both located in DLL1. The DLL1 panel exists in an external .UIR file.
DLL1 calls DLL2 as such:
// Add our customizations to the base GUI by calling the DLL2 exported function addModuleTabPanel()
addModuleTabPanel("Core_UIR.uir";CORE_PANEL,__CVIUserHInst);
DLL2 has this code for this function :
/* Done at DLL2 init time */
char *uir_file = "GUI_UIR.uir";
sysIntPanel = LoadPanelEx (0,uir_file, SYS_PANEL,__CVIUserHInst);
moduleTabCtrl = EasyTab_ConvertFromCanvas (sysIntPanel, SYS_PANEL_CANVAS_MODULE_TABS);
int DLLEXPORT addModuleTabPanel(char *uir_file, int panel_id, void *modHandle)
{
int panelHandle;
panelHandle = LoadPanelEx (sysIntPanel, uir_file, panel_id, modHandle); // Load panel located in DLL1
EasyTab_AddPanels (sysIntPanel, moduleTabCtrl, 1, panelHandle, 0);
return(panelHandle);
}
This works fine. Now I want to remove the dependency on DLL 1's external UIR file and embed it in DLL1. Since DLL 2 is currently loading the panel by referencing the external UIR on the hard disk, when this external UIR file no longer exists , how can I get DLL2 to load it? Loading the panel requires calling the new load function in DLL1 rather that LoadPanelEx. Should I load the panel in DLL1 and pass the panel handle into DLL2 of should I pass DLL2 a pointer to the load function in DLL1? Can this even be done with an embedded panel?
Thanks alot
Jeff McCracken