none
I need to replace the MFC macros so I can use namespaces!!

    Question

  • Hi,

    I want to use namespaces in my MFC applications in Visual Studio 2015/2017. The macros get in the way. In particular IMPLEMENT_DYNCREATE does not accept this syntax:

    IMPLEMENT_DYNCREATE(name_of_namespace::name_of_class)

    Anybody have some replacement for these macros?

    I love MFC but I also like namespaces!!

    Regards,

    Juan


    Juan Dent

    Monday, March 20, 2017 9:20 PM

Answers

  • Have you considered including a using directive for the namespace so that you don't  have to include the namespace name in the IMPLEMENT_DYNCREATE macro?
    • Marked as answer by Juan Dent Tuesday, March 21, 2017 12:18 AM
    Monday, March 20, 2017 9:44 PM

All replies

  • Have you considered including a using directive for the namespace so that you don't  have to include the namespace name in the IMPLEMENT_DYNCREATE macro?
    • Marked as answer by Juan Dent Tuesday, March 21, 2017 12:18 AM
    Monday, March 20, 2017 9:44 PM
  • Great idea RLWA32!!

    Thanks

    Juan


    Juan Dent

    Tuesday, March 21, 2017 12:19 AM