Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Tracking a CheckBox

Posted on 1999-01-28
5
Medium Priority
?
305 Views
Last Modified: 2010-05-03
Hi,

I want to track the clicking of a checkbox in an application I did not write. I want another program to tell me when the checkbox has been clicked...

Is that Possible?
0
Comment
Question by:maximebrunet
[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 12

Accepted Solution

by:
mark2150 earned 50 total points
ID: 1471058
Doubt that you can get this to work without access to the original source.

M

0
 

Author Comment

by:maximebrunet
ID: 1471059
I think you can track the menus with the windows API, couldn't you track checkboxes as well?
0
 
LVL 3

Expert Comment

by:jjmartin
ID: 1471060
What application are you trying to monitor?  Perhaps there is an API you can use?  If not, I think you are out of luck.
0
 

Expert Comment

by:Billaban
ID: 1471061
I suppose that if you REALLY wanted to get from here to there you could write an app that would recursively search the processes for the app you didn't write (with the checkbox).  I presume that you would use the "Like" operator and string comparison to find the app.  Then enum (e.g., EnumChildWindows) the child window(s) (recursively if necessary) using the same technique to find the host of the highly touted checkbox.  Now you have the window hwnd of the checkbox host window.  This is where it would start to get ugly.  If you are familiar with the Visual Studio Spy tool (particularly the "Find Window" feature) u can confirm that a checkbox is just a button class object with style = 50000002.  If U don't have Spy there are other tools that provide the same insight into running app's.... Visual Test has one.  Now enum the controls of the window with the same EnumChildWindow technique and find the object with the desired button class and style.  If u have more than one checkbox in the enumeration - you have a problem differentiating.  Once you have the hwnd of the control u can determine the state and use PostMessage or SendMessage to convey as much to your app.  A connection point on a COM object doing all this would be more better but certainly not necessary.  Whew... I'm goin home.  HTH
0
 
LVL 12

Expert Comment

by:mark2150
ID: 1471062
Like I said, you're probably not going to get this to work without access to the original code.

M

0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

610 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