Q: document names in Window menu 
Author Message
 Q: document names in Window menu

Hi.  I'm having trouble with the titles of my documents in the Window
menu in my MDI app.  How does MFC determine which doc names to add to
the "open window" list?  I am hiding windows (when one is maximized,
hide the rest -- haven't gotten it totally figured out yet, see my
recent post) and when I do the "open window" list drops some of the
document names.  It is also possible to get the app to think that no
documents are open when at least 2 still are, but have been hidden.
Any help would be GREATLY appreciated!

Thanks.
Alan Lorence
(remove all bugs from my address for email)



Tue, 12 Dec 2000 03:00:00 GMT  
 Q: document names in Window menu

    Yes, it does some weird thing by iterating through the children of
the MDIFrameWnd's client area (which is itself a window). So if the
MDIChildWnd is hidden, it probably wouldn't show up. I have seen the code
to do this somewhere in the Microsoft KBase, but I can't recall where.
You may want to consider just maintaining your own list, and adding them
to a menu yourself. (Use CDocument::OnOpenDocument, CMenu::AppendMenu,
etc) I have always wondered why MFC doesn't provide a better
encapsulation of this list, and make it more easily available. - Doug S.

Quote:

> Hi.  I'm having trouble with the titles of my documents in the Window
> menu in my MDI app.  How does MFC determine which doc names to add to
> the "open window" list?  I am hiding windows (when one is maximized,
> hide the rest -- haven't gotten it totally figured out yet, see my
> recent post) and when I do the "open window" list drops some of the
> document names.  It is also possible to get the app to think that no
> documents are open when at least 2 still are, but have been hidden.
> Any help would be GREATLY appreciated!

> Thanks.
> Alan Lorence
> (remove all bugs from my address for email)



Fri, 15 Dec 2000 03:00:00 GMT  
 Q: document names in Window menu

    I also just found a KBase article (Visual C++ area, article Q106455) that
has some sample code that allows you to iterate through the list of open
documents using the DocTemplates. You may want to look at that as well.
- Doug S.

Quote:

>     Yes, it does some weird thing by iterating through the children of
> the MDIFrameWnd's client area (which is itself a window). So if the
> MDIChildWnd is hidden, it probably wouldn't show up. I have seen the code
> to do this somewhere in the Microsoft KBase, but I can't recall where.
> You may want to consider just maintaining your own list, and adding them
> to a menu yourself. (Use CDocument::OnOpenDocument, CMenu::AppendMenu,
> etc) I have always wondered why MFC doesn't provide a better
> encapsulation of this list, and make it more easily available. - Doug S.


> > Hi.  I'm having trouble with the titles of my documents in the Window
> > menu in my MDI app.  How does MFC determine which doc names to add to
> > the "open window" list?  I am hiding windows (when one is maximized,
> > hide the rest -- haven't gotten it totally figured out yet, see my
> > recent post) and when I do the "open window" list drops some of the
> > document names.  It is also possible to get the app to think that no
> > documents are open when at least 2 still are, but have been hidden.
> > Any help would be GREATLY appreciated!

> > Thanks.
> > Alan Lorence
> > (remove all bugs from my address for email)



Fri, 15 Dec 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Q: document names in Window menu

2. document names added as menu items. Please help

3. Removing document name from window title

4. Full Path Name of Document on Top Window

5. Multiple views of a document with the same window name

6. different names for windows of one document???

7. how to get a window's class name and window name

8. Document Template Windows Show In Additional Window

9. Setting the document name

10. epen different documents without using the associated program name

11. Naming Window/window class questions

12. Getting the document' file name

 

 
Powered by phpBB® Forum Software