Solved

How to determine programmatically if a slider is enabled?

Posted on 2002-07-11
5
218 Views
Last Modified: 2010-04-01
I need to determine if a slider within a separate application is enabled or disabled programmatically.
Same thing with a progress bar.
0
Comment
Question by:petlev
5 Comments
 
LVL 30

Expert Comment

by:Axter
ID: 7147150
Do you have access to the other application's window handle?
0
 

Author Comment

by:petlev
ID: 7147628
Yes I can get a handle.
0
 
LVL 22

Expert Comment

by:ambience
ID: 7148177
you mean handle to other applications main window, right ? If yes then there seems to be a need of enumerating all the child windows of main window and then perhaps children of children until you get to the slider window.

once you have found hWndslider you can use IsWindowEnabled(hWndSlider) to determine if it is enabled or not.
0
 
LVL 22

Accepted Solution

by:
ambience earned 200 total points
ID: 7148184
I suggest you use spy++ and determine the window hierarchy for that application, that may give you some hint about where you are going to find that slider.

This way you can use FindWindowEx to get to the slider, otherwise using EnumChildWindows might be a little extra work.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7148362
And when you have the handle of the slider, use the IsWindowEnabled() API.
-- Dan
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

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

911 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

17 Experts available now in Live!

Get 1:1 Help Now