Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - how to get the pointer to Main Menu
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

how to get the pointer to Main Menu

 Post Reply Post Reply
Author
Message
chuyanj View Drop Down
Newbie
Newbie


Joined: 13 November 2007
Location: United Kingdom
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote chuyanj Quote  Post ReplyReply Direct Link To This Post Topic: how to get the pointer to Main Menu
    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.
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
chuyanj View Drop Down
Newbie
Newbie


Joined: 13 November 2007
Location: United Kingdom
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote chuyanj Quote  Post ReplyReply Direct Link To This Post Posted: 03 July 2008 at 11:52am
any exmaples or code?
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Pariksh*t View Drop Down
Groupie
Groupie
Avatar

Joined: 26 June 2008
Location: India
Status: Offline
Points: 77
Post Options Post Options   Thanks (0) Thanks(0)   Quote Pariksh*t Quote  Post ReplyReply Direct Link To This Post Posted: 08 July 2008 at 12:51am

//'/Get the handle of main menu

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

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.063 seconds.