在项目中包含新UI [英] Including a New UI in a project

查看:87
本文介绍了在项目中包含新UI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我一直在开发基于MFC对话框的应用程序.
提出了一个新要求,这样将首先显示另一个对话框,然后单击其中的按钮,将弹出我正在开发的对话框.

我可以在现有代码中进行修改以首先调用另一个UI吗?
如果是这样,应该进行哪些更改?

还是我应该创建一个新项目并复制文件?

Hi,

i have been developing a MFC dialog based application.
a new requirement came up such that first another dialog box will be displayed and on clicking on a button in it, the dialog i was developing should pop up.

can i just makes modifications in the existing code to call the other UI first?
if so what should be the changes?

or should i create a new project and copy the files??

推荐答案

您应该引入版本控制系统,不要再问自己或任何其他人这种问题了.到目前为止,您甚至还没有开始生产软件.您的文物在哪里?在空中?任何错误的修改都会使结果松动吗?还是你备份?多常?以及如何找到适当的后备力量来退缩脚步?

不,您还不进行软件开发,您只是在浪费开发生命(处于永久风险或失去一切,或者(通常)进行混乱,而没有明显的方法来解决纠缠的问题.

使用版本控制系统,您应该发布并冻结它(在某些系统中为发布分支,在其他系统中为标签),然后继续在主干上进行开发.但是,您应该练习在任何新计算机或其他位置上从头开始构建项目,并确保它无瑕疵.修订控制系统可以是开源的(我认为应该是开源的;不要为专有权冒险您的工作),已被数百万使用,因此得到了很好的支持.

关于具体系统的选择,请参见以下讨论:
版本控制系统可供选择? [ ^ ]

停止做您的工作,开始真正的软件开发.

—SA
You should introduce Revision Control system and stop asking yourself or anyone else such questions. So far, you did not even start producing your software. Where are your artifacts? In the air? Any wrong modification and you loose the ends? Or you back up? How often? And how do you find proper back-up to retreat your step?

No, you do not do software development yet, you just waste your development life working( at permanent risk or loosing everything or (more typically) making a mess-up without apparent way to sort out the entangled.

With Revision Control System, you should make a release and freeze it (release branch in some system, tag in others), continue development on trunk. Nevertheless, you should exercise building a project from scratch in any new computer or a different place and keep it flawless. Revision Control Systems can be Open Source (should be, in my opinion; don''t risk your work to the proprietary), used by millions and therefore well supported.

About selection of concrete system, please see this discussion:
Revision control systems, which to choose from?[^]

Stop doing what you doing and start real software development.

—SA


基于MFC对话框的应用程序具有一个主应用程序(源自CWinApp)和一个GUI(源自CDialog). ).话虽如此,您可以向CWinApp添加任意数量的GUI(CDialogs或其他),只需查看其中的源代码以查看其最合适的位置.通常,基于MFC对话框的应用程序会创建一个模式对话框,这意味着该应用程序会在对话框关闭时终止.要更改此行为,只需将对话框设置为非模态对话框(除非有一个主对话框).
A MFC dialog based application has a main application (something derived from CWinApp) and a GUI (something derived from CDialog). With that said, you can add any number of GUIs (CDialogs or whatever) to the CWinApp, just look at the source in there to see where its most appropriate. Usually a MFC dialog based application creates a single modal dialog, meaning the application terminates when the dialog is closed. To change this behavior, just make the dialogs non-modal (unless you have one main dialog).


这篇关于在项目中包含新UI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆