Find window handle of a ribbon button
Posted
by
ldx
on Stack Overflow
See other posts from Stack Overflow
or by ldx
Published on 2011-01-04T09:37:22Z
Indexed on
2011/01/04
9:53 UTC
Read the original article
Hit count: 207
Hi,
I'm trying to do some automation of windows applications. To do whatever I want to do, I need the window handles of some controls.
Before, I would accomplish this with a combination EnumWindows, EnumChildWindows and GetWindowText. But now, some newer programs no longer have toolbar with buttons on it. Instead, they have a ribbon.
This didn't seem like much of a problem to me at first, but now I notice that the buttons on the ribbon don't show up in EnumChildWindows! Or at least GetWindowText does not return the same text as the one seen on the screen.
So to make a long story short: Can anybody tell me how I can programatically find the handle of a button on a ribbon?
Thanks. Regards, ldx
© Stack Overflow or respective owner