Disabling controls in a toolbar 
Author Message
 Disabling controls in a toolbar

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



Tue, 22 Jan 2002 03:00:00 GMT  
 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



Fri, 25 Jan 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. How to disable buttons in a toolbar control

2. Enable / Disable Button Using Toolbar Control

3. How can I disable double click event in toolbar control with visual basic

4. How to disable a particular button in a toolbar control

5. Form Toolbar vs Control Toolbar

6. Small toolbar look - toolbar control doesn't work properly

7. VB4 Toolbar Control--Creating Toolbars

8. How to disable an Application Toolbar

9. Disabling toolbar customization

10. Disable or hide buttons on custom toolbar?

11. How can I disable(greyed out) toolbar buttons?

12. Disable toolbar-items with VBA

 

 
Powered by phpBB® Forum Software