hey.
I'm tryin to find out a good way to do this, if it's possible:
I've got some dlls that all consists of the same class. Like:
Code:
class ObjDll {
      void Draw(HDC hdc);
      ....//more functions
}
now, since there is gonna be many many of these DLL's with just
some changes in them, I would like them to link to another "base"-dll so that the code and behaviour of these dll's would be easy to maintain. The thing is that I want this "base"-dll to act like the "default" functions. For exampel, the Draw(..) function draws the object calling a function Draw(..) that I want to be the same for several objects, but occasionally I want a dll to have it's own drawing routine. Err..this is kinda hard to explain..this might be something like what I want in semi-pseudo code:
Code:
class ObjDll {
     #ifdef IMPORTDRAW
     import function from base-dll
     #else
     void Draw();
}
so that if IMPORTDRAW is defined the class imports that function from the base-dll and otherwise just use void Draw() which would be defined in this specific dll's code.
I can't seem to find a good way to do this..
the only thing that comes to mind is to use plain (non-class) functions in the base dll and pass it all the necissary objects from the class but that would require a lot more work...and the idea isn't very appealing..
anyone has any tips or pointers?
thanks a bunch!
/btq