-1

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
  • 4
    Why do you want it invisible for FindWindow? (what problem are you actually trying to solve?)
    – utnapistim
    Commented Apr 20, 2015 at 11:22

1 Answer 1

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.