Home » Category » Microsoft Visual C & C++

Microsoft Visual C & C++: Document count in multiple document??

202| Wed, 06 Feb 2008 16:09:00 GMT| abdulkareem| Comments (3)
How may document can I open in a multi doc application?.. Is there any limit ?..
Regards,
Kareem.

Keywords & Tags: document, count, multiple, microsoft, visual c++, vc

URL: http://www.7prog.com/visual-c-c++/95061/
 
«« Prev - Next »» 3 helpful answers below.
See MSDN ID: Q106455 -- "Acquire a List of All CDocument Objects".

void CMyApp::GetDocumentList(CObList * pDocList)
{
ASSERT(pDocList->IsEmpty());

POSITION pos = GetFirstDocTemplatePosition();

while (pos)
{
CDocTemplate* pTemplate = (CDocTemplate*)GetNextDocTemplate(pos);
POSITION pos2 = pTemplate->GetFirstDocPosition();
while (pos2)
{
CDocument * pDocument;
if ((pDocument=pTemplate->GetNextDoc(pos2)) != NULL)
pDocList->AddHead(pDocument);
}
}
}

Dmitry Karpezo, dkarpezo...lycosmail.com

dmitrykarpezo | Sat, 10 Nov 2007 05:47:00 GMT |

Thanks for your reply... The code segment that you sent me only to iterate the CDocuments.. But, my question was.. How many Cdocument can I open at a time ?...
Thanks agian for your time...

Regards,
Kareem.

abdulkareem | Sat, 10 Nov 2007 05:48:00 GMT |

No, there is no limit to that.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I do not do it for the rating. Oh, wait... Sure, I do!

vladimirf | Sat, 10 Nov 2007 05:49:00 GMT |

Microsoft Visual C & C++ Hot Answers

Microsoft Visual C & C++ New questions

Microsoft Visual C & C++ Related Categories