Unable to Add/Remove because the code element is read-only

Source: Internet
Author: User

I just learned how to use MFC to write embedded software. Various problems are coming soon. Create a new dialog in the resource tab and drag it into a button. However, the time needed to add the space is not successful. A prompt box is displayed, "You cannot perform the Add/remove operation because the code element ** is read-only ". View the corresponding. CPP and. h file, found that there is no read-only attribute, no way, turn to the network, found this problem is quite common, refer to this article, save the existing project, delete it in the directory. solve the problem by re-opening the solution after the NCB file.

Another problem is that the list is empty after you click "control event" in the property bar. No, you should check the previous dialog box and find that the base class is wrong, because it is inherited from the cdhtmldialog class, the corresponding. CPP and. after re-establishing the corresponding class for the hfile, the above situation is triggered, which should lead to confusion in the NCB file. Adding the button response function is to modify the data of the classview and wizardbar modules in the NCB file, if the data is disordered, the function cannot be automatically added.

Embedded programming is just getting started.

Unable to Add/Remove because the code element is read-only

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.