Solved

Detecting mouse click on a control known only by handle

Posted on 2000-05-09
5
153 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
[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
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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
When I am typing into a TEdit last word repeats 7 172
Delphi: ForceDirectory plain function 7 77
FMX and jaudiotracker playing memory stream 29 104
RESTRequest Parameter 4 76
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…
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…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
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…

740 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