On-Line about MFC controls remove the "control with this ID already exists" situation, found on the internet a lot about this aspect of things, but are not very full, it is not easy to figure out. Now ask me directly through a project and picture form and share a solution with you (if there is no, please learn from each other, qq1035169610):
1. To create an MFC project, which is limited to presentation, name the project "Lu".
2. The following is the addition of the button control to the graphical interface box. The results are as follows:
3. Simply pull the control into the graphical interface and create a macro in the Resource.h file, as shown in:
4. Then start changing the name and ID of the control. Here we set the name and ID to Lu and idc_lu, respectively.
Here is an ID with the same number as the original macro, as follows:
In this case, it is equivalent to the same ID (1001) corresponding to the name of two macros. At this time, as long as the name before the change of the macro delete the line, in other files are used in the modified control name and the name of the changed macro.
another case is that if you want to change the second button to the name of the first button, you must delete the macro in Resource.h (the second row) and then save it, and then change the name and idc_*** in the space. In this way, you will find , it has been successfully changed. Finally, the line just deleted is pasted into the Resource.h, so that all the changes have been successful.
About MFC controls remove the "control already exists with this ID" solution, detailed, online is not so detailed, I was "deeply hurt", so I would like to share the detailed method.