Deriving classes from CObject in ClassView (and other problems) 
Author Message
 Deriving classes from CObject in ClassView (and other problems)

I have been using the ClassView abilities of VC++ 6.0a for a little time
now, and they are extremely useful for constructing the framework of
user-classes which I use for data storage etc.  However there are some
obvious shortfalls or omissions and I wonder if its possible to rectify any
of them by-hand.

a) As stated in the documentation, CObject is the root for all but a meagre
few MFC classes, and is ideal as a base-class for user-classes.
Unfortunately, when I create a new class using ClassView,  there is no
mention of it in the dropdown list if I select MFC Class, and if I select
Generic class and add it as a base class, it complains that it cannot find
the header files for CObject and that I will have to add them manually.
Is there any file I can amend, or anything I can do to rectify this strange
gap in the ClassWizard's knowledge, since it is a strange omission,
considering the usefulness of the class.

b) Has anyone created a Sorted, Unique Entry, Collection. CMap is the
closest I have found, but that is not sorted apparently, and anyway, The key
criteria is in the item/value to be stored, I don't want it as a separate
key as well. Thats just inefficient.
CList and CArray are ordered according to insertion, but they do not even
attempt to enforce uniqueness.

c) Has anyone else had trouble using the 'Add new function...' in the
ClassView/Wizard to add operators, or templatized member functions?

d) Creating template classes directly into a file seems to work ok, but
suddenly you get a Globals Folder in the ClassView, which apparently
contains something (+ beside it), and yet you can't open it. Close the
Workspace, and reopen it, and the Globals folder has vanished.

Thanks for taking the trouble to read through my ramblings, and thank you in
advance for any light you can shed on any of these problems.

Yours,

Andrew Ratcliffe

(Responses on the newsgroup fine, but would appreciate any code examples to
be duplicated to my Email address)



Mon, 02 Jul 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Missing CObject-derived class in Classview

2. ClassView - Classes derived from CObject

3. Problem with copy/ paste of CObject derived class

4. Problem with CObject and a derived class

5. Q: MFC CObject derived class and Serialization across a socket problem

6. Adding a class derived from CObject via Class Wizard

7. How to derive a class from CObject using the class wizard

8. Classview not showing classes derived from classes in user namespace

9. Deriving new class from CObject in VC++6.0

10. Deriving class from CObject

11. Sorting CObject derived classes with qsort...?

12. Failure to Serialize (read) a CObject derived class

 

 
Powered by phpBB® Forum Software