VC ++ Metro风格应用程序Windows [英] VC++ Metro Style Apps Windows

查看:128
本文介绍了VC ++ Metro风格应用程序Windows的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有十年历史的MFC VC ++桌面应用程序.该应用程序的美丽之处在于它可以从Windows 2000到Windows 7,以15种以上的语言运行.在winsocket之上,它具有IPC和SSL多线程功能.

I have a decade old MFC VC++ desktop application. Beauty of the application is it works from Windows 2000 to Windows 7, in more than 15 languages. Its multithreaded with IPC and SSL on top of winsocket.

最近我正在阅读那些赢得Windows 8 Metro风格的软件,我们将无法运行现有应用程序.这是否意味着Windows即将杀死VC ++或MFC?

Lately i am reading that win Windows 8 Metro style we will not be able to run the existing application. Does that mean Windows is heading towards killing VC++ or MFC?

是否可以为所有Windows版本保持相同的代码库?我是否有用于winsock和MFC的替代API?必须使用HTML5编写应用程序吗?

Is there a possibility of me keeping same code base for all windows versions? Do I have alternative APIs for winsock and MFC? Is it compulsory to write the app in HTML5?

推荐答案

最近我正在阅读那些将无法获得Windows 8 Metro风格的文件 运行现有的应用程序

Lately i am reading that win Windows 8 Metro style we will not be able to run the existing application

我发现根据 Windows运行时(WinRT).基于ARM的Windows 8系统将支持WinRT程序.基于x86的Windows 8系统能够运行现有的Win32程序.

I find it easier to think about things in terms of the Windows Runtime (WinRT). The ARM based Windows 8 systems will only support WinRT programs. The x86 based Windows 8 systems are capable of running both WinRT programs and existing Win32 programs.

有一个暗示(或可能是一个假设?),所有Metro风格的应用程序都是WinRT应用程序.当然,WinRT旨在用于构建 Metro风格的应用程序.我可以想象构建像Metro应用程序的传统Win32应用程序-大方形活动磁贴,延伸到可见桌面左右两侧的应用程序表面等.我不确定这些应用程序是否真的会被视为"Metro风格"应用程序如果它们的构建风格与Metro应用相同.

There is an implication (or possibly an assumption?) that all Metro style applications are WinRT applications. Certainly WinRT is intended for use in building Metro style applications. I could imagine building traditional Win32 applications that looked like Metro apps - big square active tiles, an application surface that stretched to the left and right of the visible desktop etc. I'm not sure those would really be considered "Metro style" apps even if they were built in the same style as a Metro app.

现有应用程序将无法在基于ARM的Windows 8系统上运行,也不会在基于x86的Windows 8系统的非桌面部分中运行.它们运行在基于x86的Windows系统的桌面部分.在那运行Visual Studio,在那运行PhotoShop,在那运行当前在Windows 7上运行的所有程序.

Existing applications will not run on ARM based Windows 8 systems and will not run in the non-Desktop part of the x86 based Windows 8 systems. They will run in the desktop part of the x86 based Windows system. That's where Visual Studio runs, that's where PhotoShop will probably run, that's where all the programs that currently run on Windows 7 will run.

这是否意味着Windows即将杀死VC ++或MFC?

Does that mean Windows is heading towards killing VC++ or MFC?

绝对不是. MFC应用程序将在基于x86的系统上的Windows 8桌面环境中正常运行. MFC应用程序将不能在基于ARM的Windows 8系统上运行-但是,很多地方MFC应用程序将无法运行.

Absolutely not. MFC applications will run just fine in the desktop environment of Windows 8 on x86 based systems. MFC applications will not run on ARM based Windows 8 systems - but then there are lots of places MFC applications won't run.

对于VC ++,您可以使用C ++构建Metro风格的应用程序 想要的话,您只需要遵循Metro的样式"即可.

As for VC++, you can build Metro style applications using C++ if you want to, you just have to follow the Metro "style".

我是否有可能对所有Windows保持相同的代码库 版本?

Is there a possibility of me keeping same code base for all windows versions?

这取决于所有Windows版本"的含义.今天在基于Windows 7 x86的系统上运行的代码明天将在基于Windows 8 x86的系统上运行.如果这是您的目标市场,那么您就完成了,您无需更改代码.您唯一没有的是活动磁贴.但是您可以使用Metro风格的API构建活动的图块,并在可行的情况下将其重新绑定到应用程序的逻辑中.

It depends on what you mean by "all windows versions". The code that runs on Windows 7 x86 based systems today will run on Windows 8 x86 based systems tomorrow. If that's your target market then you're done, you don't need to change your code. The only thing you won't have is an active tile. But you could build an active tile using the Metro style APIs and tie that back into your app's logic if that makes sense.

如果要支持基于ARM的Windows 8系统以及基于x86的系统,或者希望所有程序在基于x86的系统上运行时都具有Metro外观,则必须更改程序使用HTML/CSS或XAML和WinRT API而不是MFC和Win32 API.

If you want to support ARM based Windows 8 systems as well as x86 based systems, or if you want all of your program to have the Metro look and feel when running on x86 based systems then you'll have to change your program to use HTML/CSS or XAML and the WinRT APIs instead of MFC and the Win32 APIs.

或者如果您想要两个世界,也许您甚至可以将程序的逻辑与UI分开,然后围绕该通用逻辑构建MFC外观和Metro外观

Or if you want both worlds, perhaps you might even seperate your program's logic from the UI and then build an MFC skin and a Metro skin around that common logic

我是否有用于winsock和MFC的替代API?

Do I have alternative APIs for winsock and MFC?

对于联网,有类数您可以在JavaScript,Visual Basic,C#和C ++中使用.要构建UI,您可以使用 HTML/CSS 或使用 XAML .

For networking there are a number of classes you can use from JavaScript, Visual Basic, C# and C++. For building UI you either use HTML/CSS or you use XAML.

或者,如果适合您,请继续使用MFC.您可能永远都不会构建具有

Or you continue to use MFC if that fits your needs. You're probably never going to ever build a Metro style app that's got a Multiple Document Interface with a Tabbed UI!

这篇关于VC ++ Metro风格应用程序Windows的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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