Custom MDI “More Windows” Dialog

Few words about MDI Window menu In an MDI aplication, the Window menu contains items which alow selecting/activating one of the open documents. If the number of open documents exceeds 9, then Window menu is appended with a “More Windows…” item.   If the user selects “More Windows…”, a “Select Window” dialog appears, in which all … Read more

Enumerate documents in MDI applications

To enumerate all open documents in MDI (Multiple Document Interface) MFC applications we can do the following: Use CWinApp::GetFirstDocTemplatePosition and CWinApp::GetNextDocTemplate to get application document templates. For each document template, use CDocTemplate::GetFirstDocPosition and CDocTemplate::GetNextDoc to get contained documents. Getting documents list // MyMDIApp.h // … typedef CTypedPtrList<CObList, CDocument*> DocsPtrList; // … class CMyMDIApp : public … Read more