StarDict Scan功能如何工作? [英] How does StarDict Scan function work?

查看:69
本文介绍了StarDict Scan功能如何工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发具有丰富编辑控件的MFC应用程序.我的问题是,我想在其他进程(例如StarDict)中隐藏富编辑控件中的文本.因此,我将WM_GETTEXT的消息处理程序添加到我的CRichEditCtrl派生类中.我的管理员是

I''m developing MFC application that has rich edit control in it. My problem is that, I want to hide text in rich edit control from another process (e.g., StarDict). So, I add a message handler for WM_GETTEXT to my CRichEditCtrl derived class. My handler is

LRESULT MyRichEditCtrl::OnGetText(WPARAM wParam, LPARAM lParam)
{
     CString str = _T("");
     tlstrcpyn((LPWSTR)lParam, str, (INT)wParam);
     return (LRESULT)str.GetLength();
}


但是StarDict仍然可以在我的丰富编辑控件中扫描文本.我认为StarDict可能不会通过WM_GETTEXT检索文本,而是可能通过EM_STREAMOUT检索文本.因此,我想知道StarDict Scan功能是如何工作的.


But StarDict still can scan text in my rich edit control. I think StarDict might not retrieve text via WM_GETTEXT, it might retrieve via EM_STREAMOUT. Thus, I''d like to know how StarDict Scan function work. Could anybody help me please?

推荐答案

显而易见的答案是下载程序并反编译,以供自己查看.幸运的是,StarDict是开源的GPL代码.

您为什么不只下载源代码并亲自检查一下呢?
比实现自己的自定义控件(模仿richedit的外观,同时阻止任何程序自行检索文本的工作)要容易得多.

尽管仍然可以通过code.google
找到它,但是Source-forge显然出于版权考虑已删除了该项目.
此处是下载页面: http://code.google.com/p/stardict-3/下载/列表 [^ ]
The obvious answer would be to download the program and decompile it, to see for yourself. Fortunately, StarDict is open-source, GPL''d code.

Why don''t you just download the source-code and check it out for yourself?
Much easier than implementing your own custom-control that emulates the appearance of a richedit while thwarting the efforts of any program to retrieve the text for itself.

Source-forge has apparently removed the project due to copyright concerns, though it can still be found via code.google

Here''s the download page: http://code.google.com/p/stardict-3/downloads/list[^]


这篇关于StarDict Scan功能如何工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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