Wh_Getmessage hook
-
I have done Wh_getmessage hook. In my filter function i have typecast the Wm_char message like Say if Char 'A' is pressed i send the char 'A' as it is to the application. NOw if user press 'B' then what i am doing is changing the Char 'B' to BackSpace character. TO this point the application is working properly in all application for it is a system wide hook , where pressing of B removes 'A' for B is a backspace character A , B->backspace out put = NUll Now what i am doing is using PostMessage api i am sendging 2 characters to that application which is active Say POSTMESSAGE(C ,D) I got these problems: 1. The character C when posted to the application , my filter function is called again and( i have defined a rule for C where if the user type C then change to E) and i expected C to be printed in the application , but instead E is coming. I have to find a way how to prevent this ie the postmessage which i have send to the application looping through my filter funcion again and again. ___________________________________________________________________________ 2. If i declare like this A , B->backspace character , Postmessage(C,D) Expected output CD Output obtained in notepad and photoshop AC and D is removed(Wrong) Output obtaied in all other application CD(correct) _________________________________________________________________________ 3. So i tried this method A , B->NULL , Postmessage(backSpace,C,D) Expected output CD Output obtained in notepad and photoshop CD(correct) Output obtaied in all other application AC and D is removed(Wrong) Could anyone tell me how i can overcome these problems Thanks in advance with regards vimal