-
hooking enter key in AIM
Hi, I have been working on a program to do some stuff to the text that is sent in AIM. I have figured out everything but how to hook the enter key when the user sends the message. I basicaly want to listen for when the user hits enter and then before the message is registered by the window i want to change the text in the textbox before it sends it. I will most likely be programming this in VB just because i am lazy lol.
I have looked into windows hooks and subclassing but am not quite clear as to what the best method would be and how to impliment it.
Any example code, info, or links would be greatly apreciated :)
-
nevermind i figured out how to do it.
basicaly i subclassed the vb window and set a Hotkey so that whenever the user hits this key it sends the WM_HOTKEY message. From there i can see what window is active and then take the apropriate action.. then all i have to do is use sendkeys to forward the key to the window. It works great.
-
-
This is in VB, in C++ I think its cin.get() or something, not too much help lol.
-
cin.get is for console :)
to intercept the enter key i know of two ways: subclassing or windows hook. if it's my own program i use subclassing... if it's an external program i'd use windows hook b/c subclassing would be a pain.