问题
I need help to set a Windows Form window classname to one chosen by myself. Didn't find anything useful, so I ask here.
I need this because an old C++ application DLL written by my brother(he has not the code any more) is using FindWindow method with classname to copy data. So i need rename the window class name the same as the old app to get my new app to work.
Any Idea ?
回答1:
Considering this could look as unanswered I found the solution yesterday.
It's not possible to change Window ClassName so I'm ending up using a wrapper invisible window to catch my WMessages.
For completeness the answer to this question was answered by Hans Passant in this post:
winform friendly class name
来源:https://stackoverflow.com/questions/7351148/c-sharp-bypassing-windows-forms-classname-name-creation-to-one-of-my-own