I've got two branches of code. 1 has a dialog box that the other doesn't, but because of politics the dialog box wasn't moved into the newest branch. Now they want it in...
我有两个代码分支。 1有一个对话框,另一个没有,但由于政治,对话框没有移动到最新的分支。现在他们想要...
So is it possible to copy a dialog box from one project to another. There apears to be an export and import feature however it's greyed out.
因此可以将对话框从一个项目复制到另一个项目。有一个导出和导入功能,但它是灰色的。
3 个解决方案
#1
5
.RC files are simple text files. You can simply copy/paste the DIALOG text from one .RC file to the other. Make sure that you copy the corresponding RESOURCE.H entries as well.
.RC文件是简单的文本文件。您只需将DIALOG文本从一个.RC文件复制/粘贴到另一个.RC文件即可。确保您也复制相应的RESOURCE.H条目。
Alternatively, you might be able to open both .RC files and then simply drag-and-drop the dialog from one to the other.
或者,您可以打开两个.RC文件,然后只需将对话框从一个拖放到另一个。
#2
3
Update for Visual Studio 2010 - 2013:
Visual Studio 2010 - 2013的更新:
You can still drag-drop and copy-paste, but only outside of your project / solution.
您仍然可以拖放和复制粘贴,但只能在项目/解决方案之外。
Close solution, open both RC as files without any open solution, and go. For drag, "Hold down the CTRL key and drag the resource to the second .rc file. For example, drag IDD_DIALOG1 from Source1.rc to Source2.rc."
关闭解决方案,打开两个RC文件,没有任何开放的解决方案,然后去。对于拖动,“按住CTRL键并将资源拖动到第二个.rc文件。例如,将IDD_DIALOG1从Source1.rc拖到Source2.rc。”
Microsoft - How to Copy Resources
Microsoft - 如何复制资源
#3
0
Drag and drop doesn't work in Visual Studio 2010. Editing the .RC file does work but be careful. For me the ID for the dialog showed up with *ID_etc*. I copied it and removed the *'s and it seemed to fix the problem.
拖放在Visual Studio 2010中不起作用。编辑.RC文件确实有效,但要小心。对我来说,对话框的ID显示为* ID_etc *。我复制了它并删除了*,它似乎解决了问题。
#1
5
.RC files are simple text files. You can simply copy/paste the DIALOG text from one .RC file to the other. Make sure that you copy the corresponding RESOURCE.H entries as well.
.RC文件是简单的文本文件。您只需将DIALOG文本从一个.RC文件复制/粘贴到另一个.RC文件即可。确保您也复制相应的RESOURCE.H条目。
Alternatively, you might be able to open both .RC files and then simply drag-and-drop the dialog from one to the other.
或者,您可以打开两个.RC文件,然后只需将对话框从一个拖放到另一个。
#2
3
Update for Visual Studio 2010 - 2013:
Visual Studio 2010 - 2013的更新:
You can still drag-drop and copy-paste, but only outside of your project / solution.
您仍然可以拖放和复制粘贴,但只能在项目/解决方案之外。
Close solution, open both RC as files without any open solution, and go. For drag, "Hold down the CTRL key and drag the resource to the second .rc file. For example, drag IDD_DIALOG1 from Source1.rc to Source2.rc."
关闭解决方案,打开两个RC文件,没有任何开放的解决方案,然后去。对于拖动,“按住CTRL键并将资源拖动到第二个.rc文件。例如,将IDD_DIALOG1从Source1.rc拖到Source2.rc。”
Microsoft - How to Copy Resources
Microsoft - 如何复制资源
#3
0
Drag and drop doesn't work in Visual Studio 2010. Editing the .RC file does work but be careful. For me the ID for the dialog showed up with *ID_etc*. I copied it and removed the *'s and it seemed to fix the problem.
拖放在Visual Studio 2010中不起作用。编辑.RC文件确实有效,但要小心。对我来说,对话框的ID显示为* ID_etc *。我复制了它并删除了*,它似乎解决了问题。