MFC Class Wizard will not delete a control's member variable

190 views Asked by At

I'm using VS 2019, working in C++. I created a property page with a few combo boxes and edit controls. For reasons I don't understand, the dialog editor decided one of the "custom" member variables in the class was attached to one of the Edit controls. What I mean is, when I run the Class Wizard and go to the "Member Vaiables" tab, it shows what should be a Custom variable as being attached to one of the Edit Controls. When I highlight it and press "Delete Variable", it does nothing. Here's what I've tried:

  • Removed the variable and confirm the class wizard no longer shows it. Put it back and is connects it to the Edit control again.
  • Changed the type of the variable. No effect.
  • Changed the name of the variable. No effect.
  • In the Class Wizard I tried adding the variable through the "Add Custom" dialog. It tells me the variable already exists.
  • Deleted and recreated the Edit Control. With a different ID. The wizard then shows the member variable as "custom". However, when I change the ID back to the original ID, it automagically links it up with the Edit Control again, so I really haven't solved the problem.

I don't know if this is related, but when I press "Delete Variable" I always get an error pop-up that says, "Index and length must refer to a location within the string." But I get this no matter what variable I delete and in the other cases it still deletes the variable.

Has anyone else seen this? Is there a way I can manually unlink remove this association?

0

There are 0 answers