×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Modify ToolbarWindow32 Class

Modify ToolbarWindow32 Class

Modify ToolbarWindow32 Class

(OP)
First let me explain what I am needing to do. I am attempting to modify a toolbar (enable, disable, widen the button) that is part of a VBA enabled application, however the problem lies in the fact that there is no API function that I can use to directly modify the button (that I am aware of). I have attempted to enable and/or disable the buttons by enumerating the child windows of the parent application ...

EnumChildWindows Application.HWND, AddressOf(EnumChildCallbackProc)

I can grab the correct toolbar, but I am not able to find the structure or mechanism by which I can send the message to the button.
For example where tbhWnd is the toolbar &H401 is TB_ENABLEBUTTON (but how do I get the button ID for ?????) and where False is to disable the button....

SendMessage tbhWnd, &H401, ?????, False

Any help will be greatly appreciated....
Incedently the VBA toolbar access from the application controls do not allow the enabling/disabling of buttons, which is my primary need.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources