Solved

Catch event mouse right_click on CLOSE button of external application

Posted on 2008-06-25
6
677 Views
Last Modified: 2012-05-05
Hello Experts!
Please help me how to catch event mouse right_click on CLOSE button ( top- right of windows with sign X) of External application.
i need when user right_click on that position then return handle of active window.

Code or example please!
Thanks.
0
Comment
Question by:z27
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
6 Comments
 
LVL 21

Accepted Solution

by:
developmentguru earned 250 total points
ID: 21874213
If this is possible you would need to write a DLL to allow a Windows message hook.  You would need to know the class name for the little red X, that would let you know if it was the right section.  You would be able to tell that you had a WM_MOUSEDOWN message.  Here is a link explaining Windows hooks, you would need a global hook.  The link has downloadable source code.

http://delphi.about.com/od/kbwinshell/a/delphi_hook.htm
0
 

Author Comment

by:z27
ID: 21889676
Hello developmentguru!
i think it would need solve with Windows message hook too. Sorry for my Delphi, can you help me with demo source?
0
 
LVL 21

Expert Comment

by:developmentguru
ID: 21909845
The link I provided does have demo source.  Due to the act that it is posted on a commercial web site I should not copy it here.  If you have questions on the soure they give you, let me know.
0
 

Author Comment

by:z27
ID: 21936233
sorry, if someone post demo so better...
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses
Course of the Month6 days, 22 hours left to enroll

622 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question