请指教:MFC或.NET [英] Please advice: MFC or .NET

查看:77
本文介绍了请指教:MFC或.NET的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要处理一个需要在系统范围内挂钩WH_CBT的项目。



它将是一个桌面应用程序只有一个或者两个窗口。但它主要需要逻辑1)处理像HCBT_SETFOCUS,HCBT_ACTIVATE和获取窗口标题的事件2)获取浏览器URL 3)找出用户不活动(没有键盘/鼠标活动)



我无法确定1)MFC之间的框架2).NET



我熟悉C ++ [MFC主要是像C ++ ??],但是我在某处读到了我需要C#才能在.NET中工作,所以如果我选择.NET那么我将不得不学习C#?



请求你对以上2的建议选项或任何其他框架。



我正在寻找易于开发,跨Windows操作系统版本的互操作性。



此外我还需要为Linux和MAC实现相同的功能。

I need to work on a project which requires to hook WH_CBT systemwide.

It will be a desktop application with only one or two windows. But it will mostly require logic 1) To handle events like HCBT_SETFOCUS, HCBT_ACTIVATE and get Window title 2) Get browser URL 3) Find out user is inactive( No keyboard/mouse activity)

I am unable to decide Framework between 1) MFC 2) .NET

I am familiar with C++ [MFC is mostly like C++??], but i read somewhere that i need C# to work in .NET, so if i choose .NET then i will have to learn C#?

Request your suggestion on the above 2 options or any other framework.

I am looking at ease of development, interoperability across Windows OS versions.

Also i need to implement the same for Linux and MAC in future.

推荐答案

1.如果你选择.NET,你不必学习C#,你可以使用.NET提供的任何其他编程语言:C ++,Visual Basic,F#,J#。



2.基于你所说的一切,特别是你必须为Linux和MAC实现相同的功能,并且你有经验C ++,我建议您使用C ++,对于Widows应用程序,您可以使用MFC实现一个简单的UI和处理Windows事件的逻辑。
1.If you choose .NET you don't have to learn C#, you could use any other programming language provided by .NET: C++, Visual Basic, F#, J#.

2.Based on all that you said, and especially of the fact that you will have to implement the same functionality also for Linux and MAC and that you have experience in C++, I recommend you to use C++, and in the case of Widows application you could use MFC for implementing a simple UI and the logic to handle the windows events.


我认为CBT是基于计算机的培训。



任何在多个操作系统中拦截/挂钩低级系统窗口管理的东西都需要针对每个操作系统进行高度自定义...除非你能找到一些提供跨平台挂钩层抽象的开发工具(Xamarin?)。



如果你想看看C#中的全局挂钩完成后,只需在CodeProject中搜索globalhook:,有几篇好文章,对于C ++和WinForms,有源代码,例子。
I assume CBT is "computer based training."

Anything that is going to intercept/hook low-level system window-management in multiple OS's is going to need to be highly customized for each OS ... unless you can find some dev tool (Xamarin ?) that provides a cross-platform hooking layer abstraction.

If you want to see how global hooking in C# is done, just search CodeProject for "globalhook:" there are several good articles, for C++, and WinForms, with source code, examples.


这篇关于请指教:MFC或.NET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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