Solved

Catch event mouse right_click on CLOSE button of external application

Posted on 2008-06-25
6
675 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
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…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

759 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