
Disabling controls in a toolbar
Quote:
> I need to programatically disable controls/buttons of the toolbar in
> another running application. How do I do it? Is there a set of Win APIs
> which I can use?
> Thks
> Wilson
Hi.
I don't excatly have the soultion to your problem, but I can get
you started.
What I think you should do is get the toolbar hwnd and then iterated
through the childs and set the one's you want to a disable state. I don't
excatly recall the api functions names but thats what I think:
EnumChildWindows - This will get you all the windows childs. Use this to
obtain the toolbar hwnd and then use this function on the toolbar to get the
buttons. This function use a callback function.
SetWindowLong - Use this function to change the properties of a button
(or any other window).
FindWindow - You can use this function to get the toolbar's parent hwnd.
(I don't like this function, try to find a better one)
Anyway this should get you started, If you're going in this
direction and need more help, feel free to write to me.
Bye
Ron Srebro