Is there any way to change name of process? I am developing App in MFC c++, but I want it to be invisible for HWND FindWindow(Name Window, Clasename of Window) function. It is easy to change Caption of main window, but I have no idea how to change classname of Window.
1 Answer
To set the window class name of your main window in MFC you first call AfxRegisterClass (doing this in InitInstance, before the window is created) with your desired classname and then in the mainframe class override CMainFrame::PreCreateWindow and modify the passed in CREATESTRUCT with your desired classname.
This can be useful if you want another process to easily find your main HWND, but it is not very useful to try and make your window invisible to FindWindow.