Gold mine of Visual C++ tricks!
How to import dialogs or resources from one project to another?
![]()
Designing dialogs – that could grab a good amount of time! But often we can find dialogs that can be reused from our previous projects. But the copy paste trick – the Ctrl+C & Ctrl+V won’t work on dialog resources. So how to copy/paste dialogs or any other resources from one project to another?

![]()
Assume you have two projects – Project1 and project2 and you want to copy one dialog from Project1 to Project2. Just follow the steps -
For Visual Studio 6.0
1) Load project2 workspace in visual studio.
2) Now Browse and load Project1’s rc file. While opening resource file, select “Open As” as “Resources”.

3) Now drag your required dialog from project1’s resource tree and drop it to your resource tree.

4) You’ve successfully copied dialog from one project to another!
For Visual Studio 2005 and siblings
1) Open your IDE without any solutions loaded.
2) open both RC files into the IDE.
3) Now take Project2 RC file, right click on the dialog you want to export and copy it.

4) Now take Project1 RC file, right click and paste.

5) You see, now the dialog is imported from project1 to Project2.

Well, special thanks to Mike and Alan for their contribution for the trick in Visual Studio 2005.
![]()
You could also edit the rc file in some text editor and can copy paste the dialog if you’re a geek.
![]()
Targeted Audience – Beginners.
| Print article | This entry was posted by Jijo Raj on September 9, 2008 at 5:16 pm, and is filed under Codeproject, Visual Studio. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |



about 1 year ago
hi raj,
when i use vs2005, i cannot just drag dialog resources from external rc file to my project. any suggestions?
about 1 year ago
Hello leochou,
I didn’t tried in visual Studio 2005. I’ll check and inform you soon.
Regards,
Jijo.
about 1 year ago
In VC2003 drag and drop thing does not work, but you can do it in reverse. Open second project resource file in first project. And use Copy/Paste context menus to copy dialog resources from first project into second one, then save the file.
about 1 year ago
Oh! mike, thanks a lot for the tip. I was thinking how to manage it in latest version of visual studio. I’ll update the article with your observation too. Once again thanks a lot and keep visiting.
Regards,
Jijo.
about 1 year ago
Thank you for the article. Using Visual C++ 2003 what I had to do was starting off with no project open, I opened the .rc files for both projects. With both of them open in that way, I could drag/drop or cut and paste the resources from one project to another.
about 1 year ago
You’re right Alan. Well, i think I’ve to update the article soon since most of the users have already been switched to 6.0’s big brothers. Well, Thanks a lot and keep visiting!
Regards,
Jijo.
about 1 year ago
Hi Mike and Alan,
I’ve updated the tip. Have a look at it. Special thanks for you guys! Well, Keep watching.
Regards,
Jijo.
about 6 months ago
Cool tip. saved alot of time