![]() |
how to get the pointer to Main Menu |
Post Reply
|
| Author | |
chuyanj
Newbie
Joined: 13 November 2007 Location: United Kingdom Status: Offline Points: 9 |
Post Options
Thanks(0)
Quote Reply
Topic: how to get the pointer to Main MenuPosted: 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.
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
chuyanj
Newbie
Joined: 13 November 2007 Location: United Kingdom Status: Offline Points: 9 |
Post Options
Thanks(0)
Quote Reply
Posted: 03 July 2008 at 11:52am |
|
any exmaples or code?
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
Pariksh*t
Groupie
Joined: 26 June 2008 Location: India Status: Offline Points: 77 |
Post Options
Thanks(0)
Quote Reply
Posted: 08 July 2008 at 12:51am |
|
//'/Get the handle of main menu CMenu* pTopMenu = AfxGetMainWnd()->GetMenu(); |
|
![]() |
|
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 |