Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - CXTMenuBar Error
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTMenuBar Error

 Post Reply Post Reply
Author
Message
WWW.CAM.ES View Drop Down
Newbie
Newbie


Joined: 17 October 2003
Location: Spain
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote WWW.CAM.ES Quote  Post ReplyReply Direct Link To This Post Topic: CXTMenuBar Error
    Posted: 17 October 2003 at 7:49am

 

This code fails. Makes second submenu be empty and moves down its items to next menu.

CMenu *pMainMenu = m_wndMenuBar.GetMenu();

if(pMainMenu)

{

pMainMenu->AppendMenu(MF_STRING, 1000, "Prueba");

pMainMenu->InsertMenu(2, MF_BYPOSITION| MF_STRING, 1001, "Prueba2");

}

 

This code works fine. Append menu entries in the first submenu.

CMenu *pMenu2 = pMainMenu->GetSubMenu(0);

if(pMenu2)

{

pMenu2->AppendMenu(MF_STRING, 1000, "Prueba");

pMenu2->InsertMenu(2, MF_BYPOSITION| MF_STRING, 1001, "Prueba2");

}

 

 If anyone knows something about this problem please send information on how resolve it. Our intention is to append new items dinamically in the mainframe window menu.

 

Thanks.

 

Back to Top
kstowell View Drop Down
Admin Group
Admin Group


Joined: 25 January 2003
Location: MIchigan, USA
Status: Offline
Points: 496
Post Options Post Options   Thanks (0) Thanks(0)   Quote kstowell Quote  Post ReplyReply Direct Link To This Post Posted: 02 January 2004 at 5:30pm

Hello,

Please take a look at this article:
http://www.codejock.com/support/KB/003004.asp

It has a sample included that shows how to accomplish this.

Regards,

Codejock Support

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