Print Page | Close Window

how to get the pointer to Main Menu

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=11289
Printed Date: 15 November 2025 at 6:47am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: how to get the pointer to Main Menu
Posted By: chuyanj
Subject: how to get the pointer to Main Menu
Date Posted: 03 July 2008 at 5:08am
In CMainFrame Class of a XT based project, how can I get the pointer to the main menu. when I use GetMenu(), it returns NULL.



Replies:
Posted By: Oleg
Date Posted: 03 July 2008 at 7:32am
Hi,
CommandBars  doesn't use HMENU.
 
You need call pCommandBars->GetMenuBar() and use CXTPControl/CXTPControls methods to modify it.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: chuyanj
Date Posted: 03 July 2008 at 11:52am
any exmaples or code?


Posted By: Oleg
Date Posted: 03 July 2008 at 3:22pm
Hi,
Search GetMenuBar() in this forum. You will find a lot of samples.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Pariksh*t
Date Posted: 08 July 2008 at 12:51am

//'/Get the handle of main menu

CMenu* pTopMenu = AfxGetMainWnd()->GetMenu();




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