Jeet
April 26th, 1999, 05:22 AM
I searched the archives, but came up with nothing. So if this has been covered before (and, since it is a very basic questio, I suspect that it has), I apologize and please direct me to the correct URL.
I am trying to right a general-purpose view class that will be able to handle windows messages. Simple right? Basically: call up the ClassWizard, then, onthe Message Maps tab, click on Add, then Add class, then New etc.. Basically jump through the hoops, and you have your class sitting there, nice and pretty, ready to use -- right click on it in the ClassView window, and you get the option to add a virtual function or windows message handler.
Great.
Now, what I want to do is to be able to use this class in other projects. In particular, I want to be able to zip up the .cpp and .h files, keep them on storage, and whenever I need this class's functionality just extract/copy them into the new project's directory and add them into the project. All this works fine, and I can compile etc., ... but no matter what I do, I cannot get the class wizard to acknowledge the fact that the inserted class has a message maps capacity!!! Right clicking on the class in the ClassViewer does NOT have the option of adding a windows message handler or virtual function (only adding member functions, variables etc.), and the class does NOT appear in the drop down list of classes in the Message Map tab of the ClassWizard. There is no option for me to use a ready-existing class when I want to add classes to the Message Map tab of the ClassWizard (the choice is limited to creating a new class or deriving one from a template).
Anyone know what I should do?
Thanks in advance!
I am trying to right a general-purpose view class that will be able to handle windows messages. Simple right? Basically: call up the ClassWizard, then, onthe Message Maps tab, click on Add, then Add class, then New etc.. Basically jump through the hoops, and you have your class sitting there, nice and pretty, ready to use -- right click on it in the ClassView window, and you get the option to add a virtual function or windows message handler.
Great.
Now, what I want to do is to be able to use this class in other projects. In particular, I want to be able to zip up the .cpp and .h files, keep them on storage, and whenever I need this class's functionality just extract/copy them into the new project's directory and add them into the project. All this works fine, and I can compile etc., ... but no matter what I do, I cannot get the class wizard to acknowledge the fact that the inserted class has a message maps capacity!!! Right clicking on the class in the ClassViewer does NOT have the option of adding a windows message handler or virtual function (only adding member functions, variables etc.), and the class does NOT appear in the drop down list of classes in the Message Map tab of the ClassWizard. There is no option for me to use a ready-existing class when I want to add classes to the Message Map tab of the ClassWizard (the choice is limited to creating a new class or deriving one from a template).
Anyone know what I should do?
Thanks in advance!