Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How to share controls between property pages

How to share controls between property pages

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialhtmlxmlquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    tigre215
    wrote on last edited by
    #1

    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

    J 1 Reply Last reply
    0
    • T tigre215

      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

      J Offline
      J Offline
      Joan M
      wrote on last edited by
      #2

      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.

      https://www.robotecnik.com freelance robots, PLC and CNC programmer.

      T 1 Reply Last reply
      0
      • J Joan M

        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.

        T Offline
        T Offline
        tigre215
        wrote on last edited by
        #3

        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

        J 1 Reply Last reply
        0
        • T tigre215

          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

          J Offline
          J Offline
          Joan M
          wrote on last edited by
          #4

          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.

          https://www.robotecnik.com freelance robots, PLC and CNC programmer.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups