Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. Clever Code
  4. IMPLEMENT_DYNAMIC, DECLARE_DYNAMIC problem

IMPLEMENT_DYNAMIC, DECLARE_DYNAMIC problem

Scheduled Pinned Locked Moved Clever Code
helpc++phpcomdiscussion
1 Posts 1 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sarath C
    wrote on last edited by
    #1

    Today I spent around 2 hours to fix a problem. I have created a new Dialog class derived from CDailog. When my code was on half way my PL told me that, you can use a dialog class which is available from a library (I'm not mentioning the name) which will do some basic look and feel for your dialog. I suddenly incorporated the new .h file, lib and DLL files with my projects to use that library. After that my dialog class is not compiling at any cost. It's stopping by pointing error in IMPLEMENT_DYNAMIC macro call in my CPP file. The error was "classMyDlg" not a memeber of MyDlg class. First I doubted my code, the I thought that it's the problem with macro definition because the base class defined inside a name space which is contained by another namespace. I doubted the parameterized constructor ( but fortunately it was acting as a default one because of the default value to the parameters) I just removed that IMPLENT_DYNAMIC macro from CPP file and DECLARE_DYNAMIC from my .h file then I compiled. I was consoling myself that my Dialog class is not used for any Runtime identification purpose. I just went through the class declaration of the base class. WTF. It's missing the DECLARE_DYNAMIC declaration. I just confirmed by adding the DECLARE_DYNAMIC in it's header file. Yes! it compiling (not linking) I sent a mail to my PL to ask the responsible person to fix the problem and I'm happy now even that ***code*** wasted my 2-3 hours

    -Sarath_._ "Great hopes make everything great possible" - Benjamin Franklin

    My blog - Sharing My Thoughts, An Article - Understanding Statepattern

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups