Solved

Catch event mouse right_click on CLOSE button of external application

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now