![]() |
Menu items in CXTPControlPopup |
Post Reply ![]() |
Author | |
yoavo ![]() Senior Member ![]() Joined: 29 February 2004 Location: Israel Status: Offline Points: 140 |
![]() ![]() ![]() ![]() ![]() Posted: 11 December 2005 at 10:28am |
Hi, I am trying to insert a dynamic menu to a CXTPControlPopup (with xtpControlSplitPopup style). In all the examples of Xtreme, I saw that the menu that attached to the control is taken from resources. I want to add my menu items one by one. I tried to do it, but I could achieve only a toolbar that is being displayed when pressing the right side of the popup control (I need it as a menu). This is my code: if (lpCreateControl->nID == ID_BUTTON320){ CXTPControlPopup* pButtonColumns = CXTPControlPopup::CreateControlPopup(xtpControlSplitButtonPo pup); pButtonColumns->SetFlags(xtpFlagManualUpdate); CXTPPopupToolBar* pColumnsBar = CXTPPopupToolBar::CreatePopupToolBar(GetCommandBars()); pColumnsBar->SetBorders(CRect(2, 2, 2, 2)); pColumnsBar->DisableShadow(); pColumnsBar->GetControls()->Add(xtpControlButton, ID_FILE_NEW); pColumnsBar->GetControls()->Add(xtpControlButton, ID_FILE_OPEN); pColumnsBar->GetControls()->Add(xtpControlButton, ID_EDIT_CUT);pButtonColumns->SetCommandBar(pColumnsBar); pColumnsBar->InternalRelease(); lpCreateControl->pControl = pButtonColumns; return TRUE;} |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
instead CXTPPopupToolBar* pColumnsBar = CXTPPopupToolBar::CreatePopupToolBar use CXTPPopupBar* pColumnsBar = CXTPPopupBar::CreatePopupBar. |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
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 |