本文介绍了如何在VC ++中将两个rc文件合并到一个项目中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Project1:rc文件和resource.h

Project2:rc2文件和resource2.h



我的主要项目是Project1,I不得不在Project1中使用Project2的资源,

这意味着,我在Project1中使用rc,rc2,resource.h,resource2.h。

(Project2的UI非常复杂,如果我在Proect1中重做它,这是浪费时间)



我该怎么做?谢谢!

Project1: rc file and resource.h
Project2: rc2 file and resource2.h

My main project is Project1, I had to use Project2's resource in Project1,
that means, I use rc,rc2,resource.h,resource2.h in Project1.
(Project2's UI is very complex, if I redo it in Proect1, it's waste time)

How do I do this? Thanks!

推荐答案

// *2.rc
#include "./resource.h"
//...

// *1.rc
#include "../prj2/*2.rc"
#include "./resource.h"
//..



但是,你可以得到一个痛苦的混合重新分配ID从两个标题......



如果你的工作没有计划进行日间测试,那么只有

它可能会更好想想one-header甚至one-DLLresorces'分享:)


However, you can get a painful mixture of the resorce IDs from the both headers...

If your job is not planned for a "day-testing" only
it could be better to think about the "one-header" or even "one-DLL" resorces' sharing :)


这篇关于如何在VC ++中将两个rc文件合并到一个项目中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-09 04:22