In VC ++, the system prompts "cannot add new member" SOLUTION

Source: Internet
Author: User

When we add events for the controls in the dialog box, we do not know that you have not double-clicked the control as I did.Cannot add new MemberI think a friend may have encountered such a prompt. As long as this happens, the above message is displayed no matter how you click the dialog.

Of course, I also read it on the Internet. Although there are different opinions, I think it should be correct. Otherwise, it won't be written in disorder, but it's just that the objective environment is different. Now let's talk about the general solution.

1.: if this happens, we can close the project and delete it *. CLW file, open the project, and press Ctrl + W to open classwizard. Here we enter the file name of the previously deleted file, and click OK to generate the file again *. CLW file. (Note: here *CodeYour project, for example, my project is named test, so we should delete test. CLW file). If the classwizard page is executed sequentially, the above problem is solved.

2. if the prompt information such as canot find header file for class appears intermittently (I have such information today), if the prompt class does exist, then we need to go to the prompt file to find out whether there is a problem with the Association of class and resource ID (of course there are problems in all of them ), this is where my main problem occurs tonight. It is the cbusconsignview class associated with the resource in the dialog box with ID idd_bus_consign.

 

// {Afx_data (cbusconsignview)Enum{IDD=Idd_bus_consign};// Note: The classwizard will add data members here //} afx_data

Write the cbusconsignview class error to the cbusconsign, so the above is always the case.

In this place, most of my friends may think that

// {Afx_data (cbusconsignview)

It has been commented out, so nothing will affect writing. Otherwise, we must write the class name correctly here, otherwise, it is difficult to find such errors when your subjective consciousness is in it.

Summary:

The main cause of this error is that there is no class associated with the resource. If the class is associated, it may be that something is wrong, therefore, as long as you carefully check the classes related to this resource, this problem may be solved.

 

 

More TechnologiesArticleSee Shi Changquan's personal website: http://www.joyvc.cn

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.