Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - GetMenu won't work
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

GetMenu won't work

 Post Reply Post Reply
Author
Message
dehilster View Drop Down
Groupie
Groupie


Joined: 16 October 2005
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote dehilster Quote  Post ReplyReply Direct Link To This Post Topic: GetMenu won't work
    Posted: 27 November 2011 at 12:08pm
I have added a dummy menu item to implement a recent analyzers submenu.  I use the recent files which is automatic and that is kewl.

I need to implement a similar submenu but with our own recent list.

I have done the following:

ON_UPDATE_COMMAND_UI(ID_FILE_RECENTANALYZERS, OnUpdateFileRecentanalyzers)

Where ID_FILE_RECENTANALYZERS is an id in a submenu I want to modify.  I have the modification code but the problem is, I can't get the menu with GetMenu so that it modifies the actual menu.

Here is the other code:

void CMainFrame::OnUpdateFileRecentanalyzers(CCmdUI *pCmdUI)
{
CMenu *menu = GetMenu();
// menu is null here
RecentAnalyzerMenu();
}

I am using CXTPMDIFrameWnd instead of CMDIFrameWnd.  When I create a separate test project in Visual Studio 2008 with CMDIFrameWnd, GetMenu returns the menu.

How do I get the hand to the actual menu if GetMenu is return null with code jocks code?

David de Hilster
Back to Top
dehilster View Drop Down
Groupie
Groupie


Joined: 16 October 2005
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote dehilster Quote  Post ReplyReply Direct Link To This Post Posted: 27 December 2011 at 11:52am
Wow, no one answers.  Are are there any CodeJock techs here to answer questions?
David de Hilster
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.109 seconds.