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. Copying Resource from One Workspace to Another

Copying Resource from One Workspace to Another

Scheduled Pinned Locked Moved C / C++ / MFC
questionlearningworkspace
7 Posts 4 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.
  • R Offline
    R Offline
    Reagan Conservative
    wrote on last edited by
    #1

    Is it possible to copy a dialog resource in one workspace and add it to the resources in another workspace? Thanks in advance.

    John P.

    T W 2 Replies Last reply
    0
    • R Reagan Conservative

      Is it possible to copy a dialog resource in one workspace and add it to the resources in another workspace? Thanks in advance.

      John P.

      T Offline
      T Offline
      toxcct
      wrote on last edited by
      #2

      open one of the two workspaces, and the resource file of the other workspace. the drag n' drop the dialog from one to the other. if that doesn't work, open the doalog template, select all the controls on it (Ctrl+A should do) and paste on an empty, freshly created dialog of the resource file to edit. save, close.


      [VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]

      R 2 Replies Last reply
      0
      • R Reagan Conservative

        Is it possible to copy a dialog resource in one workspace and add it to the resources in another workspace? Thanks in advance.

        John P.

        W Offline
        W Offline
        Wamuti
        wrote on last edited by
        #3

        Hi. I hope you were successful. I have a problem while trying to insert a resource for the dialog. Below is the code i am trying to use to create a dialog: After i insert the resource and create a new class for the dialog, it cant find the Script1.rc which has the dialog ID. If you can help me i'm really stuck: Below is my code: #include #include "resource.h" #include "newdialog.h" //my new dialog class class MFC_Tutorial_Window :public CFrameWnd { public: MFC_Tutorial_Window() { Create(NULL,"MFC Tutorial Part 5 CoderSource Dialog"); } void OnClickDialogNew(); DECLARE_MESSAGE_MAP() }; BEGIN_MESSAGE_MAP( MFC_Tutorial_Window, CFrameWnd) ON_COMMAND(ID_MYDIALOG,OnClickDialogNew) END_MESSAGE_MAP() void MFC_Tutorial_Window::OnClickDialogNew() { NewDialog dlg; dlg.DoModal(); } class MyApp :public CWinApp { MFC_Tutorial_Window *wnd; public: BOOL InitInstance() { wnd = new MFC_Tutorial_Window(); m_pMainWnd = wnd; m_pMainWnd->ShowWindow(1); return 1; } }; MyApp theApp;

        TreeS

        1 Reply Last reply
        0
        • T toxcct

          open one of the two workspaces, and the resource file of the other workspace. the drag n' drop the dialog from one to the other. if that doesn't work, open the doalog template, select all the controls on it (Ctrl+A should do) and paste on an empty, freshly created dialog of the resource file to edit. save, close.


          [VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]

          R Offline
          R Offline
          Reagan Conservative
          wrote on last edited by
          #4

          Thanks, toxcct --- I'll give it a try.

          John P.

          1 Reply Last reply
          0
          • T toxcct

            open one of the two workspaces, and the resource file of the other workspace. the drag n' drop the dialog from one to the other. if that doesn't work, open the doalog template, select all the controls on it (Ctrl+A should do) and paste on an empty, freshly created dialog of the resource file to edit. save, close.


            [VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]

            R Offline
            R Offline
            Reagan Conservative
            wrote on last edited by
            #5

            Neither of those approaches worked. Anything else you can think of? I tried copying all the .aps/.clw/.ncb/.opt/.plg/.rc files over to an older version and that didn't help either. Right now, I guess I'll just have to re-create the dialog into the version now running. Thanks for your response.

            John P.

            J 1 Reply Last reply
            0
            • R Reagan Conservative

              Neither of those approaches worked. Anything else you can think of? I tried copying all the .aps/.clw/.ncb/.opt/.plg/.rc files over to an older version and that didn't help either. Right now, I guess I'll just have to re-create the dialog into the version now running. Thanks for your response.

              John P.

              J Offline
              J Offline
              JudyL_MD
              wrote on last edited by
              #6

              Try opening the old .rc in text mode, finding the dialog in question and copy / paste it into the new .rc (also open in text mode). You'll need to add any control IDs that exist in the dialog in question to the resource.h.

              jparken wrote:

              aps/.clw/.ncb/.opt/.plg

              These are internal work files (class wizard, resource editor, build output, intellisense, ...) created on the fly by the IDE. They should never be copied when moving things between workspaces / solutions. Judy

              R 1 Reply Last reply
              0
              • J JudyL_MD

                Try opening the old .rc in text mode, finding the dialog in question and copy / paste it into the new .rc (also open in text mode). You'll need to add any control IDs that exist in the dialog in question to the resource.h.

                jparken wrote:

                aps/.clw/.ncb/.opt/.plg

                These are internal work files (class wizard, resource editor, build output, intellisense, ...) created on the fly by the IDE. They should never be copied when moving things between workspaces / solutions. Judy

                R Offline
                R Offline
                Reagan Conservative
                wrote on last edited by
                #7

                Thanks, Judy. I'll try it your way.

                JudyL_FL wrote:

                These are internal work files (class wizard, resource editor, build output, intellisense, ...) created on the fly by the IDE. They should never be copied when moving things between workspaces / solutions.

                I was grasping at straws and hoping --- thanks for the info.

                John P.

                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