Я искал в Интернете и получил противоречивые ответы, которые не решили проблему для меня. Я создал диалоговое окно, а затем щелкнул мастера, чтобы создать для меня класс. К сожалению, он плохо назвал класс и файл, поэтому я переименовал файл. Теперь Visual Studio не позволяет мне делать что-либо через графический интерфейс к ресурсу dlg - например, подключать обработчик кнопок и т. Д. Я получаю окно сообщения:
«Операция добавления / удаления невозможна, потому что элемент кода "Cxxxx" read only"
This is a real problem because adding handlers and things manually through the code is tedious and one of the developers just isn't able to do it that way - he needs the GUI to manipulate the events.
I have tried deleting the ncb file and rebuilding the project, but no luck at all. MS apparently has not fixed this problem after 4 years or so (based on the searches I have seen online.
I can't add variables, event handlers or anything else useful through the MFC app wizard gui. I can only do so by editing the cpp and h files.
Does anyone have any suggestions?