2

I only found this question about it, which hasn't been answered.

Is it possible to get the info at all?

So far, I've been able to get the screencoords of the ribbon itself but I wasn't able to get the position of the ribbon buttons.

Here the snippet which I use for getting the ribbon position and size:

RECT rect = new RECT();
GetWindowRect(Process.GetCurrentProcess().MainWindowHandle, ref rect);

this.ribbonRect.X = rect.Left;
this.ribbonRect.Y = rect.Top;
this.ribbonRect.Width = rect.Right - rect.Left;
this.ribbonRect.Height = Globals.ThisAddIn.Application.CommandBars["Ribbon"].Height;
Community
  • 1
  • 1
Flo
  • 540
  • 6
  • 20

0 Answers0