"cannot add new member" while trying to add a button to a vc6 program with mfc support

Posted on 2004-11-30
Last Modified: 2008-01-09

I am tryian to add a button to a dialog, I can drag an drop it in the dialog, but when I double click on it, to see the definition a message box with " cannot add new member appaers"..... Aditionaly I can not open the class wizard..

What am I doing wrong?
Question by:RobertoDeAlba
    LVL 8

    Accepted Solution

    Hi there,

    This sounds suspiciously like a missing visual studio tag error.  To clarify VS adds commented out text to the header and source files so it knows where to add new data members, data exchange handlers, and message handlers.  You may have accidentitaly deleted one of these which would cause this error.   I don't have VS in front of me right now, but look for "do not edit" and you'll find the tags I'm talking about.

    Probably the quickest work around for you (although maybe not ideal or the best) is going to be to remove the source files from your project (only the dialog.h and dialog.cpp).  Copy them to a different directory.  Then create new source files from your dialog resource.  Add all your message handlers back in using class wizard.  Then cut and paste your source code back into the functions.  It sounds like a lot but really isn't too bad.

    Hope this helps.

    Good luck,

    Author Comment

    Thanks Aaron

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Course: HTML5 Mobile App Development with PhoneGap

    PhoneGap can help you leverage your already existing HTML5, JavaScript, and CSS skills in order to create and deploy cross-platform mobile apps.This program comprehensively covers HTML5 mobile app development from top to bottom.

    Suggested Solutions

    Title # Comments Views Activity
    fizzArray  challenge 1 28
    modThree challenge 4 50
    tripleUp challenge 7 54
    powerN  challenge 3 34
    A short article about a problem I had getting the GPS LocationListener working.
    Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
    Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
    In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now