访问Windows控件的ToolTipText,例如StartMenu的ToolTipText [英] Access ToolTipText of Windows Controls like StartMenu's ToolTipText

查看:103
本文介绍了访问Windows控件的ToolTipText,例如StartMenu的ToolTipText的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

专家
我正在开发一个应用程序,在该应用程序中,我需要从操作系统及其应用程序的窗口中访问工具提示文本
我想从开始"菜单以及桌面上存在的任何i-con中访问工具提示文本.
因此,请给我一个提示,我如何在mousemove上访问工具提示文本并将其存储在应用程序的textBox控件中.
我需要从应用程序的开始按钮及其子菜单访问工具提示.所有桌面的ICON的工具提示.这是我的要求,PLZ帮助...."
PLZ解释此流程的完整过程...
非常感谢Adv ...

Hi Expert
Am Developing an application in which i need to access tooltip text from the operating system as well its application''s window
I want to access tooltip text from the Start Menu as well from any i-con exist on the Desktop.
So plz give me hint how could I access ToolTip Text on mousemove and store in a application''s textBox Control.
"I Need to access ToolTip From Start Button And Its Sub Menu''s ToolTip from my application. All The Desktop''s ICON''s ToolTip. This is my Requirement, PLZ HELP...."
PLZ Explain The Complete process for this...
Great Thank in Adv...

推荐答案

我认为唯一的方法是使用
I would think the only way to do this would be by using Windows Hooks[^] and activating your app on the appropriate messages. I have not used this feature much myself but there are probably some articles about it somewhere on the net.


我使用以下代码片段解决了我的问题:

hWndToolTip = :: FindWindow("tooltips_class32",NULL);
iToolTipLen = :: SendMessage(hWndToolTip,WM_GETTEXTLENGTH,0,0);
strToolTipText =新的TCHAR [iToolTipLen]; //分配缓冲区
:: SendMessage(hWndToolTip,WM_GETTEXT,(WPARAM)iToolTipLen + 1,(LPARAM)strToolTipText); //在strToolTipText
中获取所需的文本

谢谢:)
I used following code snipet for solving my problem :

hWndToolTip = ::FindWindow("tooltips_class32",NULL);
iToolTipLen = ::SendMessage(hWndToolTip,WM_GETTEXTLENGTH,0,0);
strToolTipText = new TCHAR[iToolTipLen]; // Allocate the buffer
::SendMessage(hWndToolTip,WM_GETTEXT,(WPARAM)iToolTipLen+1,(LPARAM)strToolTipText ); // Get the needed text in strToolTipText


Thanks :)


尝试使用此 CXInfoTip-信息工具提示.


这篇关于访问Windows控件的ToolTipText,例如StartMenu的ToolTipText的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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