Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Getting CMenu * object for processing..
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Getting CMenu * object for processing..

 Post Reply Post Reply
Author
Message
jigarmehtamscit View Drop Down
Groupie
Groupie
Avatar

Joined: 29 October 2005
Location: India
Status: Offline
Points: 64
Post Options Post Options   Thanks (0) Thanks(0)   Quote jigarmehtamscit Quote  Post ReplyReply Direct Link To This Post Topic: Getting CMenu * object for processing..
    Posted: 12 December 2005 at 1:47pm

Hi,

I am using CJ menubar to show menus in my application..

Now, to get the menu pointers (to check-uncheck the menu items according to the state of the application,) i need to get the CMenu *.. now, following code is failing..

CMenu *m_mainMenu = m_wndMenuBar.GetMenu();
CMenu *m_fileMenu = m_mainMenu->GetSubMenu(1);
CMenu *m_toolMenu = m_mainMenu->GetSubMenu(1);
CMenu *m_themeMenu = m_toolMenu->GetSubMenu(0);

But ont the second line itslef the code crashes... Please tell me where i am wrong..

 

 

Regards,
Jigar Mehta
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: 14 December 2005 at 5:37am

Use Update handlers to check/uncheck items.

See any our CommandBars sample.

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
jigarmehtamscit View Drop Down
Groupie
Groupie
Avatar

Joined: 29 October 2005
Location: India
Status: Offline
Points: 64
Post Options Post Options   Thanks (0) Thanks(0)   Quote jigarmehtamscit Quote  Post ReplyReply Direct Link To This Post Posted: 14 December 2005 at 2:41pm
Thx.. it works now..
Regards,
Jigar Mehta
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.047 seconds.