首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > .NET >

类似翻译软件取词是如何实现的

2012-09-10 
类似翻译软件取词是怎么实现的?我想步骤大概是获取鼠标位置---获取窗口句柄--获取窗口文字要用那些API?怎

类似翻译软件取词是怎么实现的?
我想步骤大概是
获取鼠标位置---获取窗口句柄--获取窗口文字
要用那些API?怎么实现呢?

[解决办法]
var
P: TPoint;
h: THandle;
pText: PChar;
begin
GetMem(pText,128);
try
Windows.GetCursorPos(P);
h:=Windows.WindowFromPoint(P);
Windows.GetWindowText(h,pText,128);
Showmessage(StrPas(pText));
finally
FreeMem(pText);
end;
end;
[解决办法]
http://www.lihuasoft.net/article/show.php?id=233
http://www.2ccc.com/article.asp?articleid=884

热点排行