Click here to Skip to main content
15,892,737 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Dears,
I have a MFC dialog that contains a CEdit object inside. By default, if using Spy++ to query the class name of CEdit, it is "Edit". I wanna change its name to my private class name.
Does anyon have any idea?
Posted

1 solution

what you see as class name ("Edit") is the window's class name for edit control window. In windows programming every UI controls(edit box, combo box, button etc.) you see is basically a window. This window class name has no relation with your CEdit or your own CEdit derived class name. You can not change the class name you see in SPY++ for an edit control. It will always be "EDIT". If you want to change it, you have to create your own window using CreateWindow() function and handle all WM_CHAR, WK_KEYDOWN messages to make that window behave like an edit control. But that is out of your aim I guess.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900