How to share controls between property pages
-
I have 3 different applications that generate similar data. This data is grouped into different categories. I would like to have an option so that the user can export this data HTML or XML format. Also, for each format (HTML or XML) the user should be allowed to choose which data categories to export. For example, in HTML, the user may select certain optios. In XML, the user may choose other options. I decided to create 2 property pages each with the same options (check boxes): one for xml and one for html. When displayed on a propertysheet, both look identical (as expected). I implemented this on one of the 3 applications and it works fine. But as I started to implement this on the second application, I noticed that i had to recreate the property page dialogs and classes (each property page dialog includes about 40 controls). If I continue this way, I will be duplicating a lot of code. Can the property page dialogs (resources) and classes be placed in a central location where they can be used (referenced) by any number of applications without having to duplicate the code in each app?
LA
-
I have 3 different applications that generate similar data. This data is grouped into different categories. I would like to have an option so that the user can export this data HTML or XML format. Also, for each format (HTML or XML) the user should be allowed to choose which data categories to export. For example, in HTML, the user may select certain optios. In XML, the user may choose other options. I decided to create 2 property pages each with the same options (check boxes): one for xml and one for html. When displayed on a propertysheet, both look identical (as expected). I implemented this on one of the 3 applications and it works fine. But as I started to implement this on the second application, I noticed that i had to recreate the property page dialogs and classes (each property page dialog includes about 40 controls). If I continue this way, I will be duplicating a lot of code. Can the property page dialogs (resources) and classes be placed in a central location where they can be used (referenced) by any number of applications without having to duplicate the code in each app?
LA
You can always create a resource DLL, you can find articles on the internat about that. Also you can use two projects in the same workspace and one of the projects can have the fnctionality you want to share, the most interesting way to proceed would be the DLL as in that case you can change the DLL without having to rebuild everything and you can get an upgrade... Hope this helps.
-
You can always create a resource DLL, you can find articles on the internat about that. Also you can use two projects in the same workspace and one of the projects can have the fnctionality you want to share, the most interesting way to proceed would be the DLL as in that case you can change the DLL without having to rebuild everything and you can get an upgrade... Hope this helps.
-
Thanks for the info. However, one more question: Do I need to worry about my resource ID's in the DLL to make sure they are not the same as other resources used in the application that uses the DLL?
LA
I don't know that, but you can take a look at those resources: http://msdn2.microsoft.com/en-us/library/aa372250.aspx[^] http://msdn2.microsoft.com/en-us/library/24b2tcy0(VS.71).aspx[^] http://search.msdn.microsoft.com/search/Default.aspx?query=resource+dll&brand=msdn&locale=&refinement=00&lang=en-us[^] Hope this helps.