Hide VCL Classes
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开发者_如何学JAVA 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.
You could override CreateParams
and put your own class name into Params.WinClassName
. The default behaviour is implemented in TWinControl.CreateParams
:
with Params do
...
StrPCopy(WinClassName, ClassName);
精彩评论