It is possible to use the windows you designed in add-on images or in applications where you do not want to use the application class provided with Interface Elements.
What you need to do is to make a global pointer to an IEResourceHandler object named 'resourcehandler':
IEResourceHandler *resourcehandler;
When your add-on image is loaded, you need to initialize this pointer once:
resourcehandler=new IEResourceHandler(file_ref_where_your_windows_are);
if(resourcehandler->Error()!=B_NO_ERROR){
// either resource file open error, or a GUI add-on could not be located
// do not use the resourcehandler object
}
and you are ready to instantiate your windows! Don't forget to delete the resourcehandler object when your add-on is unloaded.
If you do not wish to use the application class provided with Interface Elements you should do similarly. Create the resourcehandler object in your application constructor, and delete it in the destructor. The file reference could be the application file reference that you inquire with GetAppInfo().