Print Page | Close Window

Menu separator & indexes problem

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=7196
Printed Date: 12 November 2025 at 11:52pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Menu separator & indexes problem
Posted By: Vitaly
Subject: Menu separator & indexes problem
Date Posted: 21 May 2007 at 10:22am
I'm trying to add menu items dynamically.
 
When i'm calling

CXTPControls * submenu = popup->GetCommandBar()->GetControls();

submenu->Add(pControl);
 
It seems to add the item, but when i'm trying to use GetAt or GetCount for items, the new item doesn't seem to be counted, only the original items in the menu are counted.
 
As a result, i'm having problem to finf out whether my menu item has a separator after it, because GetNext in this case fails.
 
While checking for separator before the item via GetBeginGroup is easy, checking for separator after the item seems impossible for dynamic items...
 
Is there something wrong that i'm doing or this is a bug in the library? Anyways, what should i do?
 



Replies:
Posted By: Vitaly
Date Posted: 21 May 2007 at 11:05am
nevermind, found the problem, was using global controls collection instead of the submenu's one...



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