开发者

Windows hooks question

We have a legacy program written by a third party company and I need to capture screen data when the user clicks a button on that application. Now, I can capture the text using SendMessage() with the WM_GETTEXT parameter. The only problem is that I need to do this when the user clicks the 'Submit' button.

I created a DLL and used the SetWindowsHookEx() to capture the m开发者_如何学Pythonouse events to the application and I get the mouse click notifications. The only problem is that I don't know where they clicked in the application.

Can someone point me in the correct direction to capture the button click notifications in a different application?

Thanks in advance.

Jason


xPos = GET_X_LPARAM(lParam); 
yPos = GET_Y_LPARAM(lParam); 

http://msdn.microsoft.com/en-us/library/ms645607%28v=vs.85%29.aspx

The coordinate is relative to the upper-left corner of the client area. The ChildWindowFromPoint API might be of some use to you too. http://msdn.microsoft.com/en-us/library/ms632676%28v=vs.85%29.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜