隐藏 VCL 类
有一些程序工具(例如 WinSpy++)允许您将鼠标悬停在任何控件/组件的句柄上并返回该句柄的类名。例如,如果我将 TMemo 放在 Delphi 表单上并编译应用程序,如果我使用 WinSpy++ 并将鼠标悬停在应用程序上(备忘录上方),它将显示编辑器的类名称为 TMemo。
现在,假设我不希望任何人使用此类程序来确定我在应用程序中使用的组件,我将如何防止类名显示在工具(例如 WinSpy++)中?
我问这个问题是因为我不希望任何人轻松创建我可能创建和发布的任何应用程序的克隆,如果发现我正在使用的组件的类名,这将使他们的任务变得更容易,因为这样他们就知道要使用什么。
简而言之,如何从 WinSpy++ 等外部查看器工具中隐藏我在 Delphi 应用程序中使用的 VCL 的类名。
WinSpy++ 可以在这里找到: http://www.catch22.net/software/winspy
添加,我知道我可以自定义派生这些组件以将类名称更改为我自己的,但它们一定是一种更简单的方法。
There are some program tools such as WinSpy++ which will allow you to hover over the Handle of any Control/Component and return the Class Name of that Handle. So for example, if I dropped a TMemo on a Delphi Form and compiled the Application, if I used WinSpy++ and hovered over the Application (above the Memo), it will reveal the Class Name of the Editor as TMemo.
Now, suppose I dont want anybody using such a program to determine the Components I am using in my Application, how would I prevent Class Names from showing up in a tool, such as WinSpy++?
I ask because I dont want anyone to easily create clones of any Applications I may create and release, if the Class Names of the Components I am using are discovered it would make their task easier because then they know what to use.
Simply put, how can I hide the Class Names of the VCL I use in my Delphi Application from external viewer tools like WinSpy++.
WinSpy++ can be found here: http://www.catch22.net/software/winspy
To add, I know I can custom derive these components to change the Class Names to my own, but their must be an easier way.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以重写
CreateParams
并将您自己的类名放入Params.WinClassName
中。默认行为在TWinControl.CreateParams
中实现:You could override
CreateParams
and put your own class name intoParams.WinClassName
. The default behaviour is implemented inTWinControl.CreateParams
: