Solved

How to determine programmatically if a slider is enabled?

Posted on 2002-07-11
5
222 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

861 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