CMultiDocTemplate not showing correct menu? 
Author Message
 CMultiDocTemplate not showing correct menu?

My application has 4 CMultiDocTemplates with one of them, the menu
resource passed as the second parameter works and the correct menu is
shown when OpenDocumentFile is called, on the others the menu
isn't displayed.

        m_pmainDocTemplate = new CMultiDocTemplate(
                IDR_TYPE1,
                RUNTIME_CLASS(mainDoc),
                RUNTIME_CLASS(CChildFrame), // custom MDI child frame
                RUNTIME_CLASS(mainView));
        AddDocTemplate(m_pmainDocTemplate);
        // above line gets correct menu when OpenDocumentFile is called

        // but this template doesn't
        m_pOtherTemplate = new CMultiDocTemplate(
                IDR_TYPE2,
                RUNTIME_CLASS(mainDoc),                 // network document
                RUNTIME_CLASS(whateverFrame),
                RUNTIME_CLASS(whateverView));
        AddDocTemplate(m_pOtherTemplate);

When it runs I get an empty menu bar (well not quite I get the correct
.icodisplayed)

Is there any well known bear trap that I'm likely to have fallen in
here? How do I debug this? I don't see any relevant errors in the debug window

I'm using the stingray obj toolkit libraries in case this has any bearing

Robert
--
Poetry's not window cleaning.
It breaks the glass.
-- Chase Twichell



Fri, 03 Dec 2004 16:55:31 GMT  
 CMultiDocTemplate not showing correct menu?
Hi Robert,

The code to add the document template doesn't seem to be the cause. Please
refer to the article below to create the new frame:

Q100993 HOWTO: Create Additional Views with CreateNewFrame() Function
http://support.microsoft.com/support/kb/articles/q100/9/93.asp

In addition, you may want to check the MDIDOCVW MFC sample in MSDN for a
sample of MDI.

I hope this helps.

Best Regards,
Leo Chen

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------

| Newsgroups: microsoft.public.vc.mfc
| Subject: CMultiDocTemplate not showing correct menu?
| Date: Mon, 17 Jun 2002 16:55:31 +0100
| Organization: ..when the revolution comes
| Lines: 35


| NNTP-Posting-Host: 195.102.208.198
| Mime-Version: 1.0
| Content-Type: text/plain; charset=us-ascii
| X-Trace: fu-berlin.de 1024329474 8178689 195.102.208.198 (16 [66208])
| X-Home-Page: http://www.chezmarshall.freeserve.co.uk
| User-Agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2
 (i386-msvc-windows98.2222)
| Cancel-Lock: sha1:OcKyCe92QPW19D+gmkUFuEoFVr8=
| Path:
cpmsftngxa07!cpmsftngxa10!tkmsftngp01!newsfeed00.sul.t-online.de!newsfeed01.
sul.t-online.de!t-online.de!fu-berlin.de!uni-berlin.de!195.102.208.198!not-f
or-mail
| Xref: cpmsftngxa07 microsoft.public.vc.mfc:331166
| X-Tomcat-NG: microsoft.public.vc.mfc
|
|
| My application has 4 CMultiDocTemplates with one of them, the menu
| resource passed as the second parameter works and the correct menu is
| shown when OpenDocumentFile is called, on the others the menu
| isn't displayed.
|
|       m_pmainDocTemplate = new CMultiDocTemplate(
|               IDR_TYPE1,
|               RUNTIME_CLASS(mainDoc),
|               RUNTIME_CLASS(CChildFrame), // custom MDI child frame
|               RUNTIME_CLASS(mainView));
|       AddDocTemplate(m_pmainDocTemplate);
|         // above line gets correct menu when OpenDocumentFile is called
|
|       // but this template doesn't
|       m_pOtherTemplate = new CMultiDocTemplate(
|               IDR_TYPE2,
|               RUNTIME_CLASS(mainDoc),                 // network document
|               RUNTIME_CLASS(whateverFrame),
|               RUNTIME_CLASS(whateverView));
|       AddDocTemplate(m_pOtherTemplate);
|
| When it runs I get an empty menu bar (well not quite I get the correct
| .icodisplayed)
|
| Is there any well known bear trap that I'm likely to have fallen in
| here? How do I debug this? I don't see any relevant errors in the debug
window
|
| I'm using the stingray obj toolkit libraries in case this has any bearing
|
| Robert
| --
| Poetry's not window cleaning.
| It breaks the glass.
| -- Chase Twichell
|



Sun, 05 Dec 2004 04:10:36 GMT  
 CMultiDocTemplate not showing correct menu?
On Wed, 19 Jun 2002, Leo Chen told this:

Quote:
> Hi Robert,

> The code to add the document template doesn't seem to be the
> cause. Please refer to the article below to create the new frame:

> Q100993 HOWTO: Create Additional Views with CreateNewFrame()
> Function
> http://support.microsoft.com/support/kb/articles/q100/9/93.asp

Thanks but that doesn't mention the menu at all, I'm opening the new
document fine, its just the menu that's not appearing correctly

Maybe its some odd interaction with the stingray libraries that I need
to track down..

R
--
Poetry's not window cleaning.
It breaks the glass.
-- Chase Twichell



Sun, 05 Dec 2004 16:06:35 GMT  
 CMultiDocTemplate not showing correct menu?
Hi Robert,

You may want to check the article (Q100993) for information about creating
a new frame. This problem can occur if new window is not created properly.

To debug this problem, please set a breakpoint in
CMultiDocTemplate::LoadTemplate to see if the menu resource is loaded
properly. Then, check the CMDIChildWnd::OnUpdateFrameMenu and
CMDIChildWnd::LoadFrame functions to see if the proper menu handle is used.

Also, would you please upload a sample project for testing?

Best Regards,
Leo Chen

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------

| Newsgroups: microsoft.public.vc.mfc
| Subject: Re: CMultiDocTemplate not showing correct menu?
| Date: Wed, 19 Jun 2002 16:06:35 +0100
| Organization: ..when the revolution comes
| Lines: 22




| NNTP-Posting-Host: 195.102.208.198
| Mime-Version: 1.0
| Content-Type: text/plain; charset=us-ascii
| X-Trace: fu-berlin.de 1024499149 9225556 195.102.208.198 (16 [66208])
| X-Home-Page: http://www.chezmarshall.freeserve.co.uk
| User-Agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2
 (i386-msvc-windows98.2222)
| Cancel-Lock: sha1:kywwx6MnWYXKEkwSO7epEnzbNRk=
| Path:
cpmsftngxa08!tkmsftngp01!newsfeed00.sul.t-online.de!t-online.de!news-lei1.df
n.de!news-ber1.dfn.de!fu-berlin.de!uni-berlin.de!195.102.208.198!not-for-mai
l
| Xref: cpmsftngxa08 microsoft.public.vc.mfc:329355
| X-Tomcat-NG: microsoft.public.vc.mfc
|
| On Wed, 19 Jun 2002, Leo Chen told this:
| > Hi Robert,
| >
| > The code to add the document template doesn't seem to be the
| > cause. Please refer to the article below to create the new frame:
| >
| > Q100993 HOWTO: Create Additional Views with CreateNewFrame()
| > Function
| > http://support.microsoft.com/support/kb/articles/q100/9/93.asp
| >
|
| Thanks but that doesn't mention the menu at all, I'm opening the new
| document fine, its just the menu that's not appearing correctly
|
| Maybe its some odd interaction with the stingray libraries that I need
| to track down..
|
| R
| --
| Poetry's not window cleaning.
| It breaks the glass.
| -- Chase Twichell
|



Mon, 06 Dec 2004 10:20:38 GMT  
 CMultiDocTemplate not showing correct menu?
On Thu, 20 Jun 2002, Leo Chen told this:

Quote:
> Hi Robert,

> You may want to check the article (Q100993) for information about
> creating a new frame. This problem can occur if new window is not
> created properly.

> To debug this problem, please set a breakpoint in
> CMultiDocTemplate::LoadTemplate to see if the menu resource is
> loaded properly. Then, check the CMDIChildWnd::OnUpdateFrameMenu and
> CMDIChildWnd::LoadFrame functions to see if the proper menu handle
> is used.

Hmm, CMDIChildWnd::LoadFrame is never called, because of the Stingray
libraries, it calls SECMDIChildWnd::LoadFrame instead so my guess is
that somewhere in the tree I'm using an mfc class where I should be
using a stingray class

Quote:
> Also, would you please upload a sample project for testing?

To you? I've not tried to devise a minimal example and with the
RogueWave stuff there's too many dependencies

Thanks

Robert
--
Poetry's not window cleaning.
It breaks the glass.
-- Chase Twichell



Mon, 06 Dec 2004 15:43:52 GMT  
 CMultiDocTemplate not showing correct menu?
Hi Robert,

I checked RogueWave's web site. It seems the Stingray Foundation Library
has full source available. You may want to step into the code of the child
frame, and check its menu handle.

Best Regards,
Leo Chen

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------

| Newsgroups: microsoft.public.vc.mfc
| Subject: Re: CMultiDocTemplate not showing correct menu?
| Date: Thu, 20 Jun 2002 15:43:52 +0100
| Organization: ..when the revolution comes
| Lines: 32






| NNTP-Posting-Host: 195.102.208.198
| Mime-Version: 1.0
| Content-Type: text/plain; charset=us-ascii
| X-Trace: fu-berlin.de 1024584182 10277952 195.102.208.198 (16 [66208])
| X-Home-Page: http://www.chezmarshall.freeserve.co.uk
| User-Agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2
 (i386-msvc-windows98.2222)
| Cancel-Lock: sha1:thQUr5+nyVhfppJFtDGDqzNKRNU=
| Path:
cpmsftngxa08!tkmsftngp01!INTERNETBUILD41!cppssbbsa01.microsoft.com!news-out.
cwix.com!newsfeed.cwix.com!news.maxwell.syr.edu!fu-berlin.de!uni-berlin.de!1
95.102.208.198!not-for-mail
| Xref: cpmsftngxa08 microsoft.public.vc.mfc:329515
| X-Tomcat-NG: microsoft.public.vc.mfc
|
| On Thu, 20 Jun 2002, Leo Chen told this:
| > Hi Robert,
| >
| > You may want to check the article (Q100993) for information about
| > creating a new frame. This problem can occur if new window is not
| > created properly.
| >
| > To debug this problem, please set a breakpoint in
| > CMultiDocTemplate::LoadTemplate to see if the menu resource is
| > loaded properly. Then, check the CMDIChildWnd::OnUpdateFrameMenu and
| > CMDIChildWnd::LoadFrame functions to see if the proper menu handle
| > is used.
| >
|
| Hmm, CMDIChildWnd::LoadFrame is never called, because of the Stingray
| libraries, it calls SECMDIChildWnd::LoadFrame instead so my guess is
| that somewhere in the tree I'm using an mfc class where I should be
| using a stingray class
|
| > Also, would you please upload a sample project for testing?
| >
|
| To you? I've not tried to devise a minimal example and with the
| RogueWave stuff there's too many dependencies
|
| Thanks
|
| Robert
| --
| Poetry's not window cleaning.
| It breaks the glass.
| -- Chase Twichell
|



Sat, 11 Dec 2004 13:44:16 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. why toolbar dose not show the correct bitmap?

2. Debugger does not show correct values

3. Test Container does not show my ActiveX with the correct size

4. Debugger does not show correct values

5. UserControl does not show on running form and properies do not show

6. Newbie: Menu and icons not showing ?

7. Document Menu not showing up in NT 4

8. TrackPopupMenu does not show menu labels

9. Menu not showing up in 98...but it does in Win2k

10. OCX created in VB does not show Menu in CDialog

11. Mnemonic underlines not showing in menu times.

12. Menu not showing checked symbol

 

 
Powered by phpBB® Forum Software