Why are you declaring vectors in your dialog? Stop it. As I said before, it's really clear you're missing some fundamental concepts, more than can be introduced and explained in forum posts. Stop what you're doing. You're over your head. Spend some time learning how MFC, doc/view and dialogs work, and spend some time learning the basics of OOP. You can't learn this stuff by guessing and trial and error. It's too complicated.