Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How determine which control clicked?

Status
Not open for further replies.

LineFeed

Programmer
Jun 4, 2010
3
0
0
BR
I have an application where I need to know the controls that are being clicked.
Currently I use the timer event with the GetKeyboardState and GetCursorPos to detect the click of a mouse, but can't detect which control is clicked.
I'm using a MDIClient.
Can someone help me?
 
The method getobjectatpointer only works on DataWindow object.
 
You could put code in the 'clicked' event of the controls
(something like '<control>.Classname()') to return a string containing the name of what is clicked. Write this to some common area and then modify your given example to get the value.

Matt

"Nature forges everything on the anvil of time
 
I was thinking about something that captures objects from windows. Some API or something like that.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top