Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

MSVC++ CDocument List?

0 views
Skip to first unread message

Steve Hiller

unread,
Aug 18, 1994, 9:17:21 AM8/18/94
to
When a VC++ program is used to create a number of documents
of a given CDocument class, is there a list of the documents
kept somewhere? Or do I need to keep track of this myself?

Thanks,
Steve

Michael Oltz

unread,
Aug 18, 1994, 10:00:42 AM8/18/94
to

Here is a generic suggestion for questions about MFC internals: crawl around
in the MFC source and find out. The class you mention is in files with names
starting with doc*

Look at the constructor, and related functions, and then see if you can find
references to these in other classes (the list, if there is one, may be
maintained by another class). The Unix "grep" command and its relatives, or a
utility with similar functionality, like SuperFind that comes with the
Symantec C++ compiler, are INVALUABLE in poking around in there. And
getting under the hood is very helpful in understanding what is going on.
One will have a difficult time achieving mavenhood otherwise (I have not
reached such a level). This is why they give us the source.

By the way, some may say, "Well, what good is that? I thought these class
libraries were supposed to make it easier to program in Windows." Well, yes,
they save us time in doing the grunt work; unfortunately, they do not relieve
us from the necessity of understanding how it works (and if we do not, we will
be like the Wizard of Oz and his balloon: "I can't come back; I don't know how
it works!").

Edward Kenworthy

unread,
Aug 18, 1994, 1:25:01 PM8/18/94
to

Yes, it's an obj list maintained by the CDocumentTemplate-derived
class(es) in your app'.

Edward
------------------------------------------------------
Edward Kenworthy
Hoskyns Technology Park, Tel: +44 (0)21-333-3536
1 Avenue Road, Fax: +44 (0)21-333-3308
Aston.
Birmingham B6 4DU. England


Pan

unread,
Aug 18, 1994, 3:30:13 PM8/18/94
to
st...@cstr.ed.ac.uk (Steve Hiller) writes:

AS far as I can tell it is best to maintain your own list. But I sure would
like to be wrong!
--
[John Fricker Windows Software Design and Development]
[MS-VC++ 1.5 MFC 2.5 BC++ 4.0 Applications and VxD]
[p...@cris.com // preferred ]
[73512...@compuserve.com // alternate ]

JT Anderson

unread,
Aug 22, 1994, 12:35:25 PM8/22/94
to
In article <CuqFK...@aisb.ed.ac.uk>,

The CDocTemplate class contains the (undocumented) member functions
GetFirstDocPosition() and GetNextDoc(). These functions can be used
to traverse the list of documents for a document template. The
CWinApp class contains a m_templateList member which is a CObList
of document templates.

This is discussed in MS Knowledge Base article Q106455.
--
J.T. Anderson
Locus Computing Corp.
j...@locus.com

0 new messages