reuse of MFC user class


Thread Starter

J-F Portala

Dear listers,
I am programming in C++ with Visual C 6.
When I create a new application, I intend to reuse some classes I have read in other projects. (one of the interest of C++). I have some difficulties to reuse classes with resource (dialog box for example). Now, I drag and drop the dialog box resource from a project to the new one, and after , I create a new class with
classwizard, and after I eliminate the content of the new generated class and I replace it with my old class. This the sole solution I have found to keep the class in the classwizard. If I add the odl class directly in the project, the classwizard does not recognize it, and it becomes more difficult to add new messages or new functions without the classwizard. Does anyone know a method to reuse user classes based on MFC on new project.
Thank you.

J-F Portala
SoViLor company
Have you tried deleting the .clw file from the project directory? You can delete it and Visual Studio will regenerate it when it finds it missing. It should include all classes it finds.

Similarly the .bsc and .ncb files will also be regenerated if missing.


Martinicky, Brian

Hi J-F,

You are right about Class Wizard not automatically recognizing classes that are manually added to a project. To get around this,
delete the .CLW file in your project directory. The next time you bring up Class Wizard, it will notify you that the .CLW file is gone, and ask you if you wish to rebuild it from your project files. After allowing it to do so, you will now find that all of your project's dialog classes can be seen in Class Wizard.


Brian Martinicky
Automation Intelligence, Inc.