Cancel the visibility of the CXTPPopupBar menu |
Post Reply |
Author | |
sdancer75
Groupie Joined: 08 July 2008 Location: Greece Status: Offline Points: 70 |
Post Options
Thanks(0)
Posted: 29 September 2014 at 2:18pm |
Hi, I create an "blank" items popup control "ControlButtonPopup" like below : m_pPopupHistory = (CXTPControlPopup*)pGroup0->Add(xtpControlButtonPopup, ID_POPUP_HISTORY); pPopupBar = CXTPPopupBar::CreatePopupBar(GetCommandBars()); pPopupBar->SetShowGripper(FALSE); m_pPopupHistory->SetCommandBar(pPopupBar); pPopupBar->InternalRelease(); because I want to fill the control with items dynamically at a later time. So, I dont want to show up an empty popup menu, for that reason, I check the items count with the code below : void CMainFrame::OnInitCommandsPopup(CXTPPopupBar* pCommandBar) { CXTPControls* pControls = pCommandBar->GetControls(); if (pCommandBar == (CXTPPopupBar*)m_pPopupHistory->GetCommandBar()) { nItemsCount = pControls->GetCount(); if (nItemsCount == 0) { AfxMessageBox(_T("There are no items yet !!")); } } } The problem is that I can not block the control to show up the empty popup menu. Is there any way to cancel the visibility of the popup menu ? Regards, |
|
Just me!
|
|
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 |