![]() |
CXTPControlPopup menus |
Post Reply ![]() |
Author | |
andy_t ![]() Newbie ![]() Joined: 19 October 2004 Location: Norway Status: Offline Points: 13 |
![]() ![]() ![]() ![]() ![]() Posted: 17 June 2005 at 5:51am |
Hi there, I have a toolbar where I need dynamic CXTPControlPopup menus, so I went ahead and inherited from CXTPControlPopup and overrode OnSetPopup so that I could give it a new menu every time it's clicked: BOOL CMyControlPopup::OnSetPopup(BOOL bPopup) /* Modify menu */ // m_pCommandBar = NULL; SetCommandBar(menu.GetSubMenu(0)); return CXTPControlPopup::OnSetPopup(bPopup); 1. This will show my new menu perfectly, but strange things happen when I select some of the menu items (it seems confused about the menu IDs). Plus there's some strange flickering going on). 2. If I uncomment the "m_pCommandBar = NULL;" statement things work much better, so there might be a bug in the LoadMenu call of CXTPControls or somewhere which is not cleaning out the menu correctly... 3. Even with the fix in 2., the menu usually stays up after a menu item is clicked:( Anyone know how to fix this? Using XT Pro v9.60 cheers!
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
call it only if bPopup == TRUE
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
andy_t ![]() Newbie ![]() Joined: 19 October 2004 Location: Norway Status: Offline Points: 13 |
![]() ![]() ![]() ![]() ![]() |
Oh, of course... Thanks a lot, that solved it! ,Andy |
|
![]() |
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 |