Click here to Skip to main content
15,897,170 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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.
Posted

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.
 
Share this answer
 
v2
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.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900