Book a Demo

Author Topic: AFX_EXT_CLASS  (Read 2759 times)

digwizf18

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
  • Windows programming.... errrrr aaaaahhhhhhhhh! &$@*
    • View Profile
AFX_EXT_CLASS
« on: April 26, 2005, 02:03:44 pm »
I noticed that when I reverse engineer some classes I wrote within MFC extension dlls that I end up with a bunch of classes in my model named "AFX_EXT_CLASS".  This is unfortunate as this is never the name of a class.  It is a windows macro used to alert the visual studio compiler that a particular class should be exported from a dll.  This is what allows MFC applications to link to classes and functions designed within other dll files.

So the class declarations for these types of class types look like this:  Note that the name of the class is TCS_Row, not AFX_EXT_CLASS.  But I have no choice but to put this tag here.  This is how MFC applications link to classes in other dlls.  

class AFX_EXT_CLASS TCS_Row : public ListCtrlElement
{
public:
  TCS_Row();
  virtual   ~TCS_Row();
private:
};

It seems as though, EA should have a database of these constants because I don't know how windows programmers will be able to use the reverse and forward engineering tools.  

Now I'm trying to figure out how to rename my class in the model and continue to be able to synchronize the code and model from here on out.  Does anyone have any suggestions on this?  There must be someone who has run into this before.

Thanks a lot!

Shawn Fox

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: AFX_EXT_CLASS
« Reply #1 on: April 26, 2005, 03:34:28 pm »
You'll need to add AFX_EXT_CLASS to the list of language macros.  Configuration | Language Macros.

If you rename the class in the model the reverse engineering should synchronise with that class and then you should be able to use it for both forward and reverse engineering.  If you don't want to do that then the best option I can think of is to delete the imported class(es) from the model and start again from scratch.

Simon