Click here to Skip to main content
16,005,697 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Copy Folder Pin
KKR13-Nov-03 20:23
KKR13-Nov-03 20:23 
GeneralSending Windows Events from one app to another Pin
Zee man13-Nov-03 19:30
Zee man13-Nov-03 19:30 
GeneralRe: Sending Windows Events from one app to another Pin
Prakash Nadar13-Nov-03 20:08
Prakash Nadar13-Nov-03 20:08 
GeneralRe: Sending Windows Events from one app to another Pin
Antti Keskinen13-Nov-03 20:26
Antti Keskinen13-Nov-03 20:26 
GeneralRe: Sending Windows Events from one app to another Pin
Zee man16-Nov-03 9:13
Zee man16-Nov-03 9:13 
GeneralRe: Sending Windows Events from one app to another Pin
Antti Keskinen16-Nov-03 10:17
Antti Keskinen16-Nov-03 10:17 
GeneralRe: Sending Windows Events from one app to another Pin
Zee man19-Nov-03 17:46
Zee man19-Nov-03 17:46 
GeneralCreating a systemwide hook dll in vc++ that can be used in vb Pin
percyvimal13-Nov-03 18:57
percyvimal13-Nov-03 18:57 
Sir i want to creat a Vc++ system wide hook dll.{{Whatever hook articles available on the internet are intended for advanced developers who know thing or 2 in vc++.}}But students like me who are new to vc++ find it difficult to grasp some ideas.
I want a basic level explanation from some experts who really wants to teach those things to their students.
The hooks i am intended to create is Wh_Getmessage and i have to call that dll from vb6
Say my objective of this hook is say if i a user type A then i have to change to B for any application running.

I am a stranger to vc++ so i need help in how to create this {{system wide}} wh_getmessge hook

1.In vc++ in new what dll i have to chose ]
a.MFC appwizard Dll
b.WIn32 Dynamic link library
What is the difference between these 2 dlls.?
2.What is an header file and what are the things we have to declare here and why we have to declare??

3.How functions in vc++ dll should be declared inorder to call those functions from vb.?

4.Say i am calling SetHook funciton from vb which is in dll then hook is set.
MsgFilterHook = SetWindowsHookEx( WH_GETMESSAGE,(HOOKPROC)MsgFilterFunc, dll_hInstance, threadID );
I am having the hookhandle in MsgFilterHook which i can use to unhook this hook.
Threadid = 0 to create a system wide hook
MsgFilterFunc is my callback function
My doubt is once hook is set , will the system automatically call my callback filter function for any application which process getmessage
Say i have notepad and i am typing A and in my call back function i will get a wm_char = A.NOw if i change to another application say wordpad and type B
then will it be possible to get the wm_char=B message in my callback function.Please Explain me how does this work.

5.Say n no of editor applications are running and i want to disable the character T from going to any application and i have to make T into H how to do this in my callbackfunciton.Issue in this question is how am going to get these hook work for any application which is running.??

Issues
1.How to start creating a dll in vc++6
2.Header file decleration ideas.
3.Export functions declerations.
4.Explanations of how these hook work on a systemwide basis(i understood how dll maps the memory of other applications but wanted codings point of view like what are the parameters come to callback function each time a new application is actvated.)
5.What is #pragma and shared data segment ?How variables should be decalred in the hook dll and how it should be accessed??Please explain at a lower level how this things are implemented why is the need?

Thanks in advance.



GeneralRe: Creating a systemwide hook dll in vc++ that can be used in vb Pin
Antti Keskinen13-Nov-03 20:59
Antti Keskinen13-Nov-03 20:59 
GeneralRe: Creating a systemwide hook dll in vc++ that can be used in vb Pin
percyvimal13-Nov-03 23:20
percyvimal13-Nov-03 23:20 
GeneralRe: Creating a systemwide hook dll in vc++ that can be used in vb Pin
Antti Keskinen14-Nov-03 12:11
Antti Keskinen14-Nov-03 12:11 
GeneralRe: Creating a systemwide hook dll in vc++ that can be used in vb Pin
percyvimal30-Nov-03 20:06
percyvimal30-Nov-03 20:06 
GeneralRe: Creating a systemwide hook dll in vc++ that can be used in vb Pin
Antti Keskinen30-Nov-03 23:20
Antti Keskinen30-Nov-03 23:20 
GeneralRe: Creating a systemwide hook dll in vc++ that can be used in vb Pin
percyvimal30-Nov-03 23:29
percyvimal30-Nov-03 23:29 
GeneralRe: Creating a systemwide hook dll in vc++ that can be used in vb Pin
percyvimal12-Dec-03 19:19
percyvimal12-Dec-03 19:19 
GeneralRe: Creating a systemwide hook dll in vc++ that can be used in vb Pin
percyvimal8-Jan-04 17:49
percyvimal8-Jan-04 17:49 
QuestionHow to create Tree view for displaying directory structure in vc++ Pin
harsh91113-Nov-03 18:35
harsh91113-Nov-03 18:35 
AnswerRe: How to create Tree view for displaying directory structure in vc++ Pin
Prakash Nadar13-Nov-03 18:50
Prakash Nadar13-Nov-03 18:50 
GeneralDynamic object creation Pin
Ravi Jadhav13-Nov-03 18:10
Ravi Jadhav13-Nov-03 18:10 
GeneralRe: Dynamic object creation Pin
Prakash Nadar13-Nov-03 21:56
Prakash Nadar13-Nov-03 21:56 
GeneralRe: Dynamic object creation Pin
Antti Keskinen13-Nov-03 22:02
Antti Keskinen13-Nov-03 22:02 
GeneralCreating a burning and circling text Pin
nhanquy8313-Nov-03 17:00
nhanquy8313-Nov-03 17:00 
GeneralCustom Control Pin
Prakash Nadar13-Nov-03 17:00
Prakash Nadar13-Nov-03 17:00 
GeneralRe: Custom Control Pin
KKR13-Nov-03 19:59
KKR13-Nov-03 19:59 
GeneralRe: Custom Control Pin
Prakash Nadar13-Nov-03 21:28
Prakash Nadar13-Nov-03 21:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.