Solved

Detecting mouse click on a control known only by handle

Posted on 2000-05-09
5
148 Views
Last Modified: 2010-04-04
How can I detect a mouse click on a windowed control that I only know by its handle? The parent of the window is also known (a panel). Is it possible to create a transparent label and set its parent to the control?
0
Comment
Question by:Keijo
5 Comments
 
LVL 5

Expert Comment

by:TheNeil
ID: 2792183
Which control are you having problems with?

The Neil =:)
0
 

Author Comment

by:Keijo
ID: 2792207
It's a window created by Video for Windows capCreateCaptureWindow function. Too bad I only get the handle of the created window out of that function, not exactly easy to work with standard delhpi functions...
0
 
LVL 5

Expert Comment

by:TheNeil
ID: 2792220
Ahh...I see

What I'd suggest (and I don't know if it'll work or how to do it) is to monitor the Windows messages and then react to mouse clicks for the window with the handle you got back from capCreateCaptureWindow. Sorry, can't be any more help than that

The Neil =:(
0
 
LVL 6

Expert Comment

by:edey
ID: 2792969
I belive for this you need to use a system level mouse hook, you can find an example here:

http://www.delphifreestuff.com/examples/winhook.zip

there is also an example of a very interesting technique here:

http://www.delphifreestuff.com/examples/hookmethod.html


GL
Mike
0
 

Accepted Solution

by:
SERENNE earned 100 total points
ID: 2809819
if you want to detect the mouse click on a control use the event Onclick and send a system message with postmessage.
On the main window , use the WndProc function. Catch the message you send by postmessage.

you'll have a notifycation when the mouse is pressed on the control.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

914 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

20 Experts available now in Live!

Get 1:1 Help Now