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. is this possible?

is this possible?

Scheduled Pinned Locked Moved C / C++ / MFC
question
7 Posts 5 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.
  • J Offline
    J Offline
    jafrazee
    wrote on last edited by
    #1

    I have an mdi applicaiton that has some of the same features as an existing project. I really do not want to redesign everything. So can i import a dialog box from one project into another? if so how? Thank you.

    A T S 3 Replies Last reply
    0
    • J jafrazee

      I have an mdi applicaiton that has some of the same features as an existing project. I really do not want to redesign everything. So can i import a dialog box from one project into another? if so how? Thank you.

      A Offline
      A Offline
      alex barylski
      wrote on last edited by
      #2

      It doesn't seem like you can get VC to save or export dialog resources alone, so you have 2 options: 1) Open the resource.rc file as text and copy the dialog resource info into clipboard. Open the new resource file as text and paste clipboard contents into new file. 2) Make a copy of the resource.rc open it as text and remove all un-nessecary contents. Cheers! "An expert is someone who has made all the mistakes in his or her field" - Niels Bohr

      1 Reply Last reply
      0
      • J jafrazee

        I have an mdi applicaiton that has some of the same features as an existing project. I really do not want to redesign everything. So can i import a dialog box from one project into another? if so how? Thank you.

        T Offline
        T Offline
        Tim Deveaux
        wrote on last edited by
        #3

        Copy the .rc file from the source project to a safe dir (working copy) then, with the dest project open, open this .rc file - you should find you can drag and drop what you want into your new project, and it shouldn't be to hard to reuse any existing CDialog based class as well.

        A 1 Reply Last reply
        0
        • J jafrazee

          I have an mdi applicaiton that has some of the same features as an existing project. I really do not want to redesign everything. So can i import a dialog box from one project into another? if so how? Thank you.

          S Offline
          S Offline
          Shog9 0
          wrote on last edited by
          #4

          In VS you can open up multiple *.rc files at once and copy/paste between them. This is easier than dealing with them as text files, as you don't have to worry about assigning resource IDs, copying bitmap or icon files, etc. farewell goodnight last one out turn out the lights

          Smashing Pumpkins, Tales of a Scorched Earth

          1 Reply Last reply
          0
          • T Tim Deveaux

            Copy the .rc file from the source project to a safe dir (working copy) then, with the dest project open, open this .rc file - you should find you can drag and drop what you want into your new project, and it shouldn't be to hard to reuse any existing CDialog based class as well.

            A Offline
            A Offline
            alex barylski
            wrote on last edited by
            #5

            I didn't even think of doing it that way! Sweet...theres a time saver! Thanx! "An expert is someone who has made all the mistakes in his or her field" - Niels Bohr

            T T 2 Replies Last reply
            0
            • A alex barylski

              I didn't even think of doing it that way! Sweet...theres a time saver! Thanx! "An expert is someone who has made all the mistakes in his or her field" - Niels Bohr

              T Offline
              T Offline
              Tim Deveaux
              wrote on last edited by
              #6

              Yep - but make a copy of the original .rc, because VC seems to treat it as a 'move' operation rather than a 'copy' - by default anyway.

              1 Reply Last reply
              0
              • A alex barylski

                I didn't even think of doing it that way! Sweet...theres a time saver! Thanx! "An expert is someone who has made all the mistakes in his or her field" - Niels Bohr

                T Offline
                T Offline
                Todd Harvey
                wrote on last edited by
                #7

                I've been inserting the reference project into the new project, then dragging and dropping the resources into the new project. (and then break the link) One cool thing is that it seems to copy whatever bitmaps, etc that you need as well. I'm not even sure why it works, but it's slick. You have to join projects, though. You can break them apart later. --------------------------------------------------------------------------------- I wish I had a way to have multiple *.rc files for a project - when we are using Visual Source Safe, one guy wants to change his dialog somewhere, but he has to check out the main rc file, and it locks us all out of it. (and he leaves it checked out and we are stuck for a while) I started playing around with doing #include's into the resource file to let us split it up, but didn't get too far.

                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