Print Page | Close Window

How to get menu id?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=15267
Printed Date: 27 February 2025 at 2:52pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to get menu id?
Posted By: suchout
Subject: How to get menu id?
Date Posted: 29 September 2009 at 10:28pm

I used the code:

 CMenu *amenu;
 amenu = pCommandBars->GetMenuBar()->GetMenu();
 UINT id = amenu->GetMenuItemID(0);

in CMainFrame(which is derived from CXTPFrameWnd) to access menu bar. But pMenu is always NULL.
 
But in common MFC program, the pMenu will not be NULL.
 
Does anyone can help me, how can I access menu bar in XTreme toolkit?
 
Thanks!



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net