![]() |
Menu separator & indexes problem |
Post Reply
|
| Author | |
Vitaly
Groupie
Joined: 05 November 2004 Status: Offline Points: 70 |
Post Options
Thanks(0)
Quote Reply
Topic: Menu separator & indexes problemPosted: 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?
|
|
![]() |
|
Vitaly
Groupie
Joined: 05 November 2004 Status: Offline Points: 70 |
Post Options
Thanks(0)
Quote Reply
Posted: 21 May 2007 at 11:05am |
|
nevermind, found the problem, was using global controls collection instead of the submenu's one...
|
|
![]() |
|
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 |