GetMenu won't work |
Post Reply |
Author | |
dehilster
Groupie Joined: 16 October 2005 Status: Offline Points: 16 |
Post Options
Thanks(0)
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
|
|
dehilster
Groupie Joined: 16 October 2005 Status: Offline Points: 16 |
Post Options
Thanks(0)
|
Wow, no one answers. Are are there any CodeJock techs here to answer questions?
|
|
David de Hilster
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |