仅给定HWND时如何更新功能区标题 [英] How to update ribbon title given only a HWND

查看:73
本文介绍了仅给定HWND时如何更新功能区标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

[首先道歉,因为这当然不是一个合适的论坛,但是似乎"Windows Ribbon Development"已被删除.已存档.如果存在,请将该主题移至一个更合适的论坛.]

[First apologies as this most certainly is not the appropriate forum but it appears that "Windows Ribbon Development" has been archived. Please move this topic to a more appropriate forum, if one exists.]

我正在创建一个POC,我需要在其中从外接程序中更新Office应用程序的功能区标题栏.我认为使用简单的SetWindowText可以达到目的,但在视觉上没有任何作用.它确实更新了可以验证的窗口标题 使用Spy ++但仅使用SetWindowText不会影响真正可见的功能区标题.

I am creating a POC where I need to update the ribbon title bar of an Office app from within an add-in. I thought using a simple SetWindowText would do the trick but it does not do anything visually. It does update window's caption which can be verified using Spy++ but merely using SetWindowText does not affect the ribbon title which is what is really visible.

我可以使用任何肮脏的技巧来操纵具有色带HWND的色带吗?我假设Office功能区是标准的Windows功能区,因此可以通过COM接口进行操作.有没有办法从HWND获取一些功能区接口.进一步来说, 我只想影响功能区标题,而不是功能区的其他方面.

Is there any dirty trick I can use to manipulate the ribbon having the ribbon's HWND? I am assuming Office ribbon is standard Windows ribbon so it's manipulated by COM interfaces. Is there a way to get some of the ribbon interfaces from HWND. More specifically, I only want to affect the ribbon title, not other aspects of the ribbon.

推荐答案

没有API可以更改面板的名称

There is no API to change the name of Panel

http://msdn.microsoft.com/en-us/library/bb981960.aspx

在创建面板后,面板是固定的,并且没有HWND.

The Panel is fixed after you create it, and there is no HWND for it.


这篇关于仅给定HWND时如何更新功能区标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆