locked
MFC Class Wizard does not show classes in namespaces RRS feed

  • Question

  • VS 2010:

    I tried to invoke the class wizard to add a message handler. Class wizard shows only classes that are in default namespace.
    It does not show classes that are in some namespace.

    Monday, March 15, 2010 10:19 PM

All replies

  • move your namespace declaration to cpp files, like 

    namespace A
    {
    #include "MyDoc.h"
    #include "MyView.h"
    ....

    }




    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful.
    Visual C++ MVP
    Thursday, March 18, 2010 8:39 PM
  • My code compiles and works fine.

    I think it is a defect of the class wizard. It does not show classes in namespaces.

    Friday, March 19, 2010 8:30 PM
  • Yes, I think so too, but I guess the fix is low priority. I am suggesting you to fool the class wizard to think your class are global.

     



    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful.
    Visual C++ MVP
    Friday, March 19, 2010 9:01 PM
  • OK, Can I report it somewhere so it does not stay unnoticed?

    I think the severity of a missing class wizard is high. In large projects it is essential to use namespaces.

     

    Thank you

    Vaclav

    Sunday, March 21, 2010 9:26 PM
  • You can also visit connect.microsoft.com/visualstudio to open a bug report.

    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful.
    Visual C++ MVP
    Sunday, March 21, 2010 9:50 PM