简体   繁体   English

在对MFC应用程序进行编程之前或之后创建卫星dll更好吗?

[英]Is it better to create satellite dll's before or after programming a MFC application

I am halfway through the development of a MFC Form application and I know I will have to publish it in multiple languages. 我正在进行MFC Form应用程序的开发,我知道我将不得不用多种语言发布它。 I plan on using satellite DLL's in order to achieve this goal. 我计划使用卫星DLL来实现此目标。 I am using Visual Studio 2012 by the way. 我正在使用Visual Studio 2012。

I have done some reading but I'm still quite a neophyte on the subject. 我已经读了一些书,但我还是这个主题的新手。 In order to create a satellite DLL containing a Form in an other language, I have to copy the Form in the resource file of a new DLL project, give a specific name to the DLL, add the /NOENTRY option to the linker and then translate the Form . 为了创建包含另一种语言的Form的附属DLL,我必须将Form复制到新DLL项目的资源文件中,为DLL指定一个特定的名称,将/NOENTRY选项添加到链接器,然后进行翻译Form

The thing is, the Form may be subject to change in a near future (move/delete/add controls). 问题是, Form可能会在不久的将来发生更改(移动/删除/添加控件)。 If I create the satellite DLL right now, I fear I will have to do the same modifications in every single DLL if I need to alter the structure of a Form . 如果我现在创建卫星DLL,我担心如果需要更改Form的结构,则必须在每个DLL中进行相同的修改。

My question is: Should I wait until I have completed my application and then create the satellite DLL's or is there a mechanism in VS or else where that will allow me to make the modifications of my DLL in a single place? 我的问题是:我应该等到完成我的应用程序之后再创建附属DLL还是在VS中存在某种机制,否则应该允许我在一个地方进行DLL修改?

You didn't mention if you are using .NET - is your C++ application managed? 您没有提到是否使用.NET-您的C ++应用程序受管理吗? I would suggest you to write your application first, but design it such that resource-only/satellite DLLs can be easily plugged in later. 我建议您先编写应用程序,但设计它时应确保以后可以轻松插入纯资源/卫星DLL。

I think I'd do a complete application in two languages, then translate into others. 我想我会用两种语言做一个完整的应用程序,然后翻译成其他语言。

As for why to do two first rather than just one: because this way, you're pretty much forced to keep the structure amenable to being translated into more. 至于为什么要先做两个而不是一个:因为这样,您几乎不得不保持结构适合于翻译成更多。 If you only do one the first time, no matter how careful you think you're being, it seems to be almost inevitable that you miss at least a few things, so you end up going back and rewriting to accommodate more languages. 如果您第一次只做一次,那么无论您认为自己有多认真,似乎都不可避免地会错过至少几件事,因此您最终会回头重新编写以适应更多语言。 You'll probably do a little of that anyway, but doing two the first time reduces it quite a bit. 无论如何,您可能都会做一些这样的事情,但是第一次做两次会大大减少它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM