Print Page | Close Window

CXTMenuBar Error

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=178
Printed Date: 23 December 2024 at 8:21am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTMenuBar Error
Posted By: WWW.CAM.ES
Subject: CXTMenuBar Error
Date 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.

 




Replies:
Posted By: kstowell
Date Posted: 02 January 2004 at 5:30pm

Hello,

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

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

Regards,

Codejock Support




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